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

Classification does not report 0% #120

Open
ozanerdem opened this issue Apr 29, 2016 · 2 comments
Open

Classification does not report 0% #120

ozanerdem opened this issue Apr 29, 2016 · 2 comments

Comments

@ozanerdem
Copy link

When I use RC_CLASSIFY, if it turns out that there are no test cases with that tag then nothing is reported. I think it would be more informative if a "0%" is printed.

If for some reason you think it's a bad idea, maybe this should be added to the documentation, as I was expecting to see the zero percentage in the output and spent a bit of time to figure out what was wrong.

@emil-e
Copy link
Owner

emil-e commented Apr 29, 2016

I don't think this is a bad idea per se but it's hard to implement since RapidCheck cannot know that there are tags that haven't been used. Also, a test case can have multiple tags in which case test cases will grouped after the whole set of tags.

For example, if we use tags foo and bar and baz, we might get:

OK, passed 100 tests
30.00% - foo
30.00% - bar
40.00% - bar, foo

That means there were 40 tests that had both bar and foo. However, it also means that there were no tests that had foo, bar, baz, foo, baz, bar, baz and so forth. Should we report each of these as 0%?

However, I agree that this should maybe be clarified in the documentation.

@ozanerdem
Copy link
Author

Okay, it makes a lot of sense after this explanation. The problem was that I thought I was using RC_CLASSIFY in a wrong way, but it turned out that I wasn't doing anything wrong but only my expectation was wrong :) So yeah, just adding another sentence to the documentation would help a lot. Thanks!

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

No branches or pull requests

2 participants