Edmund/Buck,
That's a great thought! I don't have any existing tests with a teardown
so I added a teardown to one of my simple suites; all it has is a dsply
so there's something that executes. I now see the same thing as you -
only one of the procedures shows coverage.
When I changed to .Append to previous run. I see coverage for all the
procedures. Give it a try.
I have once again tested this, but with no luck :(
Using the following procedure,
Right click on my program object > Code Coverage (prompt) > Batch
Leave all tabs at default except for:
https://dl.dropboxusercontent.com/u/3229426/start.png
and
https://dl.dropboxusercontent.com/u/3229426/Append.png
Teardown code is as follows:
https://dl.dropboxusercontent.com/u/3229426/Teardown.png
In the teardown code above the close mode of GetClientRate (which is the
API that I am running code coverage for) switches LR *on and returns
(which I suspect may be the cause of the issue ?!?)
Running the coverage gives me exactly the same results: No Main
procedure coverage at all (identified by buck as an issue with programs
with prototyped entry parameters) and coverage which only covers one of
the test cases.
Spooled output from the run shows that all test cases have run:
*** Tests from TSB.GETCLR ***
Success. 45 test cases, 131 assertions, 0 failure, 0 error.
Running the same RUCALLTST command with a breakpoint on one of the lines
which the coverage report shows in RED (Not Run), breaks during three of
the test cases, proving that this line is covered by multiple test
cases.
Regards
Aaron Price
From: WDSCI-L <wdsci-l-bounces@xxxxxxxxxxxx> [mailto:WDSCI-L
<wdsci-l-bounces@xxxxxxxxxxxx>] On Behalf Of Edmund Reinhardt
<edmund.reinhardt@xxxxxxxxxx>
Sent: 06 June 2014 22:24
To: Rational Developer for IBM i / Websphere Development Studio Client
for System i & iSeries <wdsci-l@xxxxxxxxxxxx>
Cc: "WDSCI-L" <wdsci-l-bounces@xxxxxxxxxxxx>
Subject: Re: [WDSCI-L] RDi 9.1 Code coverage tool - Main Procedure not
covered
Buck is on the money.
Use the append settings that he has documented to accumulate the
coverage
of all calls to a program.
Regards,
Edmund (E.H.) Reinhardt
Technical Architect for Rational Developer for i
Phone: 1-905-413-3125 | Home: 1-905-854-6195 IBM
E-mail: edmund.reinhardt@xxxxxxxxxx
RDi YouTube: 8200 Warden Ave
www.youtube.com/user/IBMRational#g/c/62DF24D5BCD43501 Markham, ON L6G
1C7
Find me on: LinkedIn: Canada
http://ca.linkedin.com/in/edmundreinhardt/
From: Buck Calabro < kc2hiz@xxxxxxxxx>
To: wdsci-l@xxxxxxxxxxxx,
Date: 06/06/2014 05:05 PM
Subject: Re: [WDSCI-L] RDi 9.1 Code coverage tool - Main Procedure not
covered
Sent by: "WDSCI-L" < wdsci-l-bounces@xxxxxxxxxxxx>
On 6/6/2014 3:31 PM, Aaron Price wrote:
Buck,
Reading your post I think I have just realised what may be happening.
Do
you have a teardown routine in the test you are running?
No, no teardowns for me. I haven't had to deal with variable overrides
/ library lists / temporary files being dynamically swapped between
tests.
I am 99% sure (I have no AS400 access till Monday to check) that there
is
a teardown routine in the one I am running which is closing down the
program/temporary files/overrides etc between each test run. Judging
by
this, http://rpgunit.sourceforge.net/cookbook.html#tear-down-close-all
it
looks like the teardown routine does execute between each test case.
This may explain why it is only showing the final run of the
program... if
it is this though as I would still expect the amalgamated results for
the
entire batch job to be shown, sounds like a bug in RDi
That's a great thought! I don't have any existing tests with a teardown
so I added a teardown to one of my simple suites; all it has is a dsply
so there's something that executes. I now see the same thing as you -
only one of the procedures shows coverage.
When I changed to .Append to previous run. I see coverage for all the
procedures. Give it a try.
--buck
As an Amazon Associate we earn from qualifying purchases.