Web Automation Framework Template Using defined step and architechure from gitHub: https://github.com/labs42io/web-automation Tests are written in an ordinary language that bridges the gap between business and technical people. The docker selenium simplifies the setup and avoids any local installation of browser specific dependencies. Supported CI/CD:
- Gitlab
- Jenkins (Update in the future)
- Github (Update in the furture)
- CircleCI (Update in the future)
Make a folder feature in your testing project Write Feature file based on Given, When, Then syntax Then test run
- Install dependencies required to run the tests:
npm install
- Start docker selenium containers with
docker-compose
:
# starts the selenium hub and browser nodes in docker containers / chạy container gồm browser vs selenium
npm run selenium
- Run the tests and view the report:
# Chạy tất cả các test và tạo mới tất cả report
npm run test
# Chạy 1 test feature và tạo report cho test đó
npm run test:run test.feature && npm run report
# Xoá các report ở local
npm run report:clean
To stop all the docker containers from step 2:
npm run selenium:stop
Run the tests and view the report:
npm run test
npm run test:run test.feature && npm run report
npm run report:clean
To stop all the docker containers from step 2:
npm run selenium:stop
Note that selenium containers can be started once and then used across multiple sessions of running and debugging tests.