Opened 13 years ago

Closed 12 years ago

#9187 closed defect (fixed)

Current test status report should consider only last result of a testcase in the plan

Reported by: anonymous Owned by: Roberto Longobardi
Priority: highest Component: TestManagerForTracPlugin
Severity: blocker Keywords:
Cc: podskalsky Trac Release: 0.12


Currently when I select a testplan with two test cases the pie chart totals at 7 results. This information is easily available already in test activity trend stats. What would be useful to see here, is the number of cases that have last status as success and fail.

Attachments (1) (4.2 KB) - added by podskalsky 12 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 13 years ago by Roberto Longobardi

Hi, I'll take a look at this asap.

Ciao, Roberto

comment:2 Changed 13 years ago by podskalsky

Priority: normalhighest
Type: enhancementdefect

Hello Roberto;

we have the same problem !!! The "Current test status" is wrong - we have 167 imported test cases in the test plan, but the chart only says 9 failed, 5 successful and 6 to be tested ...


Regards, Andreas

comment:3 Changed 13 years ago by podskalsky

Cc: podskalsky added; anonymous removed
Severity: normalblocker

comment:4 Changed 12 years ago by podskalsky

Hi Roberto,

I've patched that statistic problem: testman4trac/trunk/testmanager/

Please check it - now the lines in the "test activity trend" and the "current test status" are looking good for me!

Regards Andreas

Changed 12 years ago by podskalsky

Attachment: added


comment:5 Changed 12 years ago by Roberto Longobardi

Hi Andreas, thanks a lot for your patch :D I'll take a look at it this w/e.

I was working on this problem too last w/e and fixed most of it. Still missing is the fix to the "All test plans" stats, which should be pretty tough to resolve. Do you think you fixed that part too?

The problem there is that a new test plan, unless created with the new option "Selected test cases", does not create for each contained test case a record in the "testcaseinplan" table. It actually only creates a record for the plan in the "testplan" table. I made this choice initially to save DB space and speed up queries. All test cases in a plan (still not existing on the DB) are considered "to be tested" until a User changes the state to either "successful" or "failed". Only at that point an record is written in the DB. To get the list of all test cases in a plan I query the corresponding test catalog.

This also has the advantage (or disadvantage?) that any new test case added to a catalog will be reflected automatically into all the test plans already existing for that catalog.

This design, anyway, complicates the production of statistics, since you don't have a table with all of the test cases in all the plans (or one plan). Any test case that has not yet been "touched" does not exist anywhere. This is why, to produce the number of "to be tested" test cases in a plan, one must count all the test cases in the catalog and subtract the ones that are "successful" and "failed". Unfortunately, I didn't find an easy way of doing this when the User asks for a statistics on "all the test plans". One way would be to iterate over all the test plans and do the culculations as mentioned above, but (at least for the first line charts), to be able to draw all the points in the chart would require MANY queries on the DB.

I wonder whether you found a smarter solution to this and can't wait to see your code.

I'll try to merge your work with mine this w/e.

Ciao, Roberto

comment:6 Changed 12 years ago by podskalsky

The "All test plans" should work too, with one restriction ... If there are testplans with the same testcase (example: "Testplan Version 1" and "Testplan Version 2"), then the "All test plans" stats are useless - because which test result should be displayed in the "All test plans" overview? Now I think the latest test status of all testplans will be displayed - you can check this situation - example in Plan 1 the testcase is sucessful and in Plan 2 it is failed.

comment:7 Changed 12 years ago by Roberto Longobardi

Resolution: fixed
Status: newclosed

Fixed with 1.4.8.

Thanks a lot Andreas for your contribution :D

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Roberto Longobardi.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.