Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR suggestion- show which spec executed a code. #1031

Open
thebravoman opened this issue Oct 13, 2022 · 1 comment
Open

PR suggestion- show which spec executed a code. #1031

thebravoman opened this issue Oct 13, 2022 · 1 comment

Comments

@thebravoman
Copy link

simple cov shows the number of time a code was executed, but not which spec was responsible for executing this code.
I could not find this as a feature and I thought it will be interesting for us to implement it.

Would this be accepted as a PR?

You click on the "Number of times the line was executed" and you see a table of the specs that were running when the line was touched, possibly even the stack trace.

What this will allow us is to quickly see which specs are testing a certain method.

In our new project there are a lot of specs both system and model and some of the code is tested through system specs but because system specs test a lot of things and test a feature on a high level it is difficult to quickly understand which system spec tested what.

This also allows us to identify cases where we are overtesting. Probably a few system specs are doing similar things and we can easily get rid of them and reduce the number of specs we have to support and also the execution time of the specs.

Let me know your thoughts

@alexsro
Copy link

alexsro commented Oct 20, 2022

UP!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants