- QATestLab Blog >
- QA Basics >
- Testing Tools >
- Adding Custom Result Types in TestLink
Adding Custom Result Types in TestLink
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
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!
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
I like your post on this, thanks for the advice
Great Post!! Thank you very much!
I am very interested in. May I ask to spoon feed the detail please?
Hi!
What details do you need?
Very usefull..
Thanks…
Thank you for interest
We would like to send and email to a developer on a failed test case. Can this be done?
Kind regards,
Keith