Testlink根据需求定制

发表于:2015-9-25 13:22

字体: | 上一篇 | 下一篇 | 我要投稿

 作者:baigungun    来源:51Testing软件测试网采编

  其次,在custom_config.inc.php中添加
$tlCfg->results['status_code'] = array (
"failed"        => 'f',
"blocked"       => 'b',
"passed"        => 'p',
"not_run"       => 'n',
"not_available" => 'x',
"unknown"       => 'u',
"all"           => 'a',
"auto_passed"   => 'y',
"auto_failed"   => 'z'
);
$tlCfg->results['status_label'] = array(
"passed"                => "test_status_passed",
"failed"                => "test_status_failed",
"blocked"               => "test_status_blocked",
"not_run"               => "test_status_not_run",
//   "all"                   => "test_status_all_status",
//   "not_available"    => "test_status_not_available",
//  "unknown"          => "test_status_unknown",
"auto_passed"      => "test_status_auto_passed",
"auto_failed"      => "test_status_auto_failed"
);
$tlCfg->results['status_label_for_exec_ui'] = array(
"passed"  => "test_status_passed",
"failed"  => "test_status_failed",
"blocked" => "test_status_blocked",
"not_run" => "test_status_not_run",
//    "not_available" => "test_status_not_available",
"auto_passed"      => "test_status_auto_passed",
"auto_failed"      => "test_status_auto_failed"
);
$tlCfg->results['default_status'] = "not_run";
  再次,修改\locale\en_GB\strings.txt
  // Status (used wide)
  $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_auto_failed = "Auto_Failed";
  $TLS_test_status_auto_passed = "Auto_Passed";
  最后,编写自己的testlink.css
  1.1 拷贝default中所有目录到myTheme
  1.2修改config.inc.php中的theme路径
  /* [GUI LAYOUT] */
  /** GUI themes (base for CSS and images)- modify if you create own one */
  $tlCfg->theme_dir = 'gui/themes/myTheme/';
  1.3修改testlink.css
/* ***** Execution & Results ********************************************************* */
div.passed, div.failed, div.blocked, div.not_run, div.auto_passed, div.auto_failed {
color:             white;
margin:         8px;
padding:         6px;
text-align:     center;
}
div.passed {
background:        #006400; /* darkgreen */
}
div.failed {
background:        #B22222; /* firebrick (red) */
}
div.blocked {
background:        #00008B; /* darkblue */
}
div.not_run {
background:        black;
}
.auto_passed, div.auto_passed {
color:             white;
background:        #006400; /* darkgreen */
}
.auto_failed, div.auto_failed {
color:             white;
background:        #B22222; /* firebrick (red) */
}
  3.如何修改自定义的测试用例模板的样式
  暂时没有找到修改固有模板和自定义字段顺序的方法,以及删除固有板块如summary,keywords的方法
  目前只能通过修改testlink.css中的.custom_fieldxx去掉bold,将padding改为0px。这样会变得稍微能看一点。
22/2<12
《2023软件测试行业现状调查报告》独家发布~

关注51Testing

联系我们

快捷面板 站点地图 联系我们 广告服务 关于我们 站长统计 发展历程

法律顾问:上海兰迪律师事务所 项棋律师
版权所有 上海博为峰软件技术股份有限公司 Copyright©51testing.com 2003-2024
投诉及意见反馈:webmaster@51testing.com; 业务联系:service@51testing.com 021-64471599-8017

沪ICP备05003035号

沪公网安备 31010102002173号