I’m trying to try out the new fail fast test feature.
I was looking at this thread for help on getting my tests to run. [Product Launch] Preview - Fail tests faster - #6 by drilon241
I have my tests running, but they are slower than what I had previously working.
Previously I had this job:
test:
executor: mocha
parallelism: 5
steps:
- run:
name: Mocha
...
command: |
circleci tests glob "test/**/test-*.js" \
| awk -v P="$(pwd)" '{print P"/"$0}' \
| circleci tests split --split-by=timings \
| xargs yarn run cover
- store_test_results:
path: ~/my-app/tmp/test-results/junit
and this is my latest attempt at converting to using fail-fast with split by timings, which the split by timing doesn’t seem to be working at all now as I’m seeing a similar message as No timing found for "test/my-file.js"
for every test file I have.
test:
executor: mocha
parallelism: 5
steps:
- run:
name: Mocha
...
command: |
circleci tests glob "test/**/test-*.js" \
| circleci tests run \
--verbose \
--batch-count=3 \
--fail-fast \
--split-by=timings \
–-test-results-path="~/my-app/tmp/test-results/junit" \
--command="xargs yarn run cover"
- store_test_results:
path: ~/my-app/tmp/test-results/junit
Any idea on how to make my tests split by timing correctly and also fail fast?