Skip to content

Testdino1/playwright-sample-tests-javascript

Repository files navigation

Ecommerce demo store - Playwright (javascript) tests

Automated end-to-end tests for Ecommerce demo store using Playwright.


Project Structure

  • pages/ — Page Object Models
  • tests/ — Test specifications
  • playwright.config.js — Playwright configuration
  • playwright-report/ — HTML and JSON test reports
  • .github/workflows/test.yml — CI/CD pipeline

Prerequisites


Installation

npm install

If you haven't installed browsers yet:

npx playwright install

Local Test Execution

Run all tests:

npx playwright test

View the HTML report:

npx playwright show-report

Reports

Reports are generated in playwright-report/. When integrating with Testdino, ensure both HTML and JSON reporters are enabled in playwright.config.js.

Example reporter configuration:

reporter: [
  ['html', { outputFolder: 'playwright-report', open: 'never' }],
  ['json', { outputFile: './playwright-report/report.json' }],
]

Testdino Integration

Testdino enables cloud-based Playwright reporting.

Important:
Make sure your playwright.config.js includes both the HTML and JSON reporters.
The HTML report and JSON report must be available for Testdino to process your test results.

Example configuration:

reporter: [
  ['html', { outputFolder: 'playwright-report', open: 'never' }],
  ['json', { outputFile: './playwright-report/report.json' }],
]

Local Execution

After your tests complete and the report is generated in playwright-report, upload it to Testdino:

npx --yes tdpw ./playwright-report --token="YOUR_TESTDINO_API_KEY" --upload-html

Replace the token above with your own Testdino API key.

See all available commands:

npx tdpw --help

CI/CD Pipeline Integration

GitHub Actions

Add the following step to your workflow after tests and report generation:

- name: Send Testdino report
  run: |
    npx --yes tdpw ./playwright-report --token="YOUR_TESTDINO_API_KEY" --upload-html

Ensure your API key is correctly placed in the command.


Continuous Integration

Automated test runs and report merging are configured in .github/workflows/test.yml.


Contributing

Pull requests and issues are welcome!


License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5