Adding Custom Result Types in TestLink

Adding Custom Result Types in TestLink
February 24 12:54 2011 Print This Article

We actively use TestLink as the management system for testing. It is also very convenient to use it in conjunction with the automated tests. A little later I will tell you how.

But here, for example, is not enough for me standard types of results when performing a test-case:

Passed
Failed
Blocked

TestLink

TestLink

I added my own statuses:

[box] Test Error

Test Data Error

In Process[/box]

In principle, you can add any quantity of statuses.

How I did it is described below. (Testlink 1.7):

Add status – Test Error

1. File of  constants

/ Cfg / const.inc.php

$ G_tc_status = array (
“Failed” => ‘f’,
“Blocked” => ‘b’,
“Passed” => ‘p’,
“Not_run” => ‘n’,
“Not_available” => ‘x’,
“Unknown” => ‘u’,
“Test_error” => ‘t’,
“All” => ‘all’
);

$ G_tc_status_verbose_labels = array (
“All” => “test_status_all_status”,
“Not_run” => “test_status_not_run”,
“Passed” => “test_status_passed”,
“Failed” => “test_status_failed”,
“Blocked” => “test_status_blocked”,
“Not_available” => “test_status_not_available”,
“Test_error” => ‘test_status_test_error’,
“Unknown” => “test_status_unknown”
);

$ G_tc_status_for_ui = array (
“Passed” => “test_status_passed”,
“Failed” => “test_status_failed”,
“Blocked” => “test_status_blocked”,
“Test_error” => “test_status_test_error”
);

/ / Radio button selected by default
$ G_tc_status_for_ui_default = “blocked”;

$ G_reports_cfg-> tc_status = array (
“Passed” => “test_status_passed”,
“Failed” => “test_status_failed”,
“Blocked” => “test_status_blocked”,
“Not_run” => “test_status_not_run”,
“Test_error” => “test_status_test_error”
);

2. Language file

/ Locale / en_GB / string.txt

$ TLS_test_status_all = “All”;
$ TLS_test_status_any = “Any”;
$ TLS_test_status_not_run = “Not Run”;
$ TLS_test_status_blocked = “Blocked”;
$ TLS_test_status_failed = “Failed”;
$ TLS_test_status_passed = “Passed”;
$ TLS_test_status_not_available = “Not Available”;
$ TLS_test_status_unknown = “Unknown”;
$ TLS_test_status_test_error = “Test Error”;

/ Locale / ru_RU / string.txt

$ TLS_test_status_test_error = “test error”;

3. Colour status

Copy the theme theme_m1 in theme_m2
/ Gui/themes/theme_m2/css/testlink.css

. Passed {
color: white;
background: green;
}

. Failed {
color: white;
background: red;
}

. Blocked {
color: white;
background: blue;
}

. Not_run {
color: white;
background: black;
}

. Not_available {
color: black;
background: yellow;
}

. Unknown {
color: black;
background: cyan;
}

. Test_error {
color: black;
background: # e51cb8;
}

4. config.inc

/ * CSS themes – modify if you create own /
define (‘TL_THEME_CSS_DIR’, ‘gui/themes/theme_m2/css /’);

I hope it helps you!

Related Posts:

  Article "tagged" as:
  Categories:

About Article Author

view more articles
Nataliia Vasylyna
Nataliia Vasylyna

View More Articles

8 Comments

write a comment
  1. Thiago
    February 24, 14:14 #1 Thiago

    Very usefull..

    Thanks…

    Reply to this comment
  2. miu miu サングラス
    February 25, 10:12 #2 miu miu サングラス

    I am very interested in. May I ask to spoon feed the detail please?

    Reply to this comment
  3. Kay Queen
    February 25, 11:25 #3 Kay Queen

    Great Post!! Thank you very much!

    Reply to this comment
  4. hxgr.com
    February 25, 15:14 #4 hxgr.com

    I like your post on this, thanks for the advice

    Reply to this comment
  5. Sudarshan
    May 16, 08:28 #5 Sudarshan

    Thanks
    This post is very helpful to me.

    I have added one new field successfully

    & I can see this filed in ‘General Test Plan Metrics’ report

    but, I can’t see number of test cases execution in this column – it’s showing 0 for all folders

    Can you please suggest where & what i need to change to capture this data in reports?

    Thanks
    Sudarshan

    Reply to this comment

Add a Comment

Your data will be safe! Your e-mail address will not be published. Also other data will not be shared with third person.
All fields are required.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.