Changes in Tester 1.4.0
The Nette Tester 1.4.0 has been released one month ago. I would like to describe new features now, they are in the name of XML.
The code coverage functionality (via
parameter) is present in the Tester for a long time. Report is formatted in an
HTML, pleasant for programmer eyes. The Tester supports XML format now, perfect
for a machine processing. The format is known as a CloverXML format. It is
borrowed from the Java world, but it is quite spreaded in the PHP world too. For
example, PhpStorm and Netbeans IDEs can load such report and helps you to
visualize, how is the code covered by tests. The CloverXML format is supported
by some CI tools too, e.g. Scruntinizer and Jenkins CI, or by specialized services like
Coveralls. If you are curious how the
CloverXML format looks like, you can take a look at Tester's test.
And how to generate such report? Simply use the
The file extension is important.
Next new feature is related to XML too. Parameter
format) has been extended for the
junit value and it means JUnit XML
format. So, the Tester prints tests result as an XML into console by
-o junit. It is friendly for a machine processing, e.g. for the Circle CI service.
The last change, I would like to describe here, looks like
Tester's internal thing. Tester's source files has been moved from the
Tester directory into
src directory. If you are using
the Composer's autoload, do not worry. But if you are loading the Tester
require 'tester/Tester/bootstrap.php', change the path.
The old path still works, but will be sooner or later removed.
And that's all. A list of all small changes can be found in the release notes.