How to set custom status for a test case in 1.9.16?

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

AnaYoshikawa
TestLink user
Posts: 1
Joined: Fri Apr 26, 2013 8:13 am

How to set custom status for a test case in 1.9.16?

Post by AnaYoshikawa »

Hi, all.

First of all, congrats on the great job of evolving the tool. (First contact I had with TestLink, was way back on version 1.7.3...)

I'm planning on proposing the adoption of TestLink on my next project so I've just downloaded version 1.9.16 and installed it on Windows with MySQL DB, to adapt it to our process and to test integration with Jira.

I've added a custom status (cancelled), following the instructions in the manual and the tips on custom_config.inc.php.example. (This is part of our process and this customization had been successfully done in TL 1.9.8.)

Here's how it looks like.

$tlCfg->results['status_code'] = array (
'failed' => 'f',
'blocked' => 'b',
'passed' => 'p',
'not_run' => 'n',
'cancelled' => 'c'
);

//// For localization example see /locale/<your_language>/custom_strings.txt.example
$tlCfg->results['status_label'] = array(
'not_run' => 'test_status_not_run',
'passed' => 'test_status_passed',
'failed' => 'test_status_failed',
'blocked' => 'test_status_blocked',
'cancelled' => 'test_status_cancelled'
);

$tlCfg->results['status_label_for_exec_ui'] = array(
'not_run' => 'test_status_not_run',
'passed' => 'test_status_passed',
'failed' => 'test_status_failed',
'blocked' => 'test_status_blocked',
'cancelled' => 'test_status_cancelled'
);

$tlCfg->results['default_status'] = 'not_run';

$tlCfg->results['charts']['status_colour'] = array(
'not_run' => '000000',
'passed' => '006400',
'failed' => 'B22222',
'blocked' => '00008B',
'cancelled' => 'FF8C11'
);

I can see my new status on the list box for each step. However, I would like to cancel the whole test case, not just the individual steps.
With the new icons, how is it possible to set the status of the test case to a customized status. Have I forgotten something in the customization? Is it possible, through configuration, to go back to the radio buttons instead of the icons for setting the test case status? Should I open a ticket in Mantis?

Thanks in advance.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: How to set custom status for a test case in 1.9.16?

Post by fman »

Customization has changed a little bit but all the info you need is inside cfg\const.inc.php
LouKingga
TestLink user
Posts: 3
Joined: Mon Mar 13, 2017 7:23 pm

Re: How to set custom status for a test case in 1.9.16?

Post by LouKingga »

Hi all,
I'm also interested in this topic and, thanks to fman, I was finally able to add my custome status to the result box!
My only remaining issue is that the respective icons are not displayed:
Image

I created the respective icons and uploaded to the same folder as the default ones.
However, as you can see on the right, it's like the path is not being recognized.

This is wat I added to the custom.config.inc.php (lines related to the new status in bold):

// This Example shows how to add the status 'my_status'

$tlCfg->results['status_code'] = array (
'failed' => 'f',
'blocked' => 'b',
'passed' => 'p',
'not_run' => 'n',
'part_passed' => 'a'
);
//
//// For localization example see /locale/<your_language>/custom_strings.txt.example
$tlCfg->results['status_label'] = array(
'not_run' => 'test_status_not_run',
'passed' => 'test_status_passed',
'failed' => 'test_status_failed',
'blocked' => 'test_status_blocked',
'part_passed' => 'test_status_part_passed'
);

$tlCfg->results['status_label_for_exec_ui'] = array(
'not_run' => 'test_status_not_run',
'passed' => 'test_status_passed',
'failed' => 'test_status_failed',
'blocked' => 'test_status_blocked',
'part_passed' => 'test_status_part_passed'
);

$tlCfg->results['charts']['status_colour'] = array(
'not_run' => '000000',
'passed' => '006400',
'failed' => 'B22222',
'blocked' => '00008B',
'part_passed' => 'FF8C11'
);

$tlCfg->results['status_icons_for_exec_ui'] =
array('passed' => array('img' => 'test_status_passed',
'title' => 'click_passed'),
'part_passed' => array('img' => 'test_status_part_passed',
'title' => 'click_part_passed'),

'failed' => array('img' => 'test_status_failed',
'title' => 'click_failed'),
'blocked' => array('img' => 'test_status_blocked',
'title' => 'click_blocked'));

$tlCfg->results['status_icons_for_exec_next_ui'] =
array('passed' => array('img' => 'test_status_passed_next',
'title' => 'click_passed_next'),
'part_passed' => array('img' => 'test_status_part_passed_next',
'title' => 'click_part_passed_next'),

'failed' => array('img' => 'test_status_failed_next',
'title' => 'click_failed_next'),
'blocked' => array('img' => 'test_status_blocked_next',
'title' => 'click_blocked_next'));


What am I doing wrong???
m1ch13l
TestLink user
Posts: 8
Joined: Sun Dec 11, 2016 3:39 pm

Re: How to set custom status for a test case in 1.9.16?

Post by m1ch13l »

Have you tried adding the image file name to the image array in lib\functions\tlsmarty.inc.php?
LouKingga
TestLink user
Posts: 3
Joined: Mon Mar 13, 2017 7:23 pm

Re: How to set custom status for a test case in 1.9.16?

Post by LouKingga »

That's exactly what I forgot to do.

It's working PERFECTLY now, THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: How to set custom status for a test case in 1.9.16?

Post by fman »

Thanks to all you.
I'm going to add some doc to explain this, apologize ;(
fortcwb
TestLink user
Posts: 6
Joined: Thu Jun 30, 2011 6:33 pm

Re: How to set custom status for a test case in 1.9.16?

Post by fortcwb »

Is there any way to keep using words instead of "emoticons"?
tjosephine
Advanced user
Posts: 23
Joined: Sat Sep 12, 2015 2:01 pm

Re: How to set custom status for a test case in 1.9.16?

Post by tjosephine »

We would like as well a possibility to use a list box with all the status instead of the "emoticons". Thanks
Kveldus
TestLink user
Posts: 11
Joined: Wed Feb 01, 2017 10:05 pm

Re: How to set custom status for a test case in 1.9.16?

Post by Kveldus »

We upgraded from 1.9.14 to 1.9.16 and found the same issue. Unfortunately custom statuses we had became unavailable after upgrade in execution. As far as I understand need to add icons + updates in custom config files for those to get back.
Is there any possibility to switch to the previous style of drop-down menu for TC's execution and status?
Kveldus
TestLink user
Posts: 11
Joined: Wed Feb 01, 2017 10:05 pm

Re: How to set custom status for a test case in 1.9.16?

Post by Kveldus »

I have also found that custom test execution statuses should be also defined for quick execution in getQuickExecCfg function in /lib/testcases/tcAssignedToUser.php (used in, for example, Test Case Assignment Overview report)
It's not really critical, just a nice-to-adjust, but anyway.

One of bad points of Icons as status for result in execution implementation is that after upgrade all custom statuses are no longer visible in results for test execution until user defines those manually in $tlCfg->results['status_icons_for_exec_ui'] array, uploads icons and adds the appropriate entries $TLS_click_<status> in custom strings files. Imho in this case some more detailed documentation (at least description in const.inc.php) on custom statuses upgrade or some handling of custom statuses during upgrade would be the benefit. It was not obvious from const.inc.php that also lib\functions\tlsmarty.inc.php should be updated - user can definitely research and find this step by step, but it would be nice to add this info into const.inc.php.

Thanks to that post, I didn't need to spend more time to find all items needed to be updated to restore custom statuses!

But I re-designed the default icons a bit too as imho emoticons are not the best solution for the icons. So here is how it looks like now in our TestLink:
Image
Statuses: Passed, Failed, Blocked, In Progress, Deferred, To Review, Cancelled
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: How to set custom status for a test case in 1.9.16?

Post by fman »

@Kveldus
What about contributing with the missing documentation?
Kveldus
TestLink user
Posts: 11
Joined: Wed Feb 01, 2017 10:05 pm

Re: How to set custom status for a test case in 1.9.16?

Post by Kveldus »

fman wrote:@Kveldus
What about contributing with the missing documentation?
Good idea! I can do that.
I only think that it would be better to make it in docs, not in const.inc.php. In addition to this statuses item I also have some more customization tips we used.
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: How to set custom status for a test case in 1.9.16?

Post by fman »

fortcwb
TestLink user
Posts: 6
Joined: Thu Jun 30, 2011 6:33 pm

Re: How to set custom status for a test case in 1.9.16?

Post by fortcwb »

Hey guys, I followed Kveldus idea and created my own icons. I'm posting here if you want to use them.

Image

Image Image Image Image Image

I use them as "passed", "partially passed", "failed", "blocked" and "not applicable"
nukemrex
TestLink user
Posts: 3
Joined: Thu Oct 04, 2018 6:49 pm

Re: How to set custom status for a test case in 1.9.16?

Post by nukemrex »

Hi guys,

I'm new in Testlink, and I wanted to add 2 new test cases status when in my project want to run a test plan, I followed the different steps described in this topic, but I couldn't get the images in place, I'm using 1.9.17 version, replace the images using the ones that "fortcwb" shared but actually 2 of the new status are not been recognized, and if we use Firefox the new status are not displayed, and as a workaround we use Chrome, that display the icons as missed images.

https://ibb.co/mB72R9

Could you please help me with this problem? I tried every different changes described in other posts but without good results.

Thanks in advance to anyone that could help.

Regards.
Post Reply