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

How can I know which test case covers which lines, and how many times? #209

Closed
maxxbw54 opened this issue Mar 19, 2018 · 1 comment
Closed

Comments

@maxxbw54
Copy link

maxxbw54 commented Mar 19, 2018

Hi authors,

Thank you for your pretty awesome tool! I like it very much!

So far, after apply solidity-coverage, I know how many times that a loop/statement/branch/function of a contract is executed.

One question I'd like to ask is that how can I know which lines of a smart contract have been run by which test case? For example, let's say the 3rd statement of contract A is executed 5 times during the test, how can I know which test cases contribute the 5 times executions?

Please kindly advise.

Thanks again for your great tool!

Bowen

@maxxbw54 maxxbw54 changed the title How do I know which test case covers which solidity file? How can I know which test case covers which lines, and how many times? Mar 19, 2018
@cgewecke
Copy link
Member

@XBWer We spoke on gitter - just summarizing our conversation here for anyone who is curious about this issue: @XBWer is interested in a fault-localization algorithm which takes the number of tests which target a line of code as an input parameter in order to evaluate how likely it is that the code might conceal a fault. Unfortunately coverage tools typically don't track this information, probably for separation of concerns reasons and because it would add quite of bit of complexity to their operation.

Going to close this because ultimately the data you need is outside the scope of this project.

@XBWer Thanks so much the link you shared with me about the research you're doing. Very interesting, hope your work goes well.

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