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
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:
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
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.