Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jbrangwyn opened this issue Nov 27, 2023 · 5 comments
Open

Comments

@jbrangwyn
Copy link

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
Copy link
Owner

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

@jbrangwyn
Copy link
Author

jbrangwyn commented Nov 28, 2023 via email

@jbrangwyn
Copy link
Author

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
Copy link
Owner

What is inside the timings.json file?

@jbrangwyn
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants