cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.78k stars 3.17k forks source link

[IATR](M1.0) Test runner filtering #24855

Closed warrensplayer closed 1 year ago

warrensplayer commented 1 year ago

Add ability to filter tests for a spec in the runner to only the specs that failed in the cloud

Solution for filtering tests in the runner

To filter the tests in a way that will allow for the most flexibility with the developer experience, the following pattern should be followed:

Background of solution can be found in recorded Zoom found in internal Cypress Slack initiative channel here

Requirements

Clickup: https://app.clickup.com/t/18033298/PM-2546

warrensplayer commented 1 year ago

Hey team! Please add your planning poker estimate with Zenhub @amehta265 @astone123 @lmiller1990 @marktnoonan @mike-plummer @rockindahizzy @ZachJW34

lmiller1990 commented 1 year ago

Note: we have some logic around this already for Cypress Studio, which does a kind of "only run this test" when we are in "Studio" mode. I worked on Studio, so I can definitely provide some ideas. I'll write some below.

This requires hacking into Mocha internals. Luckily, Cypress does this already, so most of the patterns exist.

The App (Vue) and Reporter (React) generally communicate via the EventManager, so that will be how you implement this (it'll be similar to the workflow Studio uses).

It might be worth doing a small technical brief/prototype, or at least having a good think about how to implement this before you start coding. I think this is quite a tricky task, but a good opportunity to learn how the core of Cypress (driver, reporter, runner) work. I'd really recommend a quick prototype and then coming up with some ideas and running it by someone who knows the Cypress runner code well before writing a lot of code.


Here's some useful things that you might want to look at and considering when implementing this.

emilyrohrbough commented 1 year ago

How does this UI wrap when the Command Log is smaller or there are over 99 tests?