Closed warrensplayer closed 1 year ago
Hey team! Please add your planning poker estimate with Zenhub @amehta265 @astone123 @lmiller1990 @marktnoonan @mike-plummer @rockindahizzy @ZachJW34
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.
console.log
to get a feel for how it works. For this task, we will basically want to do the programmatic equivalent of adding it.only
to each of the tests we'd like to run.How does this UI wrap when the Command Log is smaller or there are over 99 tests?
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:
runId
will be passed to the spec runner that will indicate which Cloud run should be used to filter the testsrunId
and spec path and will get back a list of test names and their status (PASSED, FAILED, PENDING, etc.)Background of solution can be found in recorded Zoom found in internal Cypress Slack initiative channel here
Requirements
Add new parameter to
/specs/runner
url to allow filtering tests by runrunId={runId}
to enable filterShow a badge in the reporter header (
packages/reporter/src/header/header.tsx
) to indicate the tests are being filteredFilter tests in runner to only run failed tests that match from a run in the cloud
Clickup: https://app.clickup.com/t/18033298/PM-2546