Opened 3 years ago
Last modified 3 years ago
#14116 new defect
Wrong Status of test cases in testplan is displayed
Reported by: | Owned by: | Roberto Longobardi | |
---|---|---|---|
Priority: | normal | Component: | TestManagerForTracPlugin |
Severity: | critical | Keywords: | |
Cc: | Trac Release: | 1.2 |
Description
Hello,
This Testmanagementplugin is excelent, and we decided to use it for our customers.
Unfortunately just after convincing our customers to apply it, we found a severe bug:
The status of the individual tests contained in a test plan are displayed wrongly, if these tests have not been worked on (i.e. they have an empty history).
In this case, the status of the previous testcase is copied. This renders the work in a testplan nearly unusable.
My environment:
- trac v.1.2.3
- testmanager plugin 1.9.1
Since we needed a fast solution, we debugged the plugin and found the culprit:
In api.py method get_test_catalog_data_model (about line 1400) there is a loop
for ts, author, status in tcip.list_history(): break
If the history of the testcase is still empty, the variable status is not reset, the state of the previous testcase in the outer loop is used.
The solution is, to initialize the status here
status = '' for ts, author, status in tcip.list_history(): break
Indeed it could be wise, also to initialize ts
and author
.
Best regards Michael
Attachments (2)
Change History (7)
comment:1 Changed 3 years ago by
comment:2 Changed 3 years ago by
Hello,
This is my first patch I ever created. I attached it to this issue.
I hope this is helpful.
Michael
Changed 3 years ago by
Attachment: | Fix_for_https___trac-hacks_org_ticket_141161.patch added |
---|
comment:3 Changed 3 years ago by
Sorry, the first patch was wrong. The correct one is attachment:Fix_for_https___trac-hacks_org_ticket_141161.patch
comment:4 Changed 3 years ago by
Thanks a lot Michael. I just integrated your patch and release it into 1.10.1. https://github.com/seccanj/testman4trac/releases/tag/testman4trac-1.10.1
Unfortunately I don't have a 1.9.x branch, but if you need the patch to be on top of the 1.9.x release, because you're not on Trac 1.4 or higher yet, please let me know and I'll make it.
comment:5 Changed 3 years ago by
I also released a 1.9.2 version with the patch on top of 1.9.1: https://github.com/seccanj/testman4trac/releases/tag/testman4trac-1.9.2
There is now a branch https://github.com/seccanj/testman4trac/tree/maintenance-old-trac to continue maintaining Trac versions previous to 1.4.
Thanks again Michael for the patch!
Thank you, this is very helpful. Can you submit your patch as a unified diff? See TracDev/SubmittingPatches