mantis+testlink bug系统的整合配置

 上午公司的同事说我们新搭建的bug 系统在testlink 分配测试用例的时候显示有错误.

原因在于配置没有弄好.重新配置了一下就解决了这个问题,


在testlink 和mantis 的连接过程中,要配置数据库连接 才能正常显示.

TestLink提供了与bugzilla、mantis等工具整合的功能。

TestLink和Mantis安装在同一台服务器上:

  • Mantis的链接:http://localhost/mantis/
  • TestLink的链接:http://localhost/TestLink/
  • Mantis数据库名字:bugtracker
  • Mysql登录名字:root
  • 登录密码:root

 

一、修改testlink下的config.inc.php文件

1、 打开testlink下的config.inc.php文件,将$g_interface_bugs='NO'修改为$g_interface_bugs='mantis';

 

Define ('TL_INTERFACE_BUGS', 'MANTIS');

require_once (TL_ABS_PATH . 'Lib/bugtracking/int_bugtracking.php');

二、设置Mantis的匿名登陆功能

Mantis的匿名用户具备对所有的项目都可以浏览的权限。注:这个dummy用户需要administrator在后台添加,注册不了的。

1、 修改mantis的config_inc.php文件,增加如下代码:

 

# --- 修改默认设置为简体中文 -------------

     $g_default_language ="chinese_simplified"; #默认语言为简体中文

     $g_allow_signup = ON;#是否允许新用户注册,ON是允许,OFF不允许

 

      #--- 登录设置-------------

     $g_max_failed_login_count = 5;

     $g_show_realname = ON;# 是否允许匿名登录,ON是允许,OFF不允许

     $g_allow_anonymous_login  = ON;

     $g_anonymous_account = 'dummy';

 

2、修改mantis/config_defaults_inc.php文件:

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

     #Allow anonymous login

     $g_allow_anonymous_login = ON;

     $g_anonymous_account  = 'dummy';

 

# --- 邮件设置 -------------

 $g_administrator_email  ="mantis@****.com";#

 $g_webmaster_email      ="mantis@****.com";# 管理员邮件帐号

 

  $g_from_email ="mantis@****.com";# 发送者帐号,即Mantis自动发邮件是显示的用户帐号

  $g_return_path_email="mantis@****.com";# 邮件回复地址

 $g_enable_email_notification= ON;     # 开通邮件通知

  $g_smtp_host     = "mail.****.com";     # SMTP 服务器

  $g_smtp_username= "username";     # 邮箱登录用户名

   $g_smtp_password = "password";  # 邮箱登录密码

  $g_use_phpMailer= ON;    # 使用 PHPMailer 发送邮件

  $g_phpMailer_path= "C:/xampp/htdocs/mantis/core/phpmailer"; # PHPMailer 的存放路径

 $g_phpMailer_method   = 2;   # PHPMailer 以 SMTP 方式发送 Email 

 

# --- 其他设置 -------------

 $g_show_project_menu_bar = ON;# 是否显示项目选择栏,ON是显示,OFF不显示

 $g_show_queries_count     = ON; # 在页脚是否显示执行的查询次数,ON是显示,OFF不显示

 $g_default_new_account_access_level = DEVELOPER; # 默认用户级别

 $g_view_summary_threshold   =VIEWER; #设置查看权限

  $g_window_title ="缺陷跟踪管理系统";# 浏览器标题

  $g_page_title ="缺陷跟踪管理系统";# 页面标题栏

  $g_max_failed_login_count= 5;#默认登录失败次数

  $g_show_realname= ON;#显示真名

 $g_allow_anonymous_login  = ON;# 允许用户匿名登录

 $g_anonymous_account = 'dummy';#匿名登录的用户名

 

# --- 日期设置 -------------

 $g_short_date_format = "Y-m-d"; # 短日期格式,Y 大写表示 4 位年

 $g_normal_date_format ="Y-m-d H:i"; # 普通日期格式

 $g_complete_date_format ="Y-m-d H:i:s"; # 完整日期格式

 

# --- 报表设置 -------------

  $g_use_jpgraph =ON;

  $g_jpgraph_path ="C:/xampp/htdocs/mantis/core/jpgraph-2.3.3/src/";  #设置jpgraph的路径

  $g_graph_font ='chinese_gbk';

 

三、在TestLink里配置mantis的界面参数。

必须编辑testlink下/cfg/mantis.cfg.php,如下所示:

/** The DBhost to use when connecting to the mantis db */

Define('BUG_TRACK_DB_HOST', 'localhost');

/** The nameof the database that contains the mantis tables */

define('BUG_TRACK_DB_NAME','bugtracker');

/** The DBtype being used by mantis

values:mysql,mssql,postgres*/

define('BUG_TRACK_DB_TYPE','mysql');

/** The DBtype being used by mantis */

define('BUG_TRACK_DB_USER','root');

/** The DBpassword to use for connecting to the mantis db */

define('BUG_TRACK_DB_PASS','root');

/** link tothe bugtracking system, for viewing bugs */

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

/** link tothe bugtracking system, for entering new bugs */

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



如果出现邮件无法发送的情况.可以在mantis config 里面关掉匿名访问.


原文地址:https://www.cnblogs.com/yuzaipiaofei/p/4124121.html