这段时间比较空闲,实属无聊,研究了一下开源的测试管理工具(TestLink/Bugzilla/Mantis),今天把TestLink 和 Mantis 整合了一下,简单的记录一下。
TestLink/Bugzilla/Mantis这三款软件全部配置在Windows2003下,采用MySQL数据库。
1.配置TestLink 下的 config.inc.php

config.inc.php
1
/**//** [Bug Tracking systems] */
2
/**//**
3
* TestLink uses bugtracking systems to check if displayed bugs resolved, verified,
4
* and closed bugs. If they are it will strike through them
5
*
6
* @var STRING g_interface_bugs = [
7
* 'NO' : no bug tracking system integration (DEFAULT)
8
* 'BUGZILLA' : edit configuration in TL_ABS_PATH/cfg/bugzilla.cfg.php
9
* 'MANTIS' : edit configuration in TL_ABS_PATH/cfg/mantis.cfg.php
10
* 'JIRA' : edit configuration in TL_ABS_PATH/cfg/jira.cfg.php
11
* 'TRACKPLUS' : edit configuration in TL_ABS_PATH/cfg/trackplus.cfg.php
12
* 'EVENTUM' : edit configuration in TL_ABS_PATH/cfg/eventum.cfg.php
13
* 'SEAPINE' : edit configuration in TL_ABS_PATH/cfg/seapine.cfg.php
14
* 'GFORGE' : edit configuration in TL_ABS_PATH/cfg/gforge.cfg.php
15
* 'FOGBUGZ' : edit configuration in TL_ABS_PATH/cfg/fogbugz.cfg.php
16
* ]
17
*/
18
$g_interface_bugs = 'MANTIS'; /**//*---将'NO'改成'MANTIS'---*/
2.配置cfg下的Mantis.cfg.php

mantis.cfg.php
1
<?php
2
/**
3
* TestLink Open Source Project - http://testlink.sourceforge.net/
4
* $Id: mantis.cfg.php,v 1.7 2007/03/05 18:22:04 franciscom Exp $
5
*
6
* Constants used throughout TestLink are defined within this file
7
* they should be changed for your environment
8
*
9
* 20051229 - scs - added DEFINE for the DB-Type
10
*/
11
12
//Set the bug tracking system Interface to MANTIS 0.19.1
13
//also tested with MANTIS 1.0.0.a3
14
15
/** The DB host to use when connecting to the mantis db */
16
define('BUG_TRACK_DB_HOST', 'localhost'); //数据库服务器地址
17
18
/** The name of the database that contains the mantis tables */
19
define('BUG_TRACK_DB_NAME', 'mantis'); //Mantis数据库名称
20
21
/** The DB type being used by mantis
22
values: mysql,mssql,postgres
23
*/
24
define('BUG_TRACK_DB_TYPE', 'mysql'); //Mantis采用数据库类型
25
26
/** The DB password to use for connecting to the mantis db */
27
define('BUG_TRACK_DB_USER', 'mantis'); //数据库mantis的用户名
28
define('BUG_TRACK_DB_PASS', 'mantis'); //数据库mantis的密码
29
30
31
/* link of the web server for mantis*/
32
/* anonymous login into mantis has to be turned on, and a mantis user has to created with viewer rights to all public projects
33
/* Change the following in your mantis config_inc.php (replace dummy with your created user)
34
# --- anonymous login -----------
35
# Allow anonymous login
36
$g_allow_anonymous_login = ON;
37
$g_anonymous_account = 'dummy';
38
*/
39
define('BUG_TRACK_HREF', "http://192.168.0.8:8080/mantis/view.php?id="); //提交bug号地址
40
41
/** link to the bugtracking system, for entering new bugs */
42
define('BUG_TRACK_ENTER_BUG_HREF',"http://192.168.0.8:8080/mantis/"); //TestLink的Mantis链接地址
43
?>
经过这两步,配置成功,来看一下整合前后的区别:
1.整合前,在TestLink上执行测试用例Failed的界面

2.整合后,在TestLink上执行测试用例Failed的界面

可以明显看出来多了一个 BUG management,点下面的小蜘蛛,会打开一个新的页面

通过 Access to Bug Tracking System (Mantis) 这个链接打开Mantis,进行bug登记,登记完毕,记下此时的bug号,填写进Mantis Bug id里,点 Add bug 按钮,整个过程完成,最终会在TestLink里显示出Mantis登记的bug信息。

TestLink 和 Bugzilla 整合也是一样,这里不就再记录了。