[fpc-pascal] The testcase example doesn't generate plain text report

luciano de souza luchyanus at gmail.com
Wed Nov 16 12:38:41 CET 2016


Graeme,
Between my message and yours, I found your TestFramework. It worked
imediately, I liked, so I changed from FPCUnit to TestFramework.
In examples, I used check, checkequals, fail... Excelent! The single
feature I couldn't understand is "CheckException".
I have this code:

procedure TGroupTest.InsertRecord;
begin
FGroup.name = 'Geography';
FMapper.add(FGroup);
FMapper.apply;
end;

An exception can be raised in "FMapper.apply", but I could understand
the usage of CheckException.
The TestFramework, running only with this code, says that no errors
were found, but alerts to the fact that no tests were done in this
method of the Testcase.

2016-11-15 7:06 GMT-02:00, luciano de souza <luchyanus at gmail.com>:
> Hello all,
> I am trying to run testcases.
> For testing the idea, I compile the example contained in:
>
> ./fpc-3.0.0/packages/fcl-fpcunit
>
> The compilation was successful.
>
> As I am blind, the XML format is very unpleasant becose the output is
> too verbose.
>
> So I runned the test with the following commandline:
>
> ./testrunner -a --format=plain
>
> However, the output produced was in XML.
>
> What am I doing wrong.
>
> See the output:
>
> <test name="TTestCaseTest.TestSetUp">
> </test>
> <test name="TTestCaseTest.TestAsString">
> </test>
> <test name="TTestSuiteTest.CheckCountTestCases">
> </test>
> <test name="TTestSuiteTest.TestExtractMethods">
> </test>
> <test name="TAssertTest.TestEqualsInt">
> </test>
> <test name="TAssertTest.TestEqualsInt64">
> </test>
> <test name="TAssertTest.TestEqualsCurrency">
> </test>
> <test name="TAssertTest.TestEqualsDouble">
> </test>
> <test name="TAssertTest.TestEqualsBoolean">
> </test>
> <test name="TAssertTest.TestEqualsChar">
> </test>
> <test name="TAssertTest.TestEqualsTClass">
> </test>
> <test name="TAssertTest.TestEqualsTObject">
> </test>
> <test name="TAssertTest.TestNull">
> </test>
> <test name="TAssertTest.TestNullInterface">
> </test>
> <test name="TAssertTest.TestNotNull">
> </test>
> <test name="TAssertTest.TestNotNullWithInterface">
> </test>
> <test name="TAssertTest.TestNotNullInterface">
> </test>
> <test name="TAssertTest.TestFailEqualsInt">
> </test>
> <test name="TAssertTest.TestFailEqualsInt64">
> </test>
> <test name="TAssertTest.TestFailEqualsCurrency">
> </test>
> <test name="TAssertTest.TestFailEqualsDouble">
> </test>
> <test name="TAssertTest.TestFailEqualsBoolean">
> </test>
> <test name="TAssertTest.TestFailEqualsChar">
> </test>
> <test name="TAssertTest.TestFailEqualsTClass">
> </test>
> <test name="TAssertTest.TestFailEqualsTObject">
> </test>
> <test name="TAssertTest.TestFailNull">
> </test>
> <test name="TAssertTest.TestFailNullInterface">
> </test>
> <test name="TAssertTest.TestFailNotNull">
> </test>
> <test name="TAssertTest.TestFailNotNullInterface">
> </test>
> <test name="TAssertTest.TestAssertException">
> </test>
> <test name="TAssertTest.TestComparisonMsg">
> </test>
> <test name="TListenerTest.TestStartAndEndTest">
> </test>
> <test name="TListenerTest.TestAddError">
> </test>
> <test name="TListenerTest.TestAddFailure">
> </test>
> <test name="TListenerTest.TestSetUpTearDown">
> </test>
> <test name="TListenerTest.TestSetUpException">
> </test>
> <test name="TListenerTest.TestTearDownException">
> </test>
> <test name="TTestDecoratorTest.TestRun">
> </test>
> <test name="TTestDecoratorTest.TestOneTimeSetup">
> </test>
> <test name="TMoneyTest.testBagCreate">
> </test>
> <test name="TMoneyTest.testBagMultiply">
> </test>
> <test name="TMoneyTest.testBagNegate">
> </test>
> <test name="TMoneyTest.testBagSimpleAdd">
> </test>
> <test name="TMoneyTest.testBagSubtract">
> </test>
> <test name="TMoneyTest.testBagSumAdd">
> </test>
> <test name="TMoneyTest.testIsZero">
> </test>
> <test name="TMoneyTest.testMixedSimpleAdd">
> </test>
> <test name="TMoneyTest.testBagNotEquals">
> </test>
> <test name="TMoneyTest.testMoneyBagEquals">
> </test>
> <test name="TMoneyTest.testMoneyEquals">
> </test>
> <test name="TMoneyTest.testSimplify">
> </test>
> <test name="TMoneyTest.testNormalize2">
> </test>
> <test name="TMoneyTest.testNormalize3">
> </test>
> <test name="TMoneyTest.testNormalize4">
> </test>
> <test name="TMoneyTest.testPrint">
> </test>
> <test name="TMoneyTest.testMoneyBagPrint">
> </test>
> <test name="TMoneyTest.testSimpleAdd">
> </test>
> <test name="TMoneyTest.testSimpleBagAdd">
> </test>
> <test name="TMoneyTest.testSimpleMultiply">
> </test>
> <test name="TMoneyTest.testSimpleNegate">
> </test>
> <test name="TMoneyTest.testSimpleSubtract">
> </test>
> <test name="TMoneyTest.testOperators">
> </test>
> </testlisting>
> <NumberOfRunnedTests>62</NumberOfRunnedTests>
> <NumberOfErrors>0</NumberOfErrors>
> <NumberOfFailures>0</NumberOfFailures>
> </testresults>
>
>
>
> --
> Luciano de Souza
>


-- 
Luciano de Souza



More information about the fpc-pascal mailing list