Adding addional execution status

1.8 related questions and discussions.
Please upgrade to LATEST 1.9.x.
No more fixes for 1.8.

Moderators: Amaradana, TurboPT, TL Developers

Locked
Dualtha
Advanced user
Posts: 27
Joined: Thu Jun 11, 2009 4:51 pm

Adding addional execution status

Post 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.
larryyang
TestLink user
Posts: 10
Joined: Thu Nov 26, 2009 7:25 am
Location: Guangzhou China
Contact:

Post 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.
Last edited by larryyang on Thu Dec 10, 2009 2:52 am, edited 2 times in total.
Dualtha
Advanced user
Posts: 27
Joined: Thu Jun 11, 2009 4:51 pm

Post 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.
larryyang
TestLink user
Posts: 10
Joined: Thu Nov 26, 2009 7:25 am
Location: Guangzhou China
Contact:

Post 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.
Dualtha
Advanced user
Posts: 27
Joined: Thu Jun 11, 2009 4:51 pm

Post by Dualtha »

Got this working last night, there were issues with the en_GB locale missing entries.
Thanks alot for your help
larryyang
TestLink user
Posts: 10
Joined: Thu Nov 26, 2009 7:25 am
Location: Guangzhou China
Contact:

Post 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
Locked