alco / benchfella

Microbenchmarking tool for Elixir
MIT License
516 stars 22 forks source link

Create a test suite for the Mix tasks #27

Open alco opened 9 years ago

bbense commented 9 years ago

I've made a first pass at a simple test.

https://github.com/bbense/benchfella/tree/mix_task_test

alco commented 9 years ago

Hey @bbense,

Sorry for not getting back to your earlier. The issue with multiple invocations of Benchfella needs to be solved at the architectural level. Currently it is invoked from an at_exit callback and the code doesn't have any special measures guarding against repeated initialization of ETS tables and other things.

As for testing the tasks, the primary focus should be on verifying that all options work. The output should only be checked for basic clues that indicate that the expected tests are running. Since there will be more than one output format and the current format is likely to change in the future, I wouldn't advise comparing the whole output against a string.