cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.

Home Page:https://cypress.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Making Cypress app extensible

alirezamirian opened this issue · comments

What would you like?

Cypress has great support for extensibility via plugins, already. I'd like to be able to extend the Cypress app too.

Why is this needed?

Cypress app is extensively used during development, to run and debug the tests. As with many other development tools (like editors, terminals, etc.), being able to extend it via plugins makes it a more useful tool.
Plugin developers have already tried to create plugins to extend/customize Cypress app, by rather hacky approaches:

Even something like Cypress Studio could have been a plugin, given the right extension points.

Another idea that initially made me want to create a plugin is to add a button (next to the header controls) in Cypress App to add .only to all failed cases after running a suite. It would be handy to be able to focus on failed test cases when working on a component and the changes have made a few test cases fail.

Another use case that comes to mind is for custom visual snapshot testing commands to be able to offer a UI for showing the image diff, updating the snapshots, etc., accessible from a special button that would appear on the logs of that command.

Other

Downsides

  • Any API for extending Cypress app would mean expanding the public API of Cypress, which may be an overhead in the maintenance of the Cypress app, which currently is more of a black box to the users of Cypress.