Skip to content

Commit ace1ee1

Browse files
committed
docs: update how to run tests section
1 parent 53a870f commit ace1ee1

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,23 @@ IDEs from this link before raising a pull request: https://www.sonarlint.org/
7575
* `npm run release:dev`, `npm run release:staging`, `npm run release:prod`
7676
* The release artifacts to host will be in `dist` folder.
7777

78-
## Running tests
78+
## Running and debugging tests in browser
79+
This is the easiest and preferred way to run Phoenix tests.
7980
* run `npm run zipTestFiles` in the terminal.
8081
* NB: this will setup all the required files for test
8182
* Use chrome/edge browser to navigate to Phoenix[http://localhost:8000/src/index.html](http://localhost:8000/src/index.html)
8283
* In Phoenix Menu, select `Debug > run Tests` To open the test runner.
8384
* Run tests as required.
8485
* NB: To reset test data files, click on `reset and reload tests` option in the test runner.
86+
* You can use the browser dev tools to debug.
87+
88+
## Running and debugging tests in headless mode or in GitHub Actions
89+
We use [Playwright](https://playwright.dev/) to run the headless version of our tests.
90+
Please note that we do not use Playwright as our actual test framework, but as a headless browser(chrome and firefox)
91+
to run our tests written in Jasmine/Mocha.
92+
* run `npm run test` in the terminal to run the tests run in GitHub actions.
93+
* To debug the tests, `npm run testDebug`. However, we recommend using the
94+
above `Running tests in browser` section to actually fix/debug tests that are failing in the pipeline.
8595

8696
### Running tests in dev staging and prod stacks
8797
* To run tests against these stacks go to the following url:

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
"serveTest": "http-server . -p 5000 -c-1",
5050
"zipTestFiles": "gulp zipTestFiles",
5151
"test": "npx playwright test",
52+
"testDebug": "npx playwright test --debug",
5253
"testChromium": "npx playwright test --project=chromium",
5354
"testFirefox": "npx playwright test --project=firefox",
5455
"buildonly": "gulp build",

0 commit comments

Comments
 (0)