This is an example of using Testcafe test framework.
Node.js vesion >=12 is installed
- CD to the project folder
- Open CMD/terminal then type
npm i
. Make sure node_modules folder is generated
Please refer to package.json for more details.
- CD to the project folder
- Open CMD/terminal
- Type
npm run c
to compile typescript files into javascript - Type
npm run test
to run test - Type
npm run alv
to view result
Please read the testcafe help for further information (./node_modules/.bin/testcafe --help).
Basically, we can use the following command:
./node_modules/.bin/testcafe 'chrome:headless:emulation:width=1440;height=900;' ./built/tests/*_test.js -r html:reports/result.html -u -e