开源(LuckFrame)自动化测试集成环境的搭建(一)
项目地址:http://www.luckyframe.cn/allwz/v33beta-135.html
备注:最近一直用python+flask做一个测试项目管理系统,用例管理、自动化集成,做了一半放弃了,工作量太大,又可能重复造轮子,转向寻找已经成型的开源的系统,所以就有了该篇文章的存在
(1)Ubuntu下mysql 的安装
sudo apt-get install mysql-server
msyql初始化
sudo mysql_secure_installation
1
VALIDATE PASSWORD PLUGIN can be used to test passwords...
Press y|Y for Yes, any other key for No: N (我的选项)
2
Please set the password for root here...
New password: (输入密码)
Re-enter new password: (重复输入)
3
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them...
Remove anonymous users? (Press y|Y for Yes, any other key for No) : N (我的选项)
4
Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network...
Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y (我的选项)
5
By default, MySQL comes with a database named 'test' that
anyone can access...
Remove test database and access to it? (Press y|Y for Yes, any other key for No) : N (我的选项)
6
Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.
Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y (我的选项)
(2)登录mysql,并创建项目需要的数据库luckyframe
mysql -uroot -p
创建需要的数据
create database luckyframe
给创建的数据赋予权限
GRANT ALL PRIVILEGES ON luckyframe.* to 'root'@'%' IDENTIFIED BY "admin123";
刷新
flush privileges;
修改mysql配置文件,位置:vim /etc/mysql/my.cnf
添加如下内容:
[mysqld]
lower_case_table_names=1
character-set-server= utf8
default-time-zone= '+8:00'
接着重启sql服务:service mysql restart
查看sql服务状态是否正常,如图所示:service mysql status

备注:在windows下使用Navicat验证是否能正确连接到ubuntu上面的mysql,如果连接不上,在ubuntu上面验证3306端口是否开放
使用命令查看:netstat -an|grep 3306

表示该3306端口没有开放
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf
注释掉:bind-address =127.0.0.1这句
重启ubuntu
再次查看:netstat -an|grep 3306

ubuntu服务端的部署
(4)如果你是下载的编译包,那么直接用解压软件打开LuckyFrameWeb.jar压缩包(不用解压),然后进入LuckyFrameWeb.jar\BOOT-INF\classes这个路径,用记录本方式打开application-druid.yml这个配置文件,修改其中的数据库链接IP、端口,数据库名,数据库用户以及密码,修改完成后,重新保存到压缩包中即可

备注1、:我这里是解压后,修改过application-druid.yml这个配置文件后(配置文件如果localhost不行,就直接用服务器的ip地址代替),再直接覆盖未解压的jar文件
备注2、:修改完成后,上传到unubuntu后,把所在目录的权限修改一下
chmod -R 755 webTest/
(5)接着直接用命令运行:

1、后台方式:nohup java -jar LuckyFrameWeb.jar &
2、前台方式:java -jar LuckyFrameWeb.jar

(6)登录(用户名和密码默认都是admin)
在浏览器中直接用服务器ip地址进行访问

windows客户端的部署
(7)直接修改配置文件

然后直接双击运行:start_service


接着在服务端查看客户端是否连接成功
