Ticket #9187 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: anonymous Assigned to: seccanj
Priority: highest Component: TestManagerForTracPlugin
Severity: blocker Keywords:
Cc: podskalsky Trac Release: 0.12

Description

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

stats.zip (4.2 kB) - added by podskalsky on 10/20/11 15:52:39.
Patched stats.py

Change History

09/25/11 22:54:30 changed by seccanj

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

Ciao, Roberto

10/03/11 11:46:06 changed by podskalsky

  • priority changed from normal to highest.
  • type changed from enhancement to defect.

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

10/05/11 14:39:21 changed by podskalsky

  • cc set to podskalsky.
  • severity changed from normal to blocker.

10/20/11 15:51:37 changed by podskalsky

Hi Roberto,

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

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

Regards Andreas

10/20/11 15:52:39 changed by podskalsky

  • attachment stats.zip added.

Patched stats.py

10/21/11 09:38:06 changed by seccanj

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

10/21/11 10:58:53 changed 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.

10/23/11 18:19:15 changed by seccanj

  • status changed from new to closed.
  • resolution set to fixed.

Fixed with 1.4.8.

Thanks a lot Andreas for your contribution :D


Add/Change #9187 (Current test status report should consider only last result of a testcase in the plan)




Change Properties
Action