bahmutov / cypress-split

Split Cypress specs across parallel CI machines for speed
MIT License
200 stars 21 forks source link

Azure devops linux agent - Failing to read timings from timings.json #174

Open jbrangwyn opened 7 months ago

jbrangwyn commented 7 months ago

Hi, thanks for making such a great package.

cypress: 12.17.4 cypress-split: 1.17.0 command: npx cypress run --browser chrome --env split=4,splitIndex=1,splitFile=timings.json,DEBUG=cypress-split

I have generated a timings.json file, but when attempting to read the timings in an azure devops pipeline on a linux build agent, it's getting the same time for every test. Example: image However, run locally on a Windows 11 machine using the same command it appears to work fine. image

Would be great to get this working. Any suggestions much appreciated!

bahmutov commented 7 months ago

did you commit the timings file to the repo so it is there when it runs on CI?

jbrangwyn commented 7 months ago

Yes, I did.

On Tue, 28 Nov 2023, 00:14 Gleb Bahmutov, @.***> wrote:

did you commit the timings file to the repo so it is there when it runs on CI?

— Reply to this email directly, view it on GitHub https://github.com/bahmutov/cypress-split/issues/174#issuecomment-1828849754, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQS4AM2XX5NGRDJCYTBG56LYGUUGHAVCNFSM6AAAAAA74VMOBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRYHA2DSNZVGQ . You are receiving this because you authored the thread.Message ID: @.***>

jbrangwyn commented 7 months ago

I removed the timings file from the repo and now I see this:

2023-11-28T09:50:27.1208371Z [1] cypress-split: Could not split specs by duration 2023-11-28T09:50:27.1214975Z [1] Could not find timings.json based on the current working directory /agent/_work/1/s/tests/repo 2023-11-28T09:50:27.1215683Z [1] cypress-split: splitting as is by name

bahmutov commented 7 months ago

What is inside the timings.json file?

jbrangwyn commented 7 months ago

File content example of the top two entries: { "durations": [ { "spec": "cypress\\integration\\first.feature", "duration": 9859 }, { "spec": "cypress\\integration\\second.feature", "duration": 10935 } ] } I created it by running this command locally: npx cypress run --browser chrome --env split=1,splitIndex=1,splitFile=timings.json,DEBUG=cypress-split