Repository navigation
add instructions for running specific tests - #1980
Conversation
mrjones-plip
left a comment
There was a problem hiding this comment.
Hi Lore! I know you didn't send this out for review yet, but just offering some early feedback.
Also - I think we were going to mention how to mention a way to not build all the docker images too maybe?
| ```bash | ||
| # Run unit tests for admin module | ||
| npm run unit-admin | ||
|
|
||
| # Run unit tests for couchdb module | ||
| npm run unit-couchdb | ||
|
|
||
| # Run unit tests for API module | ||
| npm run unit-api | ||
|
|
||
| # Run unit tests for sentinel module | ||
| npm run unit-sentinel | ||
|
|
||
| # Run unit tests for shared-lib module | ||
| npm run unit-shared-lib | ||
|
|
||
| # Run unit tests for webapp module | ||
| npm run unit-webapp | ||
| ``` |
There was a problem hiding this comment.
This is great! I suggest instead of listing a bunch of examples of running an individual tests, I'd give and example to run just one. Then, list out how to find the rest. For example, for me, if type npm run unit and then hit the key to get autocomplete to fire and dynamically show all available:
$ npm run unit
unit unit-couchdb unit-sentinel
unit-admin unit-haproxy unit-shared-lib
unit-api unit-haproxy-healthcheck unit-webapp
unit-cht-deploy unit-nginx unit-webapp-continuous
| ``` | ||
|
|
||
| #### Isolating specific tests within a module | ||
| To run only specific test suites or individual tests within a module, you can use `describe.only` or `it.only` in your test files. |
There was a problem hiding this comment.
can you give a more specific example of exactly how to do this? Maybe deep link to a line number on a file and show the before and after?
|
|
||
| ```bash | ||
| # Run only the tests inside the pregnancy spec | ||
| npm run wdio-local -- --spec=pregnancy.wdio-spec.js |
There was a problem hiding this comment.
We should say wow to find a list of all e2e tests to run. I assume just specify the file name, but a deep link to the directory with all the files would be good.
alternately, walking the user down the sub directories in /tree/master/tests/e2e to find the specific pregnancy.wdio-spec.js could work instead. We could use the filetree feature maybe??
dianabarsan
left a comment
There was a problem hiding this comment.
This is great! I only left one comment about adding an example of how to run a specific wdio suite.
* add instructions for running specific tests * implemented feedback
Description
Add instructions on how to run specific tests.
Closes #1960
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.