dennisbergevin / cypress-plugin-last-failed

A companion Cypress plugin for `cy-grep` that re-runs the last failed test(s).
MIT License
12 stars 2 forks source link

running failed test duplicates in cypress cloud #9

Closed SaadCypress closed 1 month ago

SaadCypress commented 1 month ago

When we rerun the test cases in cypress cloud. Instead of showing as second retry it runs as duplicate test cases and change the spec count for instance from 5 to 10.

Screenshot 2024-09-17 at 3 25 23 AM
dennisbergevin commented 1 month ago

Hello @SaadCypress, thank you for reaching out.

Could you help me better understand your goals for using the plugin by providing a little more context?

SaadCypress commented 1 month ago

@dennisbergevin thanks for your response. I actually want the rerun test cases to show as second retry rather showing the retried test cases separately. This way cypress cloud will also mark those cases as flaky which will be passed after the second retry. We cant use cypress retry functionality as our cases are data dependent and data is retrieved from the db before execution of test cases

dennisbergevin commented 1 month ago

@SaadCypress Thanks for providing a bit more context.

To tease the problem here, I wanted to unpack some thoughts:

  1. This plugin does not mean to act as a retry, it is more an isolation of what tests failed from previous run that can be run outside the constraint of a single run. This is why the plugin has it's own run command npx cypress-plugin-last-failed run separate from the standard cypress run command.
  2. The Cypress cloud dashboard service is not open source code, so I'm not entirely sure what logic would be used to determine how tests are shown in that UI versus the behavior of this plugin.

Apologies if this news doesn't help you meet your goal here, but please let me know if you have questions!

SaadCypress commented 1 month ago

i got your point. Thank you for your kind response.