kazana-integration-test
Full stack test installing & running Kazana example app
Setup
git clone git@github.com:eHealthAfrica/kazana-integration-test.gitcd kazana-integration-testnpm install
Test
npm test
While working on the tests, you can start Selenium / Chrome driver once, and then tests re-run on each save
npm run start_selenium_with_chromedrivernpm run test:mocha:watch
Writing tests
When selecting elements in the kazana-example app, add data-qa attributes on the elements that you want to select. That way, it's easier to move elements around, and make changes to the kazana-example application itself without breaking any selenium tests.
Running tests in a different browser
TEST_CLIENT=selenium:firefox npm test
NOTE: Safari doesn't work at the moment, since the SafariDriver does not handle alerts.
Running tests on Sauce Labs
# a couple of examples SAUCE_USERNAME=username SAUCE_ACCESS_KEY=accesskey TEST_CLIENT=saucelabs:chrome npm testSAUCE_USERNAME=username SAUCE_ACCESS_KEY=accesskey TEST_CLIENT='saucelabs:internet explorer' npm testSAUCE_USERNAME=username SAUCE_ACCESS_KEY=accesskey TEST_CLIENT='saucelabs:internet explorer:10.0:Windows 8' npm test
eHealth Note: Our SauceLabs user/access key can be found in the usual place, under 'Services'.