It's all about the answers!

Ask a question

Loading a RQM test cases in the web UI takes up to 40 seconds, why?


Natarajan Thirumeni (2981131) | asked Apr 03 '19, 8:27 a.m.

You’re using RQM for some years now. Suddenly, you hear from the end users is that, opening some testcases in a specific RQM project area takes longer than it should. A least in the past the testcase were loaded in a second or two. However, the same testcase now takes more 30 seconds to load on the web UI. Nothing has changed on the application server or OS or database.


There are some testcases are opening instantly on the same project area, but some testcase isn’t. You’ve looked at resources of application server and database server, there no unusual load issues.

 

You’re wondering how to debug this issue to resolve so that, all testcases load instantly.

<style> &lt;!-- /* Font Definitions */ @font-face {font-family:&quot;Cambria Math&quot;; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:0; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:3 0 0 0 1 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-536859905 -1073697537 9 0 511 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:&quot;&quot;; margin:0cm; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:&quot;Calibri&quot;,sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:&quot;Times New Roman&quot;; mso-bidi-theme-font:minor-bidi; mso-ansi-language:EN-GB;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-family:&quot;Calibri&quot;,sans-serif; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:Calibri; mso-fareast-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:&quot;Times New Roman&quot;; mso-bidi-theme-font:minor-bidi; mso-ansi-language:EN-GB;} @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 72.0pt 72.0pt 72.0pt; mso-header-margin:36.0pt; mso-footer-margin:36.0pt; mso-paper-source:0;} div.WordSection1 {page:WordSection1;} --&gt; </style>

One answer



permanent link
Natarajan Thirumeni (2981131) | answered Apr 03 '19, 8:31 a.m.

You’ve looked Java cores or debug log or even database reports (such as AWR reports in Oracle). In the report you’ve seen the below query to get the Test Plan for the test case: ( takes 30+ seconds)
 
select t1.ITEM_ID, t1.STATE_ID, t1.JZ_DISCRIMINATOR
from (select t1q. from QM_DB_USER.PLANNING_VERSIONABLE_ITEM t1q
inner join QM_DB_USER.PLANNING_VVERSIONABLE_ITEM t1v on t1q.STATE_ID = t1v.STATE_ID
where (t1v.CONFIG_ID = ? and t1v.IS_CURRENT = 1) and t1q.JZ_DISCRIMINATOR = 201) t1
left outer join QM_DB_USER.PLANNING_VRSND_TST_PLN_TST_CSS j1 on (t1.VERSIONED_TEST_PLAN_TEST_CASES = j1.JZ_PARENT_ID)
left outer join (select t2q.
from QM_DB_USER.PLANNING_VERSIONABLE_ITEM t2q
inner join QM_DB_USER.PLANNING_VVERSIONABLE_ITEM t2v on t2q.STATE_ID = t2v.STATE_ID
where (t2v.CONFIG_ID = ? and t2v.IS_CURRENT = 1)) t2 on (j1.ITEM_ID = t2.ITEM_ID)
where ((t2.ITEM_ID = ?) and (t1.ARCHIVED = 0));

The query could different for every environment. As you could its complex query. The test case has a link to test plan.

To diagnosis this issue, run the following debugging:

1.    Go to database server. If DB is running on UNIX, run a top command on a shell. If DB on Windows, open Task Manager.
2.    Side by side, open a test case in the RQM web UI, open a testcase which loads quickly and observer CPU load on the DB server. If CPU do no spike all good.
3.    On RQM web UI, open a testcase which takes longer to load (more then 30 seconds). Observe CPU load. If the CPU goes up to 100% and stays up until test case is loaded, then this is query we’d need to optimize.
4.    To optimize query, we don’t manually edit SQL stmt. Instead, we’d check DB statics to see if statistics is up-to-date.
5.    If statistics is not up-to-date, you’d have to run statics manually and find a way to run statistics on a nightly basis.

On this case, running a DB statistics on table VVERSIONABLE_ITEM and VERSIONABLE_ITEM made the query run faster. This resolved the issue of loading a test case in web UI. The testcase which was taking longer (30 seconds), loaded within a second.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.