测试工具使用-testlink1.9.18-使用心得
测试工具使用-testlink1.9.18-使用心得
2019.01.24解决testlink1.9.18版本不支持MS Word格式导出测试用例的问题
问题还原如下,支持格式中缺少MS Word类型:
解决方法:
修改配置文件:
custom_reports.cfg.php
如以下配置替换即可:
// An highlighted block
<?php
# PDS - Customization
define('FORMAT_PDS', 7);
$tlCfg->reports_formats = array(FORMAT_HTML => 'format_html',FORMAT_MSWORD => 'doc');
/** Mime Content Type */
$tlCfg->reports_applications = array(FORMAT_HTML => 'text/html', FORMAT_MSWORD => 'application/vnd.ms-word');
/** Report file extension */
$tlCfg->reports_file_extension = array(FORMAT_HTML => 'html',FORMAT_XLS => 'xls',FORMAT_MSWORD => 'doc', FORMAT_PDS => 'doc');
$tlCfg->reports_list['test_plan'] = array(
'title' => 'link_report_test_plan',
'url' => 'lib/results/printDocOptions.php?type=' . DOC_TEST_PLAN_DESIGN,
'enabled' => 'all',
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=test_plan',
'format' => 'format_html,doc'
);
$tlCfg->reports_list['test_report'] = array(
'title' => 'link_report_test_report',
'url' => 'lib/results/printDocOptions.php?type=' . DOC_TEST_PLAN_EXECUTION,
'enabled' => 'all',
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=test_report',
'format' => 'format_html,doc'
);
$tlCfg->reports_list['test_report_on_build'] = array(
'title' => 'link_report_test_report_on_build',
'url' => 'lib/results/printDocOptions.php?type=' . DOC_TEST_PLAN_EXECUTION_ON_BUILD,
'enabled' => 'all',
'format' => 'format_html,doc'
);
$tlCfg->reports_list['results_flat_custom'] = array(
'title' => 'link_report_test_flat_custom',
'url' => 'lib/results/Custom/resultsTCFlat.php',
'enabled' => 'all',
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=results_flat',
'format' => 'format_html'
);
?>
不用重启,修改配置后刷新网页即可看到结果变化