Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
ab2bf6c
Initial commit: Playwright tests with TestDino integration
Aug 28, 2025
b96de44
Initial commit
Aug 29, 2025
199dffd
Initial commit
Aug 29, 2025
97516ee
Initial commit
Aug 29, 2025
776fe52
added more test cases
Aug 29, 2025
7382bcc
changes applied in the playwright.config file
testing123467 Sep 12, 2025
7e5bc7d
changes applied in the playwright.config file
testing123467 Sep 12, 2025
92cc7d0
updated the yml by adding multiple browser
testing123467 Sep 12, 2025
4dd014f
updated the yml by adding multiple browser
testing123467 Sep 12, 2025
3112535
updated the yml by adding multiple browser
testing123467 Sep 12, 2025
a1357e7
updated the yml by adding multiple browser
testing123467 Sep 12, 2025
4e30306
changes applied in the playwright.config file
testing123467 Sep 12, 2025
9d0753d
Updated playwright config
testing123467 Sep 22, 2025
732dc53
test
Jan 21, 2026
981d087
test
Jan 21, 2026
7e10fd6
live streaming Testing
Jan 27, 2026
9db601b
live streaming Testing
Jan 27, 2026
b094988
live streaming Testing
Jan 27, 2026
bb73040
live streaming Testing
Jan 27, 2026
cec7c73
live streaming Testing
Jan 27, 2026
5985c5a
live streaming Testing
Jan 27, 2026
9442b1e
live streaming Testing
Jan 27, 2026
1e0dee5
live streaming Testing
Jan 27, 2026
b89e1cc
live streaming Testing
Jan 27, 2026
23ea767
live streaming Testing
Jan 27, 2026
e7b60cb
live streaming Testing
Jan 27, 2026
4494f30
testing
Jan 29, 2026
a998cff
testing
Jan 29, 2026
ae9c64a
Testing live streaming on CI pipeline
Jan 29, 2026
7d7f702
Testing live streaming on CI pipeline
Jan 29, 2026
0e365c7
Update @testdino/playwright to version 1.0.1 and remove local tarball…
Feb 2, 2026
94a6a9e
test
Feb 2, 2026
9228971
test
Feb 2, 2026
f6c4331
live stream test
Feb 2, 2026
6268919
Testing the count mismatch in testdino
Feb 3, 2026
479984f
TD-437:UI not updating shard-wise during GitHub CI test execution
Feb 4, 2026
85fd0ad
Update dependencies and configuration for Playwright tests; bump @tes…
testdino-inc Feb 5, 2026
9f031b9
Update GitHub Actions workflow to use Playwright version 1.58.0
testdino-inc Feb 5, 2026
e9971cb
Fix: Added and fixed playwright config
Mar 27, 2026
c917b79
Fix: Added and fixed playwright config
Mar 27, 2026
ee749a3
Fix: Added and fixed playwright config
Mar 27, 2026
708d688
Automated more test cases and updated config file
Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 59 additions & 59 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,116 +1,116 @@
# .github/workflows/playwright-daily.yml
# Runs Playwright test shards every day at **11 : 42 AM IST** (06 : 12 UTC)
# plus anytime you trigger it manually from the Actions tab.
# Runs Playwright test shards with TestDino (staging) + merges reports

name: Run Playwright tests

on:
schedule:
- cron: '30 3 * * 1-5'
push:
pull_request:
workflow_dispatch:

jobs:
run-tests:
name: Run Playwright shards
name: Run shard ${{ matrix.shard }}/10
timeout-minutes: 15
runs-on: ubuntu-latest

container:
image: mcr.microsoft.com/playwright:v1.58.2-noble
options: --user root
strategy:
fail-fast: false
matrix:
shardIndex: [1,2,3]
shardTotal: [2]

shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
env:
TESTDINO_TOKEN: ${{ secrets.TESTDINO_TOKEN }}
TESTDINO_SERVER_URL: https://stg-api.testdino.com
TESTDINO_CI_RUN_ID: ${{ github.run_id }}-${{ github.run_attempt }}
steps:
- uses: actions/checkout@v4
- name: Checkout repo
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
# ✅ Required Node version
- name: Setup Node.js 22.x
uses: actions/setup-node@v6
with:
node-version: '18'
node-version: "22"

# ✅ Required env variables for tests
- name: Create .env file
run: |
echo "USERNAME=${{ secrets.USERNAME }}" >> .env
echo "USERNAME1=${{ secrets.USERNAME1 }}" >> .env
echo "PASSWORD=${{ secrets.PASSWORD }}" >> .env
echo "NEW_PASSWORD=${{ secrets.NEW_PASSWORD }}" >> .env
echo "FIRST_NAME=${{ secrets.FIRST_NAME }}" >> .env
echo "STREET_NAME=${{ secrets.STREET_NAME }}" >> .env
echo "CITY=${{ secrets.CITY }}" >> .env
echo "STATE=${{ secrets.STATE }}" >> .env
echo "COUNTRY=${{ secrets.COUNTRY }}" >> .env
echo "ZIP_CODE=${{ secrets.ZIP_CODE }}" >> .env

echo "USERNAME=${{ secrets.USERNAME }}" >> .env
echo "PASSWORD=${{ secrets.PASSWORD }}" >> .env
echo "NEW_PASSWORD=${{ secrets.NEW_PASSWORD }}" >> .env
echo "FIRST_NAME=${{ secrets.FIRST_NAME }}" >> .env
echo "STREET_NAME=${{ secrets.STREET_NAME }}" >> .env
echo "CITY=${{ secrets.CITY }}" >> .env
echo "STATE=${{ secrets.STATE }}" >> .env
echo "COUNTRY=${{ secrets.COUNTRY }}" >> .env
echo "ZIP_CODE=${{ secrets.ZIP_CODE }}" >> .env
# ✅ Cache npm dependencies
- name: Cache npm dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install deps + browsers
# ✅ Install dependencies + TestDino (.tgz)
- name: Install dependencies
run: |
npm ci
npx playwright install --with-deps

- name: Run shard ${{ matrix.shardIndex }}
run: npx playwright test --project=chromium --reporter=blob --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}

npm install
npm install ./testdino-playwright-1.0.11.tgz
# ✅ Run Playwright shard with TestDino (STAGING)
- name: Run Playwright tests
run: npx tdpw test -t $TESTDINO_TOKEN --server-url $TESTDINO_SERVER_URL --ci-run-id $TESTDINO_CI_RUN_ID --shard=${{ matrix.shard }}/10 --workers=7
# ✅ Upload blob report (needed for merge)
- name: Upload blob report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: blob-report-${{ matrix.shardIndex }}
name: blob-report-${{ matrix.shard }}
path: ./blob-report
retention-days: 1

merge-reports:
name: Merge Reports
needs: run-tests
if: always() # run even if some shards fail
if: always()
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
- name: Checkout repo
uses: actions/checkout@v6
with:
node-version: '18'
fetch-depth: 0

- name: Cache npm dependencies
uses: actions/cache@v3
- name: Setup Node.js 22.x
uses: actions/setup-node@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version: "22"

- name: Install deps + browsers
# ✅ Install deps (TestDino not required here)
- name: Install dependencies
run: |
npm ci
npx playwright install --with-deps

# ✅ Download all shard blob reports
- name: Download all blob reports
uses: actions/download-artifact@v4
with:
path: ./all-blob-reports
pattern: blob-report-*
merge-multiple: true

- name: Merge HTML & JSON reports
run: npx playwright merge-reports --config=playwright.config.js ./all-blob-reports

- name: Upload combined report
# ✅ Merge Playwright HTML report
- name: Merge Playwright HTML report
run: |
npx playwright merge-reports ./all-blob-reports
# ✅ Upload merged Playwright report
- name: Upload combined Playwright report
uses: actions/upload-artifact@v4
with:
name: Playwright Test Report
path: ./playwright-report
retention-days: 14

- name: Send TestDino report
run: |
npx --yes tdpw ./playwright-report \
--token="trx_production_75deca4b6fbb32963853ca189506496d60835761c32e54fd9f6787b00c86158f" \
--upload-html \
--verbose
retention-days: 14
110 changes: 109 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,109 @@
# alphabin-demo-test-playwright
# Ecommerce demo store - Playwright (javascript) tests

Automated end-to-end tests for Ecommerce demo store using [Playwright](https://playwright.dev/).

---

## Project Structure

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

---

## Prerequisites

- [Node.js](https://nodejs.org/) v16+
- [npm](https://www.npmjs.com/)

---

## Installation

```sh
npm install
```

---

## Local Test Execution

Run all tests:
```sh
npx playwright test
```

View the HTML report:
```sh
npx playwright show-report
```

---

## Testdino Integration

[Testdino](https://testdino.com/) 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:
```js
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:

```sh
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:
```sh
npx tdpw --help
```

---

## CI/CD Pipeline Integration

### GitHub Actions

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

```yaml
- 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
Loading
Loading