I'm working on my first project in which I'm utilizing PHPUnit for unit testing. Things have been moving along nicely; however, I've started getting the following output with recent tests:
................................................................. 65 / 76 ( 85%)
...........
Time: 1 second, Memory: 30.50Mb
OK (76 tests, 404 assertions)
I cannot find any information about what the "65 / 76 ( 85%)" means.
Does anyone know how to interpret this?
Thanks!
In computer science, code coverage is a measure used to describe the degree to which the source code of a program is tested by a particular test suite. A program with high code coverage has been more thoroughly tested and has a lower chance of containing software bugs than a program with low code coverage.
PHPUnit is a framework independent library for unit testing PHP. Unit testing is a method by which small units of code are tested against expected results. Traditional testing tests an app as a whole meaning that individual components rarely get tested alone.
In basic terms, unit testing means that you break your application down to its simplest pieces and test these small pieces to ensure that each part is error free (and secure). This testing is automated and written by software engineers as part of their development process.
It means the amount of tests that have been run so far (test methods actually, or to be even more precise: test method calls, because each test method can be called several times).
65 / 76 ( 85%)
65 tests of 76 have already run (which is 85% overall)
And as long as you see dots for each of them - all of them passed
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With