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

Use scores to evalute test results #4

Merged
merged 28 commits into from
Aug 19, 2015
Merged

Use scores to evalute test results #4

merged 28 commits into from
Aug 19, 2015

Conversation

orangejulius
Copy link
Member

As described in the fuzzy tests story, this PR adds a ton of functionality to enable individual tests to be evaluated not just on a pass fail, but by a numeric score that can be influenced by specifying weights for individual values.

In addition there is a TON of refactoring that was very needed to make this change easy. There are now lots of individual files with very focused responsiblity, lots of unit tests, and lots of comments.

Fixes #2

This hopefully makes things a bit mroe readable
Note, this removes the functionality to distinguish priority threshold
failures.
It only handles unweighted scores, and does not return any information
for error messages.
This is a bit of a big commit that implements all of the score based
testing.

The expected properties, unexpected properties, and priorityThresh are
all scored now, instead of simply pass fail.

It does quite a bit of fiddling with the values passed around, to make
things slightly cleaner.

Things it doesn't implement:
* cleaning up setting up the test cases
* actually passing configurable weights to test cases (though the
  scoring methods can handle it)

TODO:
* improve error handling quite a bit
* add a few more test cases
* add more comments
This message isn't currently used, but it could be nice to display some
day.
This was needed only because some code elsewhere was not doing its job.
Previously, it was all in eval_test and was taking up quite a bit of
space there.
Reduce, while sharing a name with the method on Array, is a little
confusing not in context.
These conditions were only needed because code elsewhere wasn't properly
sanitising the test case in one place.
This context properly adjusts locations, priorityThresh, and weights for
every individual test case.
This creates a helper function setDefaultWeights that fully handles
setting all default weights in one place, allowing some default setting
in other functions to be removed.
This prevents having to pass a large number of arguments all the time
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

Successfully merging this pull request may close these issues.

1 participant