Adding Custom Result Types in TestLink

by Nataliia Vasylyna | February 24, 2011 12:54 pm

We actively use TestLink as the management system for testing[1]. 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[2]

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!

Learn more from QATestLab

Related Posts:

Endnotes:
  1. TestLink as the management system for testing: https://qatestlab.com/technologies/testing-technologies/
  2. [Image]: https://blog.qatestlab.com/wp-content/uploads/2011/02/testlink.jpg
  3. What is better: Test Emulators or Real Devices: https://blog.qatestlab.com/2019/07/18/emulators-vs-real-devices/
  4. What Qualities Make a Good QA Engineer?: https://blog.qatestlab.com/2019/07/11/qa-engineer-qualities/
  5. TOP 10 Regression Testing Tools: https://blog.qatestlab.com/2019/07/02/regression-testing-tools/

Source URL: https://blog.qatestlab.com/2011/02/24/adding-custom-result-types-in-testlink/