Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
261 commits
Select commit Hold shift + click to select a range
8686aed
improved check
Jul 27, 2025
b06c613
improved output
Jul 27, 2025
fd2c74a
fixed minot tests issues
Jul 27, 2025
40dc1cb
use runok.cjs
kobenguyent Aug 7, 2025
de60cf6
fix issues
kobenguyent Aug 9, 2025
5b2c5f9
fix more tests
kobenguyent Aug 10, 2025
5a075f4
fix tests
kobenguyent Aug 10, 2025
49baa89
fix: failed UTs
kobenguyent Aug 11, 2025
4d84e8f
fix: runner tests
kobenguyent Aug 11, 2025
f078caa
fix: runner tests
kobenguyent Aug 11, 2025
67a2e07
fix more runner UTs
kobenguyent Aug 11, 2025
82f194a
fix: more runner tests
kobenguyent Aug 11, 2025
04e299f
fix: more runner tests
kobenguyent Aug 11, 2025
aad2233
fix more runner tests
kobenguyent Aug 11, 2025
75a7f48
fix more runner tests
kobenguyent Aug 11, 2025
e0761be
fix more runner tests
kobenguyent Aug 11, 2025
4bd61aa
fix more runner tests
kobenguyent Aug 11, 2025
749639d
fix more runner tests
kobenguyent Aug 11, 2025
9d538d3
fix more runner tests
kobenguyent Aug 11, 2025
479875f
fix more runner tests
kobenguyent Aug 11, 2025
46f25d5
fix more UTs
kobenguyent Aug 11, 2025
34699bd
fix: plugin test
kobenguyent Aug 12, 2025
f4a50e7
fix helper tests
kobenguyent Aug 12, 2025
d1beac1
fix playwright tests
kobenguyent Aug 12, 2025
74b3b21
fix: add timeouts
kobenguyent Aug 12, 2025
54ce0fd
fix UTs
kobenguyent Aug 13, 2025
9f9d5e1
fix screenshotOnFail UTs
kobenguyent Aug 13, 2025
ead1ebc
fix screenshotOnFail UTs
kobenguyent Aug 13, 2025
617c253
fix more UTs
kobenguyent Aug 13, 2025
52af0b6
fix more tests
kobenguyent Aug 13, 2025
b3469ad
fix UTs
kobenguyent Aug 13, 2025
a8d9bb7
fix: more tests
kobenguyent Aug 13, 2025
7b15b82
fix test:runner
kobenguyent Aug 14, 2025
7e5373d
fix more runner tests
kobenguyent Aug 14, 2025
bf6fc8f
fix more tests
kobenguyent Aug 14, 2025
d585f38
feat: Comprehensive ESM migration with documentation and fixes
kobenguyent Aug 14, 2025
709f988
fix tests
kobenguyent Aug 14, 2025
cebab23
fix: Fix timeout configuration and ESM imports in test configs
kobenguyent Aug 14, 2025
08fa092
fix: prevent hanging in Playwright acceptance tests with terminal err…
kobenguyent Aug 14, 2025
fe8a8da
fix more tests
kobenguyent Aug 14, 2025
10a4735
Remove node 20.x
kobenguyent Aug 14, 2025
071c414
fix failed test should execute scenarios step-by-step
kobenguyent Aug 18, 2025
5cb3129
run helpers UTs before acceptance tests
kobenguyent Aug 18, 2025
78785a6
fix playwright
kobenguyent Aug 18, 2025
b81dac1
fixed more tests
Aug 24, 2025
aa022c6
fixed webdriver tests
Aug 24, 2025
63f4eb2
fixed REST tests
Aug 24, 2025
801d50b
updated readme
Sep 3, 2025
57bb1dd
fixed most of acceptance tests
Sep 4, 2025
7ff7ca7
fixed runner tests
Sep 5, 2025
29566b5
improved running bdd tests
Sep 9, 2025
acdd13c
Improved bdd tests
Sep 10, 2025
674de3b
fixed some rest tests
Sep 10, 2025
ddc4f50
fixed runner tests
Sep 10, 2025
7d430b4
fixed more tests
Sep 11, 2025
cb7efd6
Fixed tests
Sep 12, 2025
326f9d7
fixed runner tests
Sep 13, 2025
4c90c15
fixed session tests
Sep 13, 2025
db4b8e3
fixed flaky tests
Sep 14, 2025
09fb273
tried to fix PW tests
Sep 15, 2025
7d43fc4
force cleanup
Sep 15, 2025
f71c946
improved PW tests
Sep 15, 2025
18c633b
fixed within in pw
Sep 16, 2025
cdfa081
fix: remove --debug flag from Playwright CI tests to prevent timeouts
Sep 20, 2025
2930d26
feat: add debug workflow to identify timeout issue
Sep 20, 2025
04701d6
fix: remove artifacts and update to upload-artifact@v4
Sep 20, 2025
b035844
feat: remove debug workflow that was timing out
Sep 20, 2025
7cc7caf
feat: add timeout investigation workflow and test script
Sep 20, 2025
1d7cb4f
feat: create single test timeout debug workflow
Sep 20, 2025
d71cf45
fix: remove debug workflow and test script
Sep 20, 2025
55d830f
fix: remove test artifacts and temporary config files
Sep 20, 2025
2183254
feat: add simple test to timeout debug workflow
Sep 21, 2025
05dbcda
fix: split tests into separate jobs to ensure both run
Sep 21, 2025
478df12
fixed codecept timeout
Sep 21, 2025
bf996d0
fix: skip _finishTest and _cleanup when browser restart is enabled
Sep 21, 2025
29bbfc1
fix: skip _finishTest and _cleanup for ALL helpers when browser restarts
Sep 21, 2025
08d1010
feat: remove restart=browser strategy from CodeceptJS
Sep 23, 2025
f5899fa
config tests
Sep 23, 2025
eb0e7c6
improved async error handling
Sep 24, 2025
720ec42
fixed webkit tests
Sep 24, 2025
d812402
fixed webdriver
Sep 30, 2025
992359a
fixed docker build
Oct 1, 2025
cef1ebc
referted container issue
Oct 2, 2025
a435a5e
fixed loading codeceptjs
Oct 2, 2025
6301c98
fixed docker build
Oct 2, 2025
bd0fa9f
Revert to commit 720ec42b with updated Dockerfile
Oct 2, 2025
c44a3ce
Merge revert to commit 720ec42b with updated Dockerfile
Oct 3, 2025
c2ed276
removed package json from tsts/ SHould help?
Oct 3, 2025
0e29eee
added more fixes
Oct 3, 2025
4fd1f12
minimal fixes
Oct 3, 2025
40247e7
updated test deps
Oct 3, 2025
1d7ba45
improved testss for mocha
Oct 3, 2025
d1b5623
changed puppeter/webdriver tests
Oct 4, 2025
6fe5a35
Convert test assertions from .should to expect() syntax
Oct 4, 2025
a3cc71a
webkit tests increas timeout
Oct 4, 2025
957eb07
changed urls for webkit tests
Oct 4, 2025
91ac5eb
updated docker compose
Oct 4, 2025
5763409
Fix WebKit, Docker REST tests, and BDD faker config for ESM
Oct 4, 2025
92b70d2
updated docker compose
Oct 4, 2025
ca3ac61
fixed faker tests
Oct 4, 2025
7df0224
fixed tests
Oct 4, 2025
514cc75
Merge pull request #5045 from codeceptjs/feat/esm
DavertMik Oct 4, 2025
b6e9b50
Update dependabot.yml
kobenguyent Oct 7, 2025
6aba982
chore(deps): bump browser-actions/setup-chrome from 1 to 2 (#5259)
dependabot[bot] Oct 8, 2025
910f6d1
chore(deps): bump actions/checkout from 4 to 5 (#5258)
dependabot[bot] Oct 8, 2025
5ace844
implemented clickXY action (#5248)
DavertMik Oct 10, 2025
0e270f2
replaced ai provider with vercel ai sdk (#5249)
DavertMik Oct 10, 2025
03f7800
replaced joi with zod (#5250)
DavertMik Oct 10, 2025
1e3964a
chore(deps): bump @cucumber/messages from 27.2.0 to 30.1.0 (#5262)
dependabot[bot] Oct 14, 2025
1a59408
chore(deps): bump fs-extra from 11.3.0 to 11.3.2 (#5263)
dependabot[bot] Oct 14, 2025
cd9270b
Feat/aria selectors (#5260)
DavertMik Oct 17, 2025
0642658
chore(deps-dev): bump electron from 38.2.0 to 38.2.1 (#5255)
dependabot[bot] Oct 20, 2025
1c66a0b
chore(deps-dev): bump puppeteer from 24.8.0 to 24.26.1 (#5277)
dependabot[bot] Oct 29, 2025
f461b3b
chore(deps-dev): bump playwright from 1.53.0 to 1.56.1 (#5270)
dependabot[bot] Oct 29, 2025
bb73778
fix(utils): resolve command injection vulnerability in `emptyFolder` …
mhassan1 Oct 29, 2025
f208304
chore(deps-dev): bump tsd from 0.32.0 to 0.33.0 (#5267)
dependabot[bot] Oct 29, 2025
a09a569
chore(deps): bump envinfo from 7.14.0 to 7.19.0 (#5268)
dependabot[bot] Oct 29, 2025
d615df2
chore(deps): bump actions/setup-node from 4 to 6 (#5269)
dependabot[bot] Oct 29, 2025
0155120
chore(deps-dev): bump typescript from 5.8.3 to 5.9.3 (#5271)
dependabot[bot] Oct 29, 2025
4d40c77
Rebase 3.x (#5282)
kobenguyent Nov 8, 2025
591c0dc
chore(deps-dev): bump @wdio/utils from 9.15.0 to 9.20.0 (#5284)
dependabot[bot] Nov 8, 2025
2ee81a6
chore(deps): bump envinfo from 7.19.0 to 7.20.0 (#5287)
dependabot[bot] Nov 8, 2025
270f946
chore(deps): bump mocha from 11.6.0 to 11.7.4 (#5285)
dependabot[bot] Nov 8, 2025
7395576
ci: enable workflows for 4.x (#5289)
kobenguyent Nov 8, 2025
ed0c381
DOC: Autogenerate and update documentation
actions-user Nov 8, 2025
d5cbab2
Update AppiumWeb_test.js
kobenguyent Nov 8, 2025
6d59918
Update Appium_test.js
kobenguyent Nov 8, 2025
604106f
fix: Appium esm migration (#5292)
kobenguyent Nov 10, 2025
f17abf5
feat: adding support for the `But` keyword (#5291)
mozillalives Nov 10, 2025
f623476
fix: global timeout before suite (#5275)
mirao Oct 29, 2025
c1635bb
chore(deps-dev): bump ts-morph from 26.0.0 to 27.0.2 (#5297)
dependabot[bot] Nov 10, 2025
60a2ff4
chore(deps-dev): bump semver from 7.7.2 to 7.7.3 (#5294)
dependabot[bot] Nov 10, 2025
8a2d58e
chore(deps): bump actions/setup-node from 5 to 6 (#5293)
dependabot[bot] Nov 10, 2025
159ca39
fix: add missing 'ai' package dependency for AI functionality
kobenguyent Nov 10, 2025
050669a
update beta version
kobenguyent Nov 10, 2025
ec6db29
fix: add TypeScript support for steps_file.ts and support objects
kobenguyent Nov 10, 2025
45b3081
fix: improve TypeScript support for steps_file with cross-file imports
kobenguyent Nov 10, 2025
482aba4
update beta version
kobenguyent Nov 10, 2025
1071207
fix: inject ESM globals for TypeScript files using __dirname/__filename
kobenguyent Nov 10, 2025
1160906
fix: htmlReporter plugin cannot set step.duration (getter-only property)
kobenguyent Nov 10, 2025
0a0ad4a
fix: TypeScript config files cannot import from other TypeScript files
kobenguyent Nov 10, 2025
981ec98
refactor: extract TypeScript transpilation logic into reusable utility
kobenguyent Nov 10, 2025
e519828
fix: TypeScript files with dynamic require() paths now work correctly
kobenguyent Nov 10, 2025
ba1aa04
version bump
kobenguyent Nov 10, 2025
b97fe90
fix: TypeScript files with directory-style imports (no .ts extension)…
kobenguyent Nov 10, 2025
c74a4ef
version bump
kobenguyent Nov 10, 2025
36c9d06
fix: TypeScript require() now tries extensions for paths with non-sta…
kobenguyent Nov 10, 2025
4ff9a23
feat: TypeScript configs now support top-level await with dynamic imp…
kobenguyent Nov 10, 2025
d08f9dc
feat: Add TypeScript test support with tsx loader (v4.0.0-beta.19)
kobenguyent Nov 11, 2025
69edd06
fix: Use named imports from @cucumber/gherkin for ESM compatibility
kobenguyent Nov 11, 2025
b249311
fix bugs (#5300)
kobenguyent Nov 16, 2025
75bf99e
fix: logging of steps in verbose and debug mode (#5312)
Copilot Nov 17, 2025
7ea74dc
version bump
kobenguyent Nov 17, 2025
1a6aef2
Fix TypeScript helper loading and import resolution (#5313)
Copilot Nov 17, 2025
cc81e97
chore(deps-dev): bump @types/chai from 5.2.2 to 5.2.3 (#5309)
dependabot[bot] Nov 18, 2025
715e262
chore(deps-dev): bump chai from 4.5.0 to 6.2.1 (#5311)
dependabot[bot] Nov 18, 2025
c21bfa6
chore(deps): bump commander from 11.1.0 to 14.0.2 (#5310)
dependabot[bot] Nov 18, 2025
b53bec7
Fix browser hanging during cleanup by not waiting for browser.close()…
Copilot Nov 19, 2025
90d53c2
Fix type definitions for custom helpers with ESM default exports (#5321)
Copilot Nov 19, 2025
23fad16
Fix TypeScript ESM module resolution docs - recommend tsx over ts-nod…
Copilot Nov 20, 2025
262935d
Fix TypeScript definitions generation when no helpers configured (#5325)
Copilot Nov 20, 2025
32d6a8b
chore(deps): bump axios from 1.12.2 to 1.13.2 (#5328)
dependabot[bot] Dec 3, 2025
26d44eb
chore(deps): bump @cucumber/gherkin from 35.1.0 to 37.0.0 (#5329)
dependabot[bot] Dec 3, 2025
cc9dd2b
chore(deps-dev): bump globals from 16.4.0 to 16.5.0 (#5330)
dependabot[bot] Dec 3, 2025
f7ae359
chore(deps): bump glob from 11.1.0 to 13.0.0 (#5331)
dependabot[bot] Dec 3, 2025
10b6a18
chore(deps): bump joi from 18.0.1 to 18.0.2 (#5332)
dependabot[bot] Dec 3, 2025
3247f48
chore(deps): bump actions/checkout from 5 to 6 (#5333)
dependabot[bot] Dec 3, 2025
d7f5ac3
chore(deps-dev): bump typedoc from 0.28.13 to 0.28.15 (#5342)
dependabot[bot] Dec 9, 2025
5c0359a
chore(deps-dev): bump @wdio/utils from 9.20.0 to 9.21.0 (#5341)
dependabot[bot] Dec 9, 2025
cb4ef26
chore(deps): bump @cucumber/messages from 29.0.1 to 31.0.0 (#5349)
dependabot[bot] Dec 15, 2025
644161e
chore(deps-dev): bump puppeteer from 24.15.0 to 24.33.0 (#5348)
dependabot[bot] Dec 15, 2025
7747f4c
chore(deps-dev): bump graphql from 16.11.0 to 16.12.0 (#5347)
dependabot[bot] Dec 15, 2025
279a20c
chore(deps-dev): bump typescript from 5.8.3 to 5.9.3 (#5353)
dependabot[bot] Dec 23, 2025
d336bf8
chore(deps-dev): bump @types/node from 24.10.4 to 25.0.3 (#5354)
dependabot[bot] Dec 23, 2025
af339c0
chore(deps): bump @cucumber/gherkin from 37.0.0 to 37.0.1 (#5355)
dependabot[bot] Dec 29, 2025
0f6a64b
chore(deps): bump @cucumber/messages from 31.0.0 to 31.1.0 (#5356)
dependabot[bot] Dec 30, 2025
7c6d58f
chore(deps-dev): bump webdriverio from 9.12.5 to 9.23.0 (#5366)
dependabot[bot] Jan 7, 2026
9cda907
chore(deps-dev): bump @inquirer/testing from 2.1.53 to 3.0.3 (#5365)
dependabot[bot] Jan 7, 2026
d970e22
Add 3.x commits (#5367)
kobenguyent Jan 7, 2026
850ee02
chore(deps-dev): bump @eslint/js from 9.36.0 to 9.39.2 (#5364)
dependabot[bot] Jan 7, 2026
6c916ce
DOC: Autogenerate and update documentation
actions-user Jan 7, 2026
550009e
fix several 4.x issues (#5368)
kobenguyent Jan 7, 2026
87fec45
chore(deps-dev): bump @eslint/eslintrc from 3.3.1 to 3.3.3 (#5339)
dependabot[bot] Jan 7, 2026
bff313a
fix workers crash (#5370)
kobenguyent Jan 9, 2026
20c0e8f
fix: import in config file (#5373)
kobenguyent Jan 9, 2026
b51b94e
chore(deps-dev): bump @wdio/utils from 9.21.0 to 9.23.0 (#5376)
dependabot[bot] Jan 12, 2026
505cd6d
chore(deps): bump envinfo from 7.20.0 to 7.21.0 (#5377)
dependabot[bot] Jan 12, 2026
b001712
chore(deps): bump @cucumber/messages from 31.1.0 to 31.2.0 (#5378)
dependabot[bot] Jan 12, 2026
0c43e5d
chore(deps-dev): bump @faker-js/faker from 9.8.0 to 10.2.0 (#5379)
dependabot[bot] Jan 12, 2026
d815dfc
chore(deps-dev): bump typedoc from 0.28.15 to 0.28.16 (#5380)
dependabot[bot] Jan 12, 2026
fe9ff24
Fix chaining cycle detected for promise error in Auth plugin (#5374)
DenysKuchma Jan 15, 2026
7b1c520
resolve TypeScript path aliases from tsconfig.json (#5375)
DenysKuchma Jan 15, 2026
d10f653
correct TypeScript type definitions for effect functions (#5395)
DenysKuchma Jan 18, 2026
314f46e
Improve waitUrlEquals error message to include actual error (#5383)
DenysKuchma Jan 18, 2026
6cedb9d
chore(deps): bump fs-extra from 11.3.2 to 11.3.3 (#5400)
dependabot[bot] Jan 19, 2026
4bad128
chore(deps-dev): bump @wdio/utils from 9.23.0 to 9.23.2 (#5398)
dependabot[bot] Jan 19, 2026
2454d9f
chore(deps-dev): bump sinon from 21.0.0 to 21.0.1 (#5397)
dependabot[bot] Jan 19, 2026
ea77b5d
chore(deps-dev): bump globals from 16.5.0 to 17.0.0 (#5396)
dependabot[bot] Jan 19, 2026
ee40437
fix TypeScript error stack traces (#5403)
DenysKuchma Jan 20, 2026
95c56ae
restore autocompletion for page objects in TypeScript (#5401)
DenysKuchma Jan 20, 2026
6f949c9
Export container as named export for ESM (#5382)
DenysKuchma Jan 20, 2026
9cca480
Add warning for ts-node/esm usage (#5381)
DenysKuchma Jan 20, 2026
061dc22
remove Custom Locator Strategy from playwright (#5405)
DenysKuchma Jan 21, 2026
98e0a5c
chore(deps): bump ai from 5.0.121 to 6.0.40 (#5399)
dependabot[bot] Jan 21, 2026
e8cf83a
chore(deps): bump @cucumber/gherkin from 37.0.1 to 38.0.0 (#5417)
dependabot[bot] Jan 26, 2026
ed579f4
chore(deps-dev): bump puppeteer from 24.33.0 to 24.36.0 (#5413)
dependabot[bot] Jan 26, 2026
1395271
chore(deps): bump chokidar from 4.0.3 to 5.0.0 (#5414)
dependabot[bot] Jan 26, 2026
1a58593
chore(deps-dev): bump electron from 38.2.0 to 40.0.0 (#5415)
dependabot[bot] Jan 26, 2026
5f7e6d9
chore(deps): bump @cucumber/messages from 31.2.0 to 32.0.1 (#5416)
dependabot[bot] Jan 27, 2026
b2e34ec
Feat/json locators esm (#5424)
DavertMik Feb 2, 2026
9d77feb
chore(deps-dev): bump globals from 17.0.0 to 17.3.0 (#5431)
dependabot[bot] Feb 2, 2026
b0caf47
chore(deps-dev): bump @wdio/utils from 9.23.2 to 9.23.3 (#5430)
dependabot[bot] Feb 2, 2026
fdbd8fa
chore(deps-dev): bump electron from 40.0.0 to 40.1.0 (#5429)
dependabot[bot] Feb 2, 2026
c7f6000
chore(deps-dev): bump eslint-plugin-mocha from 11.1.0 to 11.2.0 (#5428)
dependabot[bot] Feb 2, 2026
bb6410e
chore(deps): bump commander from 14.0.2 to 14.0.3 (#5427)
dependabot[bot] Feb 2, 2026
05d22f9
updated version to rc-1
Feb 9, 2026
20203f6
publish beta workflow
Feb 9, 2026
6326cdd
Add seeCurrentPathEquals method to ignore query strings (#5435)
DavertMik Feb 9, 2026
9512bb4
DOC: Autogenerate and update documentation
actions-user Feb 9, 2026
54f5c76
fixed publishing beta releases
Feb 9, 2026
5afd819
updated workflow
Feb 9, 2026
d91c695
Merge branch '4.x' of github.com:codeceptjs/CodeceptJS into 4.x
Feb 9, 2026
40f2efb
Simplify publish-beta workflow by removing steps
DavertMik Feb 9, 2026
9b9ba8b
Add --ignore-scripts option to npm publish command
DavertMik Feb 9, 2026
e011581
fix(publish): use OIDC and ignore-scripts env var for npm publish
Feb 10, 2026
72055f0
fixed publishing beta
Feb 15, 2026
83bb3c5
improved context methods (#5453)
DavertMik Feb 25, 2026
4a8b962
DOC: Autogenerate and update documentation
actions-user Feb 25, 2026
3a8ffa3
remove old logic and add testomatio reporter info (#5407)
DenysKuchma Mar 4, 2026
c64194a
Enhanced Retry Mechanisms - Remove Code Duplication (#5409)
DenysKuchma Mar 4, 2026
27eea12
Add AI Trace plugin for AI-assisted debugging (#5432)
DenysKuchma Mar 4, 2026
21e066c
Enable event dispatcher in workers (#5464)
DenysKuchma Mar 5, 2026
75b139f
implemented path normalization (#5451)
DavertMik Mar 6, 2026
aec3876
DOC: Autogenerate and update documentation
actions-user Mar 6, 2026
c61c2e5
fix: make XPath relative in buildLocatorString for within() scope (#5…
mirao Mar 8, 2026
c6a63d4
Fix aiTrace plugin (#5478)
DenysKuchma Mar 8, 2026
3f7d2bd
feat: add context parameter to appendField, clearField, attachFile (#…
DavertMik Mar 9, 2026
bdc5c67
DOC: Autogenerate and update documentation
actions-user Mar 9, 2026
ef6c3a9
feat: add dropzone support to attachFile (#5480)
DavertMik Mar 9, 2026
68a058d
DOC: Autogenerate and update documentation
actions-user Mar 9, 2026
8bc7722
fixed beta workflow
Mar 9, 2026
48efab6
Merge branch '4.x' of github.com:codeceptjs/CodeceptJS into 4.x
Mar 9, 2026
66368a3
fix: install dependencies before npm publish
Mar 9, 2026
0c0a519
fix: update repository URL for npm provenance
Mar 9, 2026
b6fe984
feat: add dropzone support to attachFile (#5486)
DavertMik Mar 17, 2026
9c9f5b6
feat: strict mode for all helpers + improved MultipleElementsFound er…
DavertMik Mar 17, 2026
04ae7f0
feat: add optional context parameter to moveCursorTo (#5492)
DavertMik Mar 17, 2026
1501b70
DOC: Autogenerate and update documentation
actions-user Mar 17, 2026
c3f3a45
DOC: rewrite retry.md — remove duplication, clarify healing section
DavertMik Mar 24, 2026
69115cf
DOC: update locators.md — add ARIA/role locators, context param, and …
DavertMik Mar 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
136 changes: 63 additions & 73 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@

Thanks for getting here. If you have a good will to improve CodeceptJS we are always glad to help. Ask questions, raise issues, ping in Twitter.

Go over the steps in [this](https://github.com/firstcontributions/first-contributions) guide as first contributions

To start you need:

1. Fork and clone the repo.
2. Run `npm i --force` to install all required libraries
3. Do the changes.
4. Add/Update Test (if possible)
5. Update documentation
6. Run `npm run def` to generate types
7. Run `npm run docs` if you change the documentation
8. Commit and Push to your fork
9. Make Pull Request
1. Fork the repo.
2. Run `npm install` to install all required libraries
3. Run `npm run def`to generate types
4. Do the changes.
5. Add/Update Test (if possible)
6. Update documentation
7. Commit and Push to your fork
8. Make Pull Request

To run codeceptjs from this repo use:

Expand All @@ -28,28 +25,21 @@ To run examples:
node bin/codecept.js run -c examples
```

Depending on a type of change you should do the following.

## Debugging

To see recorder queue in logs enable NodeJS debug output by passing `DEBUG=codeceptjs:*` env variable:

```
DEBUG=codeceptjs:* npx codeceptjs run
```
Depending on a type of a change you should do the following.

## Helpers

Please keep in mind that CodeceptJS have **unified API** for Playwright, WebDriverIO, Appium, Puppeteer, TestCafe. Tests written using those helpers should be compatible at syntax level. However, some helpers may contain unique methods. That happens. If, for instance, WebDriverIO has method XXX and Playwright doesn't, you can implement XXX inside Playwright using the same method signature.
Please keep in mind that CodeceptJS have **unified API** for WebDriver, Appium, Playwright, and Puppeteer. Tests written using those helpers should be compatible at syntax level. However, some of helpers may contain unique methods. That happens. If, for instance, WebDriver has method XXX and Playwright doesn't, you can implement XXX inside Playwright using the same method signature.

### Updating Playwright | Puppeteer | WebDriver
### Updating a WebDriver | Playwright | Puppeteer

_Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required! Do **not edit** `docs/helpers/`, those files are generated from docblocks in corresponding helpers! _
*Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required! Do **not edit** `docs/helpers/`, those files are generated from docblocks in corresponding helpers! *

Working test is highly appreciated. To run the test suite you need:

- selenium server + chromedriver
- PHP installed
* selenium server + chromedriver
* PHP installed

To launch PHP demo application run:

Expand All @@ -60,8 +50,9 @@ php -S 127.0.0.1:8000 -t test/data/app
Execute test suite:

```sh
mocha test/helper/WebDriver_test.js
mocha test/helper/WebDriverIO_test.js
mocha test/helper/Puppeteer_test.js
mocha test/helper/Nightmare_test.js
```

Use `--grep` to execute tests only for changed parts.
Expand All @@ -80,9 +71,21 @@ Then is should be accessible at:
http://localhost:8000/form/myexample
```

### Updating Protractor

*Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required! Do **not edit** `docs/helpers/`, those files are generated from docblocks in corresponding helpers! *

Protractor helper is based on [Protractor library](http://www.protractortest.org)

In case you do Protractor-specific change, please add a test:To run the test suite you need:

* selenium server + chromedriver

Demo application is located at: [http://davertmik.github.io/angular-demo-app](http://davertmik.github.io/angular-demo-app)

### Updating REST | ApiDataFactory

_Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required!_
*Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required!*

Adding a test is highly appreciated.

Expand All @@ -96,20 +99,30 @@ Edit a test at `test/rest/REST_test.js` or `test/rest/ApiDataFactory_test.js`

## Appium

_Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required! Do **not edit** `docs/helpers/`, those files are generated from docblocks in corresponding helpers! _
*Whenever a new method or new behavior is added it should be documented in a docblock. Valid JS-example is required! Do **not edit** `docs/helpers/`, those files are generated from docblocks in corresponding helpers! *

It is recommended to run mobile tests on CI.
So do the changes, make pull request, see the CI status.
Appium tests are executed at **Saucelabs**.
Appium tests are executed at **Semaphore CI**.

## Core Changes

Before applying any Core changes please raise an issue to discuss that change with core team.
Please try to add corresponding testcase to runner or unit.

## Typings

Typings is generated in `typings/` directory via `jsdoc`

After you updated docblock in JS file, generate typing files with next command:

```
npm run def
```

## Documentation

Documentation is stored in `/docs` directory in Markdown format.
Documentation is stored in `/docs` directory in markdown format.

**Documentation for helpers is a part of a source code**.

Expand All @@ -121,52 +134,17 @@ After you updated docblock in JS file, generate markdown files with next command
npm run docs
```

Documentation parts can be shared across helpers. Those parts are located in `docs/webapi/*.mustache`. Inside a docblock those files can be included like this:

```js
/**
* {{> click }}
*/
click() {
// ...
}
```

_Note:_ Due to the (lib)[https://documentation.js.org/] that we are using to generate docs, the fast and cheap way to fix format issue that text after the mustache template is appended without formatting is moving the texts to above the mustache template.

```js
/**
* // Before
* Click action
* {{> click }}
* Click action
*/
click() {
// ...
}
```
Documentation parts can be shared accross helpers. Those parts are located in `docs/webapi/*.mustache`. Inside a docblock those files can be included like this:

```js
/**
* // After
* Click action
* {{> click }}
*/
click() {
// ...
}
```

## Typings

Typings are generated in `typings/` directory via `jsdoc`

After you updated docblock in JS file, generate typing files with next command:

```
npm run def
```

## Testing

Whenever you implemented a feature/bugfix
Expand All @@ -188,7 +166,7 @@ mocha test/runner
Instead of manually running php, json_server and selenium for before tests you
can use `docker-compose` to run those automatically.
You can find `docker-compose.yml` file in `test` directory and run all commands
from this directory. Currently, we provide following commands to run tests with
from this directory. Currently we provide following commands to run tests with
respective dependencies:

#### Run unit tests
Expand All @@ -203,25 +181,28 @@ docker-compose run --rm test-unit
docker-compose run --rm test-helpers

# or pass path to helper test to run specific helper,
# for example to run only WebDriver tests:
docker-compose run --rm test-helpers test/helper/WebDriver_test.js
# for example to run only WebDriverIO tests:
docker-compose run --rm test-helpers test/helper/WebDriverIO_test.js

# Or to run only rest and ApiDataFactory tests
docker-compose run --rm test-helpers test/rest
```

#### Run acceptance tests

To that we provide three separate services respectively for WebDriver, Nightmare and Puppeteer tests:
To that we provide three separate services respectively for WebDriverIO, Nightmare, Puppeteer and
Protractor tests:

```sh
docker-compose run --rm test-acceptance.webdriverio
docker-compose run --rm test-acceptance.nightmare
docker-compose run --rm test-acceptance.puppeteer
docker-compose run --rm test-acceptance.protractor
```

#### Running against specific Node version

By default, dockerized tests are run against node 12.10.0, you can run it against
By default dockerized tests are run against node 12.10.0, you can run it against
specific version as long as there is Docker container available for such
version. To do that you need to build codecept's Docker image prior to running
tests and pass `NODE_VERSION` as build argument.
Expand All @@ -236,17 +217,26 @@ And now every command based on `test-helpers` service will use node 9.4.0. The
same argument can be passed when building unit and acceptance tests services.

### CI flow

We're currently using a bunch of CI services to build and test codecept in
We're currently using bunch of CI services to build and test codecept in
different environments. Here's short summary of what are differences between
separate services

#### CircleCI
#### TravisCI
Travis CI uses runs tests against Node 8 and Node 9. In total it uses 8 jobs to
build each helper against both Node versions. For every job it runs unit tests
first, then `ApiDataFactory` and `REST` tests present in `test/rest` directory.
Finally if those pass we run specific helper tests found in `test/helper`
directory. It doesn't run acceptance tests.
Config is present in `.travis.yml` file.

#### CircleCI
Here we use CodeceptJS docker image to build and execute tests inside it. We
start with building Docker container based on Dockerfile present in main project
directory. Then we run (in this order) unit tests, all helpers present in
`test/helpers`, then we go with `test/rest` directory and finally if everything
passed so far it executes acceptance tests. For easier maintenance and local
debugging CircleCI uses `docker-compose.yml` file from `test` directory.
You can find Circle config in `.circleci` directory.

#### Semaphore
Currently Semaphore runs only Appium helper tests.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* CodeceptJS version:
* NodeJS Version:
* Operating System:
* puppeteer || webdriverio || testcafe version (if related)
* puppeteer || webdriverio || playwright version (if related)
* Configuration file:

```js
Expand Down
1 change: 0 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Applicable helpers:
- [ ] REST
- [ ] FileHelper
- [ ] Appium
- [ ] TestCafe

Applicable plugins:

Expand Down
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/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ updates:
directory: '/'
schedule:
interval: 'weekly'
target-branch: '3.x'
target-branch: '4.x'
# npm
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
target-branch: '3.x'
target-branch: '4.x'
ignore:
- dependency-name: 'escape-string-regexp'
versions: ['>=5.0']
Loading