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

RFE: generate a sourcemap of what code affects which tests #427

Open
mathstuf opened this issue Oct 29, 2024 · 4 comments
Open

RFE: generate a sourcemap of what code affects which tests #427

mathstuf opened this issue Oct 29, 2024 · 4 comments

Comments

@mathstuf
Copy link

It would be nice to be able to generate some kind of database that records what tests cover which source lines. This could then be consumed by something like nextest in conjunction with git diff to only run tests that are affected by the changes in a patch to avoid running the entire test suite all the time.

@mathstuf
Copy link
Author

As a bonus, CI could also mutate just the diff and run tests in that direction too.

@sourcefrog
Copy link
Owner

This is similar to #24.

But, maybe here you're saying we could remember which specific tests failed due to each specific mutation?

@mathstuf
Copy link
Author

But, maybe here you're saying we could remember which specific tests failed due to each specific mutation?

Yes. When discussing with colleages, they suggested doing it by coverage, but I'm not aware of any coverage tools that save such information in a per-test bucket (especially in-process testing like Rust's #[test] or pytest).

@sourcefrog
Copy link
Owner

Yes, I think it's an interesting idea. I think it's more closely connected to a coverage tool than to cargo-mutants, and it would probably require running each test separately like Nextest does.

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