您的位置:首页 > 其它

Ubuntu安装Testlink/Bugzilla的坑

2017-01-02 17:57 387 查看
一,安装testlink

1,按照http://www.ibm.com/developerworks/cn/opensource/os-cn-testlink1/装,注意testlink放入/var/www/html里面

下面几个改变权限命令要用到:

mkdir -p /var/testlink/logs
mkdir -p /var/testlink/upload_area
chown -R www-data.www-data /var/testlink
chmod 777 -R /var/www/html/testlink/
sudo chown www-data:www-data /var/www/html/testlink/gui/templates_c


2,下载testlink解压为testlink_1.9.10修改成testlink 后mv到/var/www,这里有个问题,貌似放在/var/www/html下面才可以,放在www下时候localhost进入的是apatha2页面,放入/var/www/htmlhttp://localhost/testlink/install/可以出来安装界面~~~

3,浏览器输入http://localhost/testlink/install/进入安装(有时候Chrome打开是文本格式的html,换个浏览器打开)

4,最后提示DB Access Error - debug_print_backtrace() OUTPUT START,就升级MySQL到最新版本5.6(1.9.15,but this is not good for bugzilla)

5,提示TestLink couldn’t write the config file. Please copy the following into the ../config_db.inc.php file,修改testlink整个文件夹的权限

cd /var/www/html
sudo chmod 777 testlink -R


5,testlink汉化:

sudo gedit /var/www/html/testlink/config.inc.php


找到$tlCfg->default_language = ‘zh_CN’;

然后testlink主页 My Settings->Locale->Chinese

查看本机ip:ifconfig

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04

https://www.linode.com/docs/websites/apache/apache-web-server-on-ubuntu-14-04

二,安装bugzilla:按照http://bugzilla.readthedocs.io/en/latest/installing/quick-start.html

汉化:把汉化包考入文件夹下:

sudo cp -r ~/Downloads/Bugzilla5.0hhb_downcc/zh-CN /var/www/html/bugzilla/template/
sudo chmod 777 zh-CN -R


然后重新

sudo ./checksetup.pl


打开http://192.168.5.130/bugzilla/可以发现汉化好了。

汉化包下载:http://git.oschina.net/hulon/Bugzilla/tree/master/

三,整合

http://www.51testing.com/html/88/n-2187288.html

<!-- Template bugzilladbInterface -->
<issuetracker>
<dbhost>localhost</dbhost>
<dbname>bugs</dbname>
<dbschema>bugs</dbschema>
<dbtype>mysql</dbtype>
<dbuser>bugs</dbuser>
<dbpassword>gimbal123</dbpassword>
<uricreate>http://localhost:80/bugzilla/</uricreate>
<uriview>http://localhost:80/bugzilla/show_bug.cgi?id=</uriview>
</issuetracker>


打开 /var/www/html/bugzilla/localconfig 可以找到以上几个要改的,比如dbhost,dbname,dbuser,dbpassword

https://thecodeisbroken.wordpress.com/2016/03/03/bugzillayou-buggin-me/

执行完以上操作后,在主页-测试管理-选中相应的项目,将Issue Tracker选为活动的,并在右边列表里选择bugailla(bugzilla(interface:db)),然后打开主页-测试执行,执行测试,左下展开树,就可以看到问题管理处的小爬虫啦啦

四,使用时候

登录时候出错 ERROR :There was an error sending mail from ‘bugzilla-daemon’ to kylefan@gmail.com, no sender:

解决:

sudo gedit /var/www/html/bugzilla/data/params.json


找到:

“mail_delivery_method” : “SMTP”,(Sendmail is not ok even though you do:sudo apt-get install sendmail)

“mailfrom” :”kylefan15@gmail.com”,(mail-id given while install)

“maintainer” : “kylefan15@gmail.com” (mail-id given while install)

使用testlink:http://wenku.baidu.com/link?url=lc3YSCyi-JupJPhnYtCtgB8ETgk74p1CHEN7T0KFBfEp8oTDiFcd1jrDumidT72TfxaLty3VbKpslkgYTJkCTgLh_0ANG7EIvxCekDfgIsG

注意:3.2创建需求这里,左侧选中前台功能测试后右侧齿轮点开才有创建新产品需求

5.2处需要5.1创建测试计划里面选中active选项,才有主页测试计划管理下的编辑/删除里程碑。

执行测试时候提示SMTP Error: Could not connect to SMTP host. PROBLEMS SENDING MAIL TO:和testlink Mailer Error: SMTP Error: Could not connect to SMTP host.

设置config.inc.php中的

$g_smtp_host        = 'smtp.gmail.com';
$g_smtp_port = 465;
$g_tl_admin_email     = 'kylefan15@gmail.com'; # for problem/error notification
$g_from_email         = 'kylefan15@gmail.com';  # email sender
$g_return_path_email  = 'kylefan15@gmail.com';


参考:https://support.google.com/mail/answer/7126229?p=client_login&rd=2&visit_id=0-636193600080724512-175947782#cantsignin

发送邮件 (SMTP) 服务器

smtp.gmail.com

要求 SSL:是

要求 TLS:是(如适用)

使用身份验证:是

SSL 端口:465

TLS/STARTTLS 端口:587

提示The following From address failed: kylefan15@gmail.com PROBLEMS SENDING MAIL TO: kylefan15@gmail.com,Mailer Error: The following From address failed: kylefan15@gmail.com

然后把

$g_smtp_username    = 'kylefan15@gmail.com';  # user
$g_smtp_password    = 'xxxxxxxxxx';  # gmail真实密码


又提示smtp认证错误:SMTP Error: Could not authenticate. PROBLEMS SENDING MAIL TO: kylefan15@gmail.com,Mailer Error: SMTP Error: Could not authenticate.

这是因为自己的google账户设置了安全选项,打开myaccount.google.com ,Sign-in & security,Connected apps & sites,Allow less secure apps->ON,把这个选项打开就可以了

五,配置bugzilla邮箱

http://localhost/bugzilla/editparams.cgi填入smtpserver,smtp_username,smtp_password,smtp_ssl参数后点击存储设定会报错:Can’t locate object method “quit” via package “Net::SMTP::SSL” at Bugzilla/Config/Common.pm line 370.

改:smtp.gmail.com:465,修改成功!

主页注册新账户,输入一个邮箱地址kylefan15@163.com

报错:Can’t locate object method “message” via package “To use SSL please install IO::Socket::SSL with version>=2.007 at lib/Net/SMTP.pm line 70.” (perhaps you forgot to load “To use SSL please install IO::Socket::SSL with version>=2.007 at lib/Net/SMTP.pm line 70.”?) at Bugzilla/Mailer.pm line 179.

sudo su
./install-module.pl IO::Socket::SSL


又提示从 ‘kylefan15@gmail.com’ 寄信到 ‘fk1174167718@gmail.com’ 时,出现错误: unable to establish SMTP connection to smtp.gmail.com port 465

貌似刚才的账户的密码被浏览器改了,改过来就好

注册新用户,输入邮箱xxx.gmail.com,收到的邮件里说如要继续以此一电子邮件建立帐号,请于 2017-01-10 18:25 CST 前点选以下连结:token.cgi?t=tXQmHOecvG&a=request_new_account,但是这个链接没法打开,我们在链接前加上http://localhost/bugzilla/构成http://localhost/bugzilla/token.cgi?t=tXQmHOecvG&a=request_new_account再打开:

后期使用问题:

1,新加测试用例后,需要点击添加/删除测试用例到测试计划 按钮进入添加界面添加

2,没有bugzilla连接情况:testlink主页左侧测试项目管理,手持云台项目,Issue Tracker Integration里要选中bugzilla并且是活动的
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  testlink bugzilla