软件环境:

  • testlink 1.9.12

  • MantisBT-1.2.18  


一、先来说一说集成的好处吧:

  • 在每个版本测试结束后,方便统计TC发现的bug的占比;

  • 在testlink中,通过查看用例执行历史,可以间接的了解bug修复情况;

  • testlink留存了用例与bug的关系,提供了可追溯性,间接的可以反映版本修复的质量;



二、再来说集成的步骤:

第一步:配置Mantis的mantisconfig_inc.php文件

在mantis中开启允许匿名登录

mantis的匿名用户对所有的项目都具有浏览权限

#  --- anonymous login -----------

#  Allow anonymous login

$g_allow_anonymous_login  = ON;

$g_anonymous_account  = 'dummy';

 

第二步:配置testlink的主目录下的/cfg/mantis.cfg.php文件

/**  The DB host to use when connecting to the mantis db */

define('BUG_TRACK_DB_HOST',  'calypso');

/**  The name of the database that contains the mantis tables */

define('BUG_TRACK_DB_NAME',  'mantis_bt');

/**  The DB type being used by mantis */

define('BUG_TRACK_DB_USER',  'mantis_bt_user');

/**  The DB password to use for connecting to the mantis db */

define('BUG_TRACK_DB_PASS',  'mantis_bt_password');

/**  link to the bugtracking system, for viewing bugs */

define('BUG_TRACK_HREF',  "http://calypso/mantis/view.php?id=");

/**  link to the bugtracking system, for entering new bugs */

define('BUG_TRACK_ENTER_BUG_HREF',"http://calypso/mantis/");

 

第三步:enable BTS集成

打开config.inc.php文件中

//

/**  [Bug Tracking systems] */

/**

*  TestLink uses bugtracking systems to check if displayed bugs resolved,  verified,

*  and closed bugs. If they are it will strike through them

*

* NO  : no bug tracking system integration

*  BUGZILLA : edit configuration in TL_ABS_PATH/cfg/bugzilla.cfg.php

*  MANTIS : edit configuration in TL_ABS_PATH/cfg/mantis.cfg.php

*  JIRA : edit configuration in TL_ABS_PATH/cfg/jira.cfg.php

*  TRACKPLUS : edit configuration in TL_ABS_PATH/cfg/trackplus.cfg.php

*/

$g_interface_bugs='NO';

将“$g_interface_bugs='NO';  " copy到custom_config.inc.php文件中 ,并将'NO'修改为‘MANTIS’

$g_interface_bugs='MANTIS';


三、TestLink用户的使用步骤如下:  

  • 如果测试结果为失败;

  • 在mantis中提交bug,并记录bug ID;

  • 在testlink执行用例的结果页面,点击bug小图标;

  • 在弹出的页面,添加bug ID并保存。

  • 添加后可显示bug信息,点击后,可查看bug详细信息。

9986101e822cf279d2dd92957bb0a92a.png