hoaproject / Test

The Hoa\Test library.
https://hoa-project.net/
11 stars 10 forks source link

Make a better CLI report #40

Closed Hywan closed 8 years ago

Hywan commented 9 years ago

So far, atoum's default CLI report says there is x files, y classes, z methods etc. It does not make sense. We must change that for x' test suites, y' test cases, z' assertions etc.

jubianchi commented 9 years ago

@Hywan the exact line is like:

Success (224 tests, 1789/1816 methods, 0 void method, 27 skipped methods, 26776 assertions)!

atoum does not count files but classes and calls them "tests". Then it report a number of executed method which is correct (where "test cases" would not) : a test method in atoum can be run 0,n times (0 = skipped) :

Given that, talking about "test cases" would be wrong because a method can contain several cases and we can't always count them correctly (actually).

BTW, you can easily customize the wording if you want, the only thing to do is create a custom report extending the atoum\reports\realtime\cli and change the result line

Hywan commented 9 years ago

@jubianchi In the context of Hoa, speaking about a test case is correct. We renamed the prefix to case_ and the content is atomic to one test case behavior. So no issue.

How can I extend and “inject” it? I guess I need to remove the existing one too?

jubianchi commented 9 years ago

@Hywan Ok fine if it OK for you :)

Take a look at this sample configuration file to see how to inject your custom report through the configuration file (.atoum.php) : https://github.com/atoum/atoum/blob/master/resources/configurations/runner/santa.php.dist

Hywan commented 9 years ago

@jubianchi Great, thanks!

Any volunteer @hoaproject/hoackers?

jubianchi commented 9 years ago

@Hywan I will try to provide you a custom report ;)

Hywan commented 9 years ago

@jubianchi Thanks!