kalliope-e2e
v3.1.0
Published
For end to end testing of XDATA deployment
Readme
kalliope-e2e
For end to end testing of XDATA deployment
Structure POM
📦kalliope-e2e
┣ 📂.github
┃ ┗ 📂workflows
┃ ┃ ┣ 📜ci.yml
┃ ┃ ┗ 📜playwright.yml
┣ 📂Data
┃ ┗ 📜user.js
┣ 📂node_modules
┣ 📂pages
┃ ┣ 📜home.page.js
┃ ┣ 📜login.page.js
┃ ┗ 📜register.page.js
┣ 📂playwright-report
┃ ┗ 📜index.html
┣ 📂test-results
┃ ┗ 📜.last-run.json
┣ 📂tests
┃ ┣ 📜example.spec.js
┃ ┣ 📜home.spec.js
┃ ┣ 📜login.spec.js
┃ ┗ 📜register.spec.js
┣ 📂tests-examples
┃ ┗ 📜demo-todo-app.spec.js
┣ 📂utils
┃ ┗ 📜common.js
┣ 📜.gitignore
┣ 📜README.md
┣ 📜package-lock.json
┣ 📜package.json
┗ 📜playwright.config.jsHere’s a brief description of each folder:
- .github/workflows: This folder will contains CI setup.
- Data/: This folder contains the test data require for testing.
- node_modules/: This folder contains the function support from playwright.
- pages/: This folder will contain the page objects for our application. Each page object will have methods and properties that represent the page’s elements and actions.
- playwright-report/: This folder will contain the reports generated by our tests.
- test-results/: This folder will contain the result after execute.
- tests/: This folder will contain the test files for our application. Each test file will use the page objects to perform the tests.
- tests-examples/: This folder will contain the sample script to help you check environment ready or not.
- untils/: This folder will contain the common function.
Setup environment
Nodejs
On remote coder for insall Nodejs you need to run: sudo yum install nodejs
Install
Run npm init playwright@latest and select option javascript and another option is true
Script Execute
npx playwright test: Runs the end-to-end tests.
npx playwright test <name>: Run with specific test
npx playwright test --ui: Starts the interactive UI mode.
npx playwright test --project=chromium: Runs the tests only on Desktop Chrome.
npx playwright test example: Runs the tests in a specific file.
npx playwright test --debug: Runs the tests in debug mode.
npx playwright codegen: Auto generate tests with Codegen.
npx playwright show-report: To open last HTML report run
Note with case you want to debug, codegen and run with ui open. You cannot open on headed browser
