1.修改TestLink下的config.inc.php文件:
将$g_interface_bugs = 'NO'; 改为$g_interface_bugs = 'MANTIS';
2.配置TestLink/cfg下的Mantis.cfg.php文件:
define('BUG_TRACK_DB_HOST', 'localhost'); //数据库服务器地址
define('BUG_TRACK_DB_NAME', 'bugtracker'); //Mantis数据库名称
define('BUG_TRACK_DB_TYPE', 'mysql'); //Mantis采用的数据库类型
define('BUG_TRACK_DB_USER', 'root'); //Mantis数据库的用户名
define('BUG_TRACK_DB_PASS', '123'); //Mantis数据库的密码
define('BUG_TRACK_HREF', "http://localhost:8000/mantis/view.php?id="); //提交bug号地址
define('BUG_TRACK_ENTER_BUG_HREF',"http://localhost:8000/mantis/"); //TestLink的Mantis连接地址
3.修改Mantis下的config_inc.php文件,启用匿名登录:
# --- anonymous login -----------
# Allow anonymous login
$g_allow_anonymous_login = ON;
$g_anonymous_ccount = 'lee';
注:replace lee with your created user,and this mantis user has to created with viewer rights to all public projects
4.配置完成后,在testlink中某个测试用例执行失败时,会多出一个BUG management字段,点击下面的小蜘蛛,会打开一个新的页面,通过新页面中的Access to Bug Tracking System(Mantis)链接打开Mantis,记录bug,记录完成后将bug号填入Mantis Bug id里,点Add bug按钮即可。
5.备注:一开始我使用的testlink是最新的1.9.9版本,这个版本以及邻近的几个版本中没有有关缺陷管理系统的接口配置,如lib下的int_bugtracking.php、int_mantis.php文件等,以及cfg下的mantis.cfg.php文件等,需要自行添加。最后使用的是比较早的1.9.0版本