master (platform-2.0.x):
Please follow the instructions at the OpenMRS SDK Wiki page. Set up a server with the Reference Application distribution.
By default tests are run with Firefox 42.0 (download here), so please be sure to have it installed. Also tests are run against https://qa-refapp.openmrs.org so confirm it is accessible from your machine. It is also possible that tests start failing due to qa-refapp being redeployed. If it happens, please wait for qa-refapp to be available again and run tests again.
- Clone the repo
- Go to the ui-tests directory using command line
- Run
mvn clean install
This project contains configuration for running tests on Travis CI with SauceLabs. These platforms provide free plan for Open Source projects.
If you want to know why a test fails you can view logs, screenshots and even screencasts on SauceLabs and see build logs on Travis CI.
To setup Continuous Integration on your fork, execute following steps:
- Create accounts on Travis CI(it has to be synced with Github owner of fork repository) and SauceLabs
- Enable CI on your fork repository on Travis CI (URL is like https://travis-ci.org/profile/${travis_username})
- Get your SauceLabs access key on 'My Account' view (current URL is https://saucelabs.com/beta/users/${saulabs_username})
- Add Environment variables to your repository on Travis.org:
- 'SAUCELABS_USERNAME' equal to your SauceLabs username
- 'SAUCELABS_ACCESSKEY' equal to access key you got in step 3.
Guide for adding environment variables from official Travis CI documentation 5. Push any commit to your master branch to trigger Travis CI build.
And that's it!
If you would like to setup a similar configuration for your distribution, please have a look at .travis.yml. The test server is created using openmrs-sdk:build-distro
and started with docker-compose up
on Travis-CI.
Travis-CI creates a tunnel to SauceLabs, which allows SauceLabs to access the test server and execute tests against that server in a browser. In order to speed up the build, we always run 5 UI tests in parallel using agents provided by SauceLabs. The test server is automatically terminated by Travis-CI once tests are done.
As of March 2017, the resources for this method are outdated/ no longer maintained. https://wiki.openmrs.org/x/CIC3Ag
While writing the code for the test cases, please, follow the instructions in the Code Style paragraph and the guidelines