Analysis and solution for the performance issue Testlink1.7
Analysis and solution for the performance issue Testlink1.7
I have been working on Testlink 1.7 performance issue. I analysed all the functions used and did some changes in the way the data was fetched in these functions. Initially for 2000 test cases it was taking 30 sec. Now it loads in 3 sec. Whenever we had more than 1000 test cases performance issue was there in
1)Execute test cases
2)Add test cases
3)Remove test cases
4)Assign test cases execution
With the changed code and sql, i could also apply pagenation. This has drastically improved performance. I would like to contribute the code to the community. Can you please tell me how i should do it? Can it also be considered for Testlink 1.8?
1)Execute test cases
2)Add test cases
3)Remove test cases
4)Assign test cases execution
With the changed code and sql, i could also apply pagenation. This has drastically improved performance. I would like to contribute the code to the community. Can you please tell me how i should do it? Can it also be considered for Testlink 1.8?
Analysis
The issue in the current working of execution side of Testlink 1.7 as analysed by me is as follows:
When we click on a testsuite in a testplan having 1000 test cases,
1)Function get_linked_tcversions will get all the test cases present in the testplan (here 1000 test cases)
2)Function gen_spec_view:
a) will get all the test cases present under that test suite in that testproject. (lets say there are 2000 test cases under that test suite in the repository but only 1000 are added to testplan)
b)will compare each one of them against the test cases got by get_linked_tcversions and eliminate those which are not present in the testplan.
This comparision will be done 2000(repository test cases) * 1000( get_linked_tcversions) times . I saw this was a major bottle neck.
Secondly, the next bottle neck was get_subtree is written in a recursive way to get test cases from the repository and hence pagenation at database level cannot be applied. So no pagenation and getting all the 1000 test cases at once from database into memory was another bottleneck.
I have made an attempt to solve this. It is working fine in our company. If i can contribute it i will be very happy.
Thank you so much,
cheers to test link team, testlink 1.7 is truly a fantastic tool!
Lakshmi,
Symphony Services, Bangalore.
When we click on a testsuite in a testplan having 1000 test cases,
1)Function get_linked_tcversions will get all the test cases present in the testplan (here 1000 test cases)
2)Function gen_spec_view:
a) will get all the test cases present under that test suite in that testproject. (lets say there are 2000 test cases under that test suite in the repository but only 1000 are added to testplan)
b)will compare each one of them against the test cases got by get_linked_tcversions and eliminate those which are not present in the testplan.
This comparision will be done 2000(repository test cases) * 1000( get_linked_tcversions) times . I saw this was a major bottle neck.
Secondly, the next bottle neck was get_subtree is written in a recursive way to get test cases from the repository and hence pagenation at database level cannot be applied. So no pagenation and getting all the 1000 test cases at once from database into memory was another bottleneck.
I have made an attempt to solve this. It is working fine in our company. If i can contribute it i will be very happy.
Thank you so much,
cheers to test link team, testlink 1.7 is truly a fantastic tool!
Lakshmi,
Symphony Services, Bangalore.
second solution applied on 1.8 was to disable by default while in execution
feature, get all tests cases under a test suite if you click on tree on test suite.
on 1.8 default is NOTHING HAPPENS on left frame.
You clik on EVERY TEST CASE you wnat to execute, and you execute one at a time.
This increase a lot performance.
surelly improve code also will help
my suggestion -> migrate to 1.8 (has ajax tree on test spec -> better performance). get last code from CVS or nigthly tarballs NOT form source forge 1.8. beta 3
regards
feature, get all tests cases under a test suite if you click on tree on test suite.
on 1.8 default is NOTHING HAPPENS on left frame.
You clik on EVERY TEST CASE you wnat to execute, and you execute one at a time.
This increase a lot performance.
surelly improve code also will help
my suggestion -> migrate to 1.8 (has ajax tree on test spec -> better performance). get last code from CVS or nigthly tarballs NOT form source forge 1.8. beta 3
regards
Hi fman,
I did try Testlink1.8 but dint find any significant improvements in performance even with ajax tree
. I will try this latest code as well. Since I dint find any solution i tried to give it a try to solve.
And get_subtree recursive function can be avoided by using repetitive function calls in a loop. At every function call we can store the data fetched in a php variable so this wont burden stack as in recursive function. After fetching these ids i gave them in a where clause in the sql which fetches the linked_tcversions. This automatically got all details of only the test cases in the testplan eliminating the comparision of data totally.
Please correct me if i am wrong in this.
I did try Testlink1.8 but dint find any significant improvements in performance even with ajax tree


And get_subtree recursive function can be avoided by using repetitive function calls in a loop. At every function call we can store the data fetched in a php variable so this wont burden stack as in recursive function. After fetching these ids i gave them in a where clause in the sql which fetches the linked_tcversions. This automatically got all details of only the test cases in the testplan eliminating the comparision of data totally.
Please correct me if i am wrong in this.
Hi,
I have posted the code in mantis long back. If you have an id on tracker you can access this link http://www.testlink.org/mantis/view.php?id=1824. Else, we need to wait till testlink community people put it on user contribution.
In the link provided above, there are instructions as to how the changes need to be done. Also, upload.zip contains the code and a document describing the analysis is also uploaded.
If you need anything else, do ask me. Thank you!
I have posted the code in mantis long back. If you have an id on tracker you can access this link http://www.testlink.org/mantis/view.php?id=1824. Else, we need to wait till testlink community people put it on user contribution.
In the link provided above, there are instructions as to how the changes need to be done. Also, upload.zip contains the code and a document describing the analysis is also uploaded.
If you need anything else, do ask me. Thank you!
