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

Which test hits which line #114

Open
pluma9 opened this issue Apr 8, 2024 · 1 comment
Open

Which test hits which line #114

pluma9 opened this issue Apr 8, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@pluma9
Copy link

pluma9 commented Apr 8, 2024

I'm not sure if this is the right place, but I'm looking for something like nebulab/reverse_coverage.

I need to know which tests hit a specific line.

My real life use case

I'm reading a large enterprise codebase with a lot of complex logic and a huge number of BDD tests. I stumble upon a mind-boggling piece of code which I don't know which business scenarios it is used for. I need to find a list of BDD tests that run through this code.

Running all tests in debug mode and put a breakpoint at the code may work. However, I need to do this multiple times, and I cannot re-run the whole test suite every time.

@jakubch1 jakubch1 self-assigned this Apr 9, 2024
@jakubch1 jakubch1 added the enhancement New feature or request label Apr 9, 2024
@jakubch1
Copy link
Member

jakubch1 commented Apr 9, 2024

@pluma9 we will be building something for this scenario in near future.

For now you can work on building such analysis on your side. Please check this sample: https://github.com/microsoft/codecoverage/blob/main/samples/Calculator/scenarios/scenario16/README.md
If you run each test 1 by 1 and collect cobertura report for each test (using snapshot) you can build mapping source file -> test and use it to find what you want.

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

No branches or pull requests

2 participants