Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c8d933f
chore(deps-dev): bump playwright from 1.53.0 to 1.54.1 (#5043)
dependabot[bot] Jul 16, 2025
4ef395f
chore(deps-dev): bump @eslint/js from 9.30.0 to 9.31.0 (#5044)
dependabot[bot] Jul 16, 2025
7c764fc
chore(deps-dev): bump expect from 29.7.0 to 30.0.4 (#5036)
dependabot[bot] Jul 16, 2025
6b45b27
chore(deps-dev): bump graphql from 16.10.0 to 16.11.0 (#5049)
dependabot[bot] Jul 22, 2025
a130ba3
chore(deps-dev): bump electron from 37.1.0 to 37.2.3 (#5047)
dependabot[bot] Jul 22, 2025
2aef872
chore(deps-dev): bump puppeteer from 24.8.0 to 24.15.0 (#5054)
dependabot[bot] Jul 30, 2025
af27fc9
chore(deps): bump axios from 1.8.4 to 1.11.0 (#5055)
dependabot[bot] Aug 7, 2025
2ad213a
chore(deps-dev): bump typedoc-plugin-markdown from 4.7.0 to 4.7.1 (#5…
dependabot[bot] Aug 7, 2025
4cc3c84
chore(deps): bump browser-actions/setup-chrome from 1 to 2 (#5041)
dependabot[bot] Aug 7, 2025
e090eb9
chore(deps-dev): bump expect from 30.0.4 to 30.0.5 (#5064)
dependabot[bot] Aug 13, 2025
220b73f
fix: 5070 issue (#5071)
kobenguyent Aug 19, 2025
5c14df4
chore(deps-dev): bump typedoc from 0.28.7 to 0.28.10 (#5059)
dependabot[bot] Aug 19, 2025
a27b99e
fix: hook exit code (#5058)
kobenguyent Aug 19, 2025
3cf5fe2
5066 unable to inject data between workers because of proxy object (#…
kobenguyent Aug 19, 2025
5476a9d
chore(deps): bump actions/checkout from 4 to 5 (#5062)
dependabot[bot] Aug 19, 2025
3408489
chore(deps-dev): bump tsd from 0.32.0 to 0.33.0 (#5063)
dependabot[bot] Aug 19, 2025
eceb2a3
chore(deps-dev): bump typedoc-plugin-markdown from 4.7.1 to 4.8.1 (#5…
dependabot[bot] Aug 19, 2025
4daabc8
feat: shuffle test suite order in run command (#5051)
NivYarmus Aug 19, 2025
ff63f70
fix: sessions playwright traces - naming convention and error handlin…
kobenguyent Aug 19, 2025
a483106
release 3.7.4 (#5075)
kobenguyent Aug 19, 2025
2e4d0bb
update docs
kobenguyent Aug 19, 2025
376c758
fix: Update inquirer (#5076)
kobenguyent Aug 19, 2025
f0759ca
add docs
kobenguyent Aug 20, 2025
04ec768
feat(cli): make test file hyperlink (#5078)
kobenguyent Aug 20, 2025
e3a195d
Playwright: I.waitForText() causes unexpected delay equal to `waitFor…
Copilot Aug 20, 2025
93ab75d
3.7.3 I.seeResponseContainsJson not working (#5081)
Copilot Aug 20, 2025
58f83a1
Fix JUnit XML test case name inconsistency when using scenario retrie…
Copilot Aug 20, 2025
f295302
fix: testcafe workflow failed (#5085)
kobenguyent Aug 21, 2025
ce16e92
[FR] - Support feature.only like Scenario.only (#5087)
Copilot Aug 21, 2025
2047cf2
Fix tryTo steps appearing in test failure traces (#5088)
Copilot Aug 22, 2025
0797716
feat: Introduce CodeceptJS WebElement Class to mirror chosen helpers'…
Copilot Aug 22, 2025
75d98de
DOC: Autogenerate and update documentation
actions-user Aug 22, 2025
b27e9cf
Fix waitForText timeout regression in Playwright helper (#5093)
Copilot Aug 22, 2025
c95f78d
fix: missing module 'codeceptjs/effects' (#5094)
kobenguyent Aug 22, 2025
de21279
[WIP] [FEATURE REQUEST](puppeteer) migrate locators from ElementHandl…
Copilot Aug 23, 2025
cd6fec7
DOC: Autogenerate and update documentation
actions-user Aug 23, 2025
273a63e
Fix test statistics reporting issue in pool mode - consolidate result…
Copilot Aug 23, 2025
5598d39
Fix mocha retries losing CodeceptJS-specific properties (opts, tags, …
Copilot Aug 23, 2025
a52bba7
Test Sharding for CI Matrix Purposes with GitHub Workflows (#5098)
Copilot Aug 23, 2025
5535d16
API test server to run unit tests, acceptance tests for codeceptjs wi…
Copilot Aug 23, 2025
0a0067f
Enable HTML reporter by default in new CodeceptJS projects with compr…
Copilot Aug 24, 2025
f02280c
fix: use platformName for mobile click detection instead of isW3C (An…
mirao Aug 24, 2025
21cf8b6
[WIP] Bug: built in HTML reporter missing test stats when running run…
Copilot Aug 26, 2025
e94fc98
Fix: JSONResponse helper to preserve original onResponse behavior (Fi…
myrepojuly Aug 26, 2025
88509d1
feat: Add configurable sensitive data masking with custom patterns (#…
Copilot Aug 26, 2025
663be8d
chore(deps-dev): bump @eslint/js from 9.31.0 to 9.34.0 (#5112)
dependabot[bot] Aug 26, 2025
2e814fd
Add Custom Strategy Locators support to Playwright helper (#5090)
Copilot Aug 27, 2025
07a58e5
DOC: Autogenerate and update documentation
actions-user Aug 27, 2025
773ba14
fix(playwright): relaunch browser correctly with `restart: 'session'`…
Samuel-StO Aug 28, 2025
4270372
[WIP] CodeceptJS 3.7.x: "tryTo" and "session" do not work together (#…
Copilot Sep 1, 2025
bc1c500
[WIP] Popups triggered during a test execution are not isolated betwe…
Copilot Sep 1, 2025
73960e8
[WIP] fix Circular reference in objects (#5123)
Copilot Sep 1, 2025
4f7a936
[WIP] Retries mechanism improvements (#5103)
Copilot Sep 1, 2025
15a288e
chore(deps-dev): bump playwright from 1.54.1 to 1.55.0 (#5114)
dependabot[bot] Sep 1, 2025
a396c5b
Bugfix: Properly stop network traffic recording (#5127)
Samuel-StO Sep 2, 2025
f5cc169
fix: retryFailedStep plugin works in debug/verbose mode
mirao Sep 2, 2025
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
96 changes: 96 additions & 0 deletions .github/SHARDING_WORKFLOWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Test Sharding Workflows

This document explains the GitHub Actions workflows that demonstrate the new test sharding functionality in CodeceptJS.

## Updated/Created Workflows

### 1. `acceptance-tests.yml` (Updated)

**Purpose**: Demonstrates sharding with acceptance tests across multiple browser configurations.

**Key Features**:

- Runs traditional docker-compose tests (for backward compatibility)
- Adds new sharded acceptance tests using CodeceptJS directly
- Tests across multiple browser configurations (Puppeteer, Playwright)
- Uses 2x2 matrix: 2 configs × 2 shards = 4 parallel jobs

**Example Output**:

```
- Sharded Tests: codecept.Puppeteer.js (Shard 1/2)
- Sharded Tests: codecept.Puppeteer.js (Shard 2/2)
- Sharded Tests: codecept.Playwright.js (Shard 1/2)
- Sharded Tests: codecept.Playwright.js (Shard 2/2)
```

### 2. `sharding-demo.yml` (New)

**Purpose**: Comprehensive demonstration of sharding features with larger test suite.

**Key Features**:

- Uses sandbox tests (2 main test files) for sharding demonstration
- Shows basic sharding with 2-way split (`1/2`, `2/2`)
- Demonstrates combination of `--shuffle` + `--shard` options
- Uses `DONT_FAIL_ON_EMPTY_RUN=true` to handle cases where some shards may be empty

### 3. `test.yml` (Updated)

**Purpose**: Clarifies which tests support sharding.

**Changes**:

- Added comment explaining that runner tests are mocha-based and don't support sharding
- Points to sharding-demo.yml for examples of CodeceptJS-based sharding

## Sharding Commands Used

### Basic Sharding

```bash
npx codeceptjs run --config ./codecept.js --shard 1/2
npx codeceptjs run --config ./codecept.js --shard 2/2
```

### Combined with Other Options

```bash
npx codeceptjs run --config ./codecept.js --shuffle --shard 1/2 --verbose
```

## Test Distribution

The sharding algorithm distributes tests evenly:

- **38 tests across 4 shards**: ~9-10 tests per shard
- **6 acceptance tests across 2 shards**: 3 tests per shard
- **Uneven splits handled gracefully**: Earlier shards get extra tests when needed

## Benefits Demonstrated

1. **Parallel Execution**: Tests run simultaneously across multiple CI workers
2. **No Manual Configuration**: Automatic test distribution without maintaining test lists
3. **Load Balancing**: Even distribution ensures balanced execution times
4. **Flexibility**: Works with any number of shards and test configurations
5. **Integration**: Compatible with existing CodeceptJS features (`--shuffle`, `--verbose`, etc.)

## CI Matrix Integration

The workflows show practical CI matrix usage:

```yaml
strategy:
matrix:
config: ['codecept.Puppeteer.js', 'codecept.Playwright.js']
shard: ['1/2', '2/2']
```

This creates 4 parallel jobs:

- Config A, Shard 1/2
- Config A, Shard 2/2
- Config B, Shard 1/2
- Config B, Shard 2/2

Perfect for scaling test execution across multiple machines and configurations.
4 changes: 2 additions & 2 deletions .github/workflows/acceptance-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Acceptance Tests using docker compose
name: Acceptance Tests

on:
push:
Expand All @@ -24,7 +24,7 @@ jobs:
steps:
# Checkout the repository
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v5

# Install Docker Compose
- name: Install Docker Compose
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/appium_Android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
test-suite: ['other', 'quick']

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/appium_iOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
test-suite: ['other', 'quick']

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-22.04
name: Check Tests
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: testomatio/check-tests@stable
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/doc-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dtslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -48,7 +48,9 @@ jobs:
run: './bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug'
- name: run chromium with restart==browser tests
run: 'BROWSER_RESTART=browser ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug'
- name: run chromium with restart==session tests
- name: run chromium with restart==session tests on 2 workers split by pool
run: 'BROWSER_RESTART=session ./bin/codecept.js run-workers 2 -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug --by=pool'
- name: run chromium with restart==session tests and
run: 'BROWSER_RESTART=session ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug'
- name: run firefox tests
run: 'BROWSER=firefox node ./bin/codecept.js run -c test/acceptance/codecept.Playwright.js --grep @Playwright --debug'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/puppeteer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -38,7 +38,7 @@ jobs:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
- name: start a server
run: "php -S 127.0.0.1:8000 -t test/data/app &"
- uses: browser-actions/setup-chrome@v1
- uses: browser-actions/setup-chrome@v2
- run: chrome --version
- name: run tests
run: "./bin/codecept.js run-workers 2 -c test/acceptance/codecept.Puppeteer.js --grep @Puppeteer --debug"
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/sharding-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Minimal Sharding Test

on:
push:
branches:
- '3.x'
pull_request:
branches:
- '**'

env:
CI: true
FORCE_COLOR: 1

jobs:
test-sharding:
runs-on: ubuntu-latest
name: 'Shard ${{ matrix.shard }}'

strategy:
fail-fast: false
matrix:
shard: ['1/2', '2/2']

steps:
- name: Checkout
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm install --ignore-scripts

- name: Run tests with sharding
run: npx codeceptjs run --config ./codecept.js --shard ${{ matrix.shard }}
working-directory: test/data/sandbox
6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
node-version: [20.x, 22.x]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -38,7 +38,7 @@ jobs:
node-version: [20.x, 22.x]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand All @@ -48,3 +48,5 @@ jobs:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- run: npm run test:runner
# Note: Runner tests are mocha-based, so sharding doesn't apply here.
# For CodeceptJS sharding examples, see sharding-demo.yml workflow.
25 changes: 17 additions & 8 deletions .github/workflows/testcafe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,38 @@ env:

jobs:
build:

runs-on: ubuntu-22.04

strategy:
matrix:
node-version: [20.x]
os: [ubuntu-22.04]
php-version: ['8.1']
node-version: [22.x]
fail-fast: false

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: ${{ matrix.php-version }}
- name: npm install
run: |
npm i --force
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: true
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- name: start a server
run: "php -S 127.0.0.1:8000 -t test/data/app &"
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
start /B php -S 127.0.0.1:8000 -t test/data/app
else
php -S 127.0.0.1:8000 -t test/data/app &
fi
sleep 3
shell: bash
- name: run unit tests
run: xvfb-run --server-args="-screen 0 1280x720x24" ./node_modules/.bin/mocha test/helper/TestCafe_test.js
run: npm run test:unit:webbapi:testCafe
2 changes: 1 addition & 1 deletion .github/workflows/webdriver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- run: docker run -d --net=host --shm-size=2g selenium/standalone-chrome:4.27
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ examples/selenoid-example/output
test/data/app/db
test/data/sandbox/steps.d.ts
test/data/sandbox/configs/custom-reporter-plugin/output/result.json
test/data/sandbox/configs/html-reporter-plugin/output/
output/
test/runner/output/
testpullfilecache*
.DS_Store
package-lock.json
Expand Down
Loading