Page 1 of 1

Adding addional execution status

Posted: Tue Dec 08, 2009 1:48 pm
by Dualtha
Hi,

Has anyone added extra execution status to the currently available ones? Say add Partial Pass to Passed, Failed or Blocked.

Would such an enhancement affect current test reports?

Thanks for any feedback.

Posted: Wed Dec 09, 2009 2:04 am
by larryyang
Hi, the following is a sample to add Not Available option to you, it works on my hand, I hope it helps you.
Add a new executed option:
1.
1.1 Search the following code from /cfg/const.inc.php:

Code: Select all

$tlCfg->results['status_label'] = array(
	"not_run"  		=> "test_status_not_run",
	"passed"   		=> "test_status_passed",
added/enabled a line of:

Code: Select all

"not_available" => "test_status_not_available"
1.2 Search

Code: Select all

$tlCfg->results['status_code'] = array (
make sure there is a line of

Code: Select all

"not_available" => 'x',
1.3 Search

Code: Select all

$tlCfg->results['status_label_for_exec_ui'] = array(
make sure there is a line of

Code: Select all

"not_available" => "test_status_not_available"
1.4 Search

Code: Select all

$tlCfg->results['charts']['status_colour']=array(
Set color for it like this:

Code: Select all

"not_available" => "00FFFF"
2.1 Make sure there is a line of following in en_GB/string.txt to show tring of Not available after the line of

Code: Select all

 $TLS_test_status_passed 	= "Passed";
:

Code: Select all

 $TLS_test_status_not_available = "Not Available";
2.2 Search the following from en_GB\string.txt

Code: Select all

lib/results/resultsNavigator.php

and insert this into it

Code: Select all

$TLS_link_report_not_available = "Not Available Test Cases";
3. Search the following code from /cfg/report.cfg.php

Code: Select all

$tlCfg->reports_list['list_tc_norun'] = array( 
	'title' => 'link_report_not_run',
	'url' => 'lib/results/resultsByStatus.php?type=' . $tlCfg->results['status_code']['not_run'],
	'enabled' => 'all',
	'format' => 'format_html,format_ods,format_xls,format_mail_html'
);
Added the following code below it.

Code: Select all

$tlCfg->reports_list['list_tc_notavailable'] = array( 
	'title' => 'link_report_not_available',
	'url' => 'lib/results/resultsByStatus.php?type=' . $tlCfg->results['status_code']['not_available'],
	'enabled' => 'all',
	'format' => 'format_html,format_ods,format_xls,format_mail_html'
);
4. Search the following code from /lib/Result/resultbystatus.php

Code: Select all

foreach( array('failed','blocked','not_run') as $verbose_status )
{
    if( $type == $statusCode[$verbose_status] )
    {
        $title = lang_get('list_of_' . $verbose_status);
        break;
    }  
}
if( is_null($title) )
{
	tlog('wrong value of GET type');
	exit();
}
Replaced

Code: Select all

foreach( array('failed','blocked','not_run') as $verbose_status )
with:

Code: Select all

foreach( array('failed','blocked','not_run','not_available') as $verbose_status )
Please let me know if you still have problem.

Posted: Wed Dec 09, 2009 10:12 am
by Dualtha
Thanks for your reply.
I have made all the modifications outlined below and when I log in and go to Results I am seeing the following link - LOCALIZE: link_report_partially_passed - when I create a new TC for testing and attempt to execute it (note status displayed as above) I am getting a message saying result not written to database.

Posted: Thu Dec 10, 2009 2:51 am
by larryyang
Hi Dualtha,

I double check it again with 1.8.4 release, it should works for new status after you finished step 1 and step2,

step 3 and 4 are for reports.

you got an error of : LOCALIZE: link_report_partially_passed,
Sorry, I missed one step to show the string, but it should not effect wrtting result to db,

Search the following from en_GB\string.txt

Code: Select all

lib/results/resultsNavigator.php

and insert this into it.

Code: Select all

$TLS_link_report_not_available = "Not Available Test Cases";
I updated my steps.

Posted: Thu Dec 10, 2009 9:59 am
by Dualtha
Got this working last night, there were issues with the en_GB locale missing entries.
Thanks alot for your help

Posted: Sat Dec 12, 2009 1:51 pm
by larryyang
Dualtha wrote:Got this working last night, there were issues with the en_GB locale missing entries.
Thanks alot for your help
Hi Dualtha,

My pleasure.

-Larry