boxblinkracer / cypress-testrail

A decoupled TestRail integration for your Cypress project to easily send results to TestRail
MIT License
32 stars 24 forks source link

Cypress 13.0, cannot upload results to test rail #38

Closed VoorheesM closed 8 months ago

VoorheesM commented 1 year ago

when running a test the following message is desplayed:

TestRail >> Sending case results to run R563: C135

Could not send list of TestRail results: 400 Bad Request >> Field :results.elapsed is not in a valid time span format.

this was not that case right before updating to cypress 13.0 so it looks like something was changed there causing this issue

boxblinkracer commented 1 year ago

Hi there

oh ok, thank you so much for letting me know I'll upgrade our cypress project and give it a try

M4xymS commented 1 year ago

As a temporary solution, simply change the TestData constructor. @VoorheesM #39

harishigg commented 1 year ago

Having same issue "Could not send list of TestRail results: 400 Bad Request >> Field :results.elapsed is not in a valid time span format."

boxblinkracer commented 11 months ago

Hi there

has been fixed with 2.8.1, forgot to mention it here

also current dev-master has a fix for the broken screenshots (which also changed in cypress 13 haha)

natalivoloshyn commented 9 months ago

Hi there, This issue is still reproducible on 2.8.2 We run tests using tag - so not all tests are launched. Previously results of Pending tests were not pushed to TestRail. image

boxblinkracer commented 9 months ago

hi there

thank you so much

yeah theres a new case somehow NANs is a value inside

so i updated to allow the check if the field doesnt even exist in cypress. but in ur case it exists but with an invalid value

i guess thats maybe only with a special combination in any way

i can fix that. shouldnt be hard

thx for ur help on that :)

boxblinkracer commented 9 months ago

ok I found it with a new jest test pretty sure undefined happens, ill add a fix

Screenshot 2023-12-29 at 16 28 47
boxblinkracer commented 9 months ago

should work now, can you give it a try with the latest dev-master (please also note, axios has been updated, so you might need to reinstall node-modules if sth is weird)

natalivoloshyn commented 8 months ago

Hello, Unfortunatelly this issue is still present if there are 3 and more tests image

boxblinkracer commented 8 months ago

Hi

thanks for reporting this

I've found indeed a scenario with your description, so in cypress 13, skipped tests have a duration of "0". Unfortunately because of a not-so-good-implicit if (data.duration) check, it went into checking attempt array from old Cypress <= v12...which of course didnt work either...so "NaN" was back as value

in the end a single jest-unit test was missing and showed the error

i've restructured it a bit more to cover more cases and its working now for me

can you check out dev-master and tell me if its working?

sorry for the inconvenience

natalivoloshyn commented 8 months ago

dev-master

hi,

we have tested this fix and it work great 👌 Thank you very much for it. we are waiting for the next release ❤️

boxblinkracer commented 8 months ago

perfect thanks for the feedback

release will come soon...fixing something else and then :)

boxblinkracer commented 8 months ago

released with 2.10.0