Hi,
I have an idea on improving the console runner output. Running the
app as show below, it always defaults to xml output, which gives you a
strange undesired result when combine with other parameters. What if
we change the default output (when no --format has been specified) to
just print a summary when the tests are complete.
That way if specify the params '-a -p' we will get
Example 1:
./fpcunitTextM2 -a -p
....................
Number of run tests: 20
Number of errors: 0
Number of failures: 0
And if we specify the params '-a -p --file=results.xml' we will get
Example 2:
./fpcunitTextM2 -a -p --file=results.xml
....................
Number of run tests: 20
Number of errors: 0
Number of failures: 0
The default --format= was applied because the --file= triggered it.
So xml output will appear in the results.xml file and the above output
to the console window.
And if we specify the params '-a -p --format=plain' we will get
Example 3:
./fpcunitTextM2 -a -p --format=plain
Test: TTestSlideParser.IsTest
Test: TTestSlideParser.CreateSlide
Test: TTestSlideParser.ReferenceNumber
Number of run tests: 20
Number of errors: 0
Number of failures: 0
...because the --format was applied it overrides the -p parameter and
just ouputs the --format specified to the console window. No '.' are
printed between every 'Test:...' line.
And if we specify the params '-a -p --format=plain --file=results.xml'
we will get
Example 4:
./fpcunitTextM2 -a -p --format=plain --file=results.xml
....................
Number of run tests: 20
Number of errors: 0
Number of failures: 0
...because the --file= was specified, the -p parameter is active
again (unlike example 3) and outputs the progress and summary to the
console and the test results to the results.xml file.
And the last one, if we specify the params '-a' we will get
Example 4:
./fpcunitTextM2 -a
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="results.xsl"?>
<TestResults>
<!-- Generated using FPCUnit on 2006-10-26 11:11:18-->
<TestListing>
....snip....
As normal. No '.' are printed, and the to default --format= output is
applied and printed to the console window. Or should be instead only
print the summary?
---------- Current undesired output -----------------------
./fpcunitTextM2 -a -p
....................<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="results.xsl"?>
<TestResults>
<!-- Generated using FPCUnit on 2006-10-26 10:48:41-->
<TestListing>
...snip....
----------- END ----------------------
Any thoughts on the above?
Regards,
- Graeme -
--
There's no place like 127.0.0.1
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives