Page 1 of 1

Bug history from different test plans

Posted: Wed Apr 20, 2011 11:07 am
by fsrechia
Hello!

I've been using testlink 1.8.5 to manage testing of more than one test plan, and I'd like to know if it is possible to track bug history (currently bugzilla bug ids) from another test plan.

For Example:
Test plan A -> test X failed two times. Bug 4444 was opened for build1, while bug 5555 was opened for build2
Test plan B -> test X is also present, but it was still not executed

So test X is shared by two different test plans. The bugs from test X(A) could be valid for test plan X(B).

The users from testlink here think that it would nice for the tester to have an overview of all bugs related to a single test case, no matter where that case was before, and no matter which version was used.

I know that within a single test plan it is possible to show the bug IDs from previous executions, even if done with different builds. Is it possible to show a bug ID list from executions of another test plan?

I've been looking for this in the code and database of testlink, and also the forums, but I couldn't find anything useful yet.

Thanks in advance for any feedback!

Re: Bug history from different test plans

Posted: Tue Apr 26, 2011 5:06 am
by Amaradana
Similar feature is available in 1.9 version, when you create a test plan B you have a option to copy all builds of test plan A etc, when you check and create a test plan B, all the history of the test plan A including execution status will be copied

Re: Bug history from different test plans

Posted: Tue Apr 26, 2011 5:35 pm
by fsrechia
Hmm interesting, I might consider upgrading to 1.9. I still have doubts:

- You said that execution status is copied from plan A to B. If I generate a report with "latest results", will I get a report with tests executed already?
- Is it possible to do that as "import execution history from A to B" or is it a plain copy of plan A to plan B? Can this be done only during B's creation or can it be done after B is already created and has executions?

Thanks again!

Re: Bug history from different test plans

Posted: Thu Apr 28, 2011 12:44 pm
by Amaradana
Simple answer say your PLan is over and now while creating Plan B you will be selecting to copy the builds from previous one this makes all the execution history also gets copied to plan B

Re: Bug history from different test plans

Posted: Thu Apr 28, 2011 8:21 pm
by fsrechia
I see. So it is not exactly what I need. I would probably have to develop this myself.

I've been researching a bit of the code and the database structure, and I think that my purpose could be accomplished by an additional link on the test execution screen. Here are my considerations if anyone is interested:

This link could be called "View bug history for all versions of this test case" and could possibly open a new window (or one of those containers) with bugs linked to bugzilla or any other test tool. The link for this new window would probably be in gui/templates/execute/inc_exec_show_tc_exec.tpl.

By looking at the database, I think this could be accomplished with one or more mysql queries/subqueries at the following order:

1. Get tcversions.tc_external_id of a test case based on its tcversions.id;
2. Get a list of tcversions.id matching tcversions.tc_external_id found in the previous step;
3. Get a list of executions.id for all tcversions.id found in the previous step;
4. Finally get a list of execution_bugs.bug_id matching all the executions.id from the previous step;

I just don't know where exactly to put the sql query php code... maybe in a function inside lib/functions and calling the function from another php file which could be inside lib/execute/ ... I am not really a programmer :p and I don't know the best practices for that kind of thing.

Well, for now I'll abandon this subject. If I ever develop anything I'll post it here.

If anyone has any suggestions regarding the best way to accomplish this, I'd be happy to know.

Re: Bug history from different test plans

Posted: Mon May 09, 2011 9:07 am
by Amaradana
Please create a issue in tracker as enhancemnt and dedicate your code there for the review of development team.

Re: Bug history from different test plans

Posted: Fri Jun 03, 2011 4:50 pm
by chudyj
Hi,

I have found a problem that might belong to what Amaradana proposed to use as a copy of the Plan A->Plan B.
After I'd created a test plan B with all the history from the test plan A I see that when generating the test report for Plan B then the builds that were surely executed in Plan A do not have test results attached to them in the report for Plan B - in other words all test executions/builds from plan A are set to "Not Run". :roll:

Can anyone help, please?

thx,
Jozef

Re: Bug history from different test plans

Posted: Tue Jun 07, 2011 7:17 am
by Amaradana
May be i should have overlooked your question,

Here are my thoughts

Well results are not copied, agreed, but i do remember this worked in some version of 1.8 or may be i over looked, Any ways considering your above you can develop and contribute to the community.

Please raise a request in the Tracker as a feature and discuss there about how this has to be proceeded