Page History
...
In this tutorial, we will create some E2E tests in JavaScript using TestCafé.
TestCafé is a Node.js utility for E2E testing that does not use Selenium WebDriver; it uses a proxy mechanism instead. Some of its features include the ability to handle automatically the wait times of page loads/XHR requests for stabler tests.
...
TestCafé is not just an automation library; it's a complete testing tool that provides assertions and a runner, to implement and run the tests.
Requirements
- TestCafé
- testcafe-reporter-xunit module
- testcafe-browser-provider-saucelabs module (if using Sauce Labs)
testcafe-browser-provider-browserstack module (if using BrowserStack)
...
Running tests using cloud providers
Tests can easily be run using different cloud providers and it's possible to generate a JUnit XML report with the results on a per test basis.
Both in BrowserStack and in Sauce Labs backoffice only a session/test will appear though.
To run them in the cloud using BrowserStack, the command line would be something like this (BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY environment variables would need to be defined beforehand):
No Format |
---|
testcafe "browserstack:Chrome@66.0:Windows 10" test1.js test2.js --reporter xunit > results.xml |
To run them in the cloud using Sauce Labs, the command line would be something like this (SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables would need to be defined beforehand):
No Format |
---|
testcafe "saucelabs:Chrome@66.0:Windows 10" test1.js test2.js --reporter xunit > results.xml |
References
- https://devexpress.github.io/testcafe/
- https://devexpress.github.io/testcafe/documentation/getting-started/
- https://devexpress.github.io/testcafe/documentation/recipes/using-page-model.html
- https://github.com/DevExpress/testcafe-reporter-xunit
- https://dzone.com/articles/testcafe-e2e-testing-tool
- https://testcafe-studio.devexpress.com/documentation/getting-started/
- https://medium.com/yld-engineering-blog/evaluating-cypress-and-testcafe-for-end-to-end-testing-fcd0303d2103
...