Closed denis-domanskii closed 9 months ago
@denis-domanskii The chunk indices are 0-based. So in your case I believe your problem is that you're starting with index 1 (i.e. SPLIT_INDEX=1), when you really should start with 0
@dannyskoog thank you!
So, how abut to start chunks from 1, not 0? This is a common way for Jest (https://jestjs.io/docs/next/cli#--shard):
jest --shard=1/3
jest --shard=2/3
jest --shard=3/3
and for Playwright (https://playwright.dev/docs/test-sharding):
npx playwright test --shard=1/4
npx playwright test --shard=2/4
npx playwright test --shard=3/4
npx playwright test --shard=4/4
@denis-domanskii Sure, it's debatable whether to use 0- or 1-based indices for chunks. But even though I'm not the author of this library I don't think that such breaking change is justified.
I also think that it's late to change, but maybe some ENV variable at least? Because, for example, TeamCity CI start count batches from 1, so I need an extra step to read TeamCity generated value, subtract 1 and then pass it to cypress-split as SPLIT_INDEX. Replacing all these stuff with simple SPLIT_START_INDEX=1 make my setup much convenient.
:tada: This issue has been resolved in version 1.6.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
It looks like cypress-split can't handle the situation when there is only 1 chunk and chunk index is 1. I understand that it has no sense, but I really need to support such a scenario (e.g. only 1 build agent is free), and expect that all specs will be executed as usual.
Log: