redding / assert

Assertion style testing framework.
https://github.com/redding/assert
MIT License
10 stars 1 forks source link

accumulate: rework the default view to accumulate test data #270

Closed kellyredding closed 8 years ago

kellyredding commented 8 years ago

This implementation no longer relies on the test objects stored on the suite. This is part of switching to no longer storing test objs that were run and the result objs those tests produced.

This new implementation optionally accumulates test data needed for presentation. This test data is only needed if running in verbose mode or profiling. Test data is stored by its file line in a hash on the view. As results come in, the test data's result count is incremented. When the test is finished, the run time and result rate are captured. This, plus the static attrs captured when the test begins, is all the data needed for presentation in both the verbose and profile scenarios.

Due to these changes all of the suite's test handling methods can be removed. All test handling is now expected to be done by the views themselves (since they are the users of the test data).

Finally this commonizes and reworks the helper methods for calculating formatted run time, test rates and result rates. These were being duplicated across the config helpers (for suite stats) and the view helpers (for verbose/profile stats). This commonizes them and reworks them for the new test data needs.

@jcredding ready for review.

jcredding commented 8 years ago

@kellyredding - Looks good :boom: