[fpc-pascal] The testcase example doesn't generate plain text report
mailinglists at geldenhuys.co.uk
Tue Nov 15 14:51:03 CET 2016
On 2016-11-15 09:06, luciano de souza wrote:
> So I runned the test with the following commandline:
> ./testrunner -a --format=plain
> However, the output produced was in XML.
I had a quick look at the source code of the demo included with FPCUnit.
Interestingly, it defines its own test runner and only handles XML or
LaTeX for the -l command line parameter - all other output is hard-coded
to XML. The demo doesn't use the consoletestrunner.pp unit for some reason.
If however you create your own test project, use the
consoletestrunner.pp unit, which defines TTestRunner. Use that as your
base class for your test suite application. It will then correctly
support the --format parameter for test output as well as test listing
// All test units go in here - shared between GUI and Console runners
TMyTestRunner = class(TTestRunner)
// override the protected methods of TTestRunner to customize its behavior
Application := TMyTestRunner.Create(nil);
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
My public PGP key: http://tinyurl.com/graeme-pgp
More information about the fpc-pascal