Toad World® Forums

qu_test.run_suite_by_Name get NEVER-RUN-Description: No test results available at this level.


#1

Hi,

i’ll run a Test-Suite in a PL/SQL-Job automaticly.

My Test-Suite “FE” works in the front end well, but when i use the API, i get the result " NEVER-RUN-Description: No test results available at this level.".

I use the folowing code to starte the Suite:

DECLARE
l_result VARCHAR2(100);
l_result_row qu_result_xp.last_run_results_suite_cur%ROWTYPE;
my_results qu_result_xp.last_run_results_suite_rc;
BEGIN
qu_test.run_suite_by_name (suite_name_in => ‘FE’
, result_out => l_result
, results_out => my_results
, unit_test_guid_list_in => NULL
, test_case_guid_list_in => NULL
, delimiter_in => NULL
, code_coverage_goal_in => NULL
);
DBMS_OUTPUT.put_line ('Overall result of test: ’ || l_result);

LOOP
FETCH my_results
INTO l_result_row;

  EXIT WHEN my_results%NOTFOUND;
  DBMS_OUTPUT.put_line (   RPAD (' ', l_result_row.h_level * 2)
                        || ' '
                        || l_result_row.NAME
                        || '-Status: '
                        || l_result_row.result_status
                        || '-Description: '
                        || l_result_row.description
                       );

END LOOP;
END;
/

When i run the test inside the Suite over the API-Call “qu_test.run_test_for2”, it works also fine.

Does anyone have an idea?

Eric


#2

Hi Eric,

Seems to me that suite ‘FE’ is not visible or exucutable. Did you use the same database user as the user who created this suite when you are executing suite used by API? You can try to execute suite used by its GUID:

DECLARE
l_result VARCHAR2(100);
l_result_row qu_result_xp.last_run_results_suite_cur%ROWTYPE;
my_results qu_result_xp.last_run_results_suite_rc;
BEGIN
qu_test.run_suite_by_guid ( suite_guid_in => '{18DBAE3D-1A27-482D-BFEB-85AC85EEED2C}'
, result_out => l_result
, results_out => my_results
, get_results_in => TRUE
, unit_test_guid_list_in => NULL
, test_case_guid_list_in => NULL
, delimiter_in => NULL
, code_coverage_goal_in => NULL
, command_line_execution_in => TRUE
);
DBMS_OUTPUT.put_line ('Overall result of test: ’ || l_result);

LOOP
FETCH my_results
INTO l_result_row;

EXIT WHEN my_results%NOTFOUND;
 DBMS_OUTPUT.put_line ( RPAD (' ', l_result_row.h_level * 2)
   || ' '
   || l_result_row.NAME
   || '-Status: '
   || l_result_row.result_status
   || '-Description: '
   || l_result_row.description
  );

END LOOP;
END;
/

The suite run result should be also visible in GUI in case suite is successfully executed. Suite GUID is visible in the Suite Properties tab.

Vita


#3

Hi Vita,

thank you for your reply.

When i use the GUID it works fine!! :slight_smile:

Yes, i use the same DB-Connect in the GUI and using the API.

Do you have an idea, why the call by name (suite_name_in => ‘FE’) does not work?

Eric


#4

Hi,

you can try the query bellow for further investigation…

select qu_suite_qp.pky_un_qu_suite_name_by (‘FE’, USER) from DUAL;

or

select universal_id, name from QU_SUITE where NAME = ‘FE’ and created_by = USER;

Vita


#5

Hi Vita,

sorry for my late reply.

With the first select i can get the global id an it works fine!

THX

Eric