【Selenium项⽬实战】项⽬环境搭建:安装JDK、mysql、
Tomcat、jpres。。。
前⾔
⼀直想学习⾃动化测试,但是都没⾏动,业余时间学习零零碎碎并记录20210416。
【Selenium项⽬实战】
1. 项⽬环境搭建:安装JDK、mysql、Tomcat、jpress和测试系统
2. 需求分析和⽤例设计
3. 项⽬架构设计
4. 完成项⽬基本测试
5. 解决验证码问题
6. 完成项⽬测试⽤例
项⽬环境搭建
本项⽬是⼀个JAVA开源项⽬,需要搭建JAVA运⾏环境,另外项⽬⽤到了数据库,所以需要安装数据库
1、安装JDK(参考:)
(1)安装jdk软件⼀般步骤:
到Oracle官⽹下载JDK1.8安装包。
打开获取到的安装包按步骤安装到系统上。
配置系统的环境变量。
验证JDK1.8是否安装成功。
但是!在官⽹下载速度偏慢!!
(2)⼩编这边给⼤家附上从官⽹下载好的jdk-8u211-macosx-x64.dmg,其下载地址如下:
安装包如下图所⽰:
(ps:名称为jdk-8u211-macosx-x64.dmg,表⽰这是java8版本号为211的JDK安装包。)
(3)下载完成后,我们可以开始安装啦
1、双击dmg安装包
点击JDK 8 Update 211.pkg,后⾯就是傻⽠式的安装了,⼀直按照系统提⽰安装就好了~
2、配置系统的环境变量
上⼀步骤,实际上,我们只是把JDK1.8的⽂件复制到操作系统上。但是我们如果要在terminal终端(或者iTerm2)上使JAVA命令,还要让应⽤知道JDK1.8环境的存在,那我们还需要配置系统的环境变量。
⾸先到JDK安装的主⽬录:
/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
3、打开终端
进⼊当前⽤户的home⽬录:
cd ~/
打开.bash_profile并编辑:
open .bash_profile
在⽂件的末尾加上,并保存:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk/Contents/Home
4、验证JDK1.8是否安装成功
java -version
附上安装成功的截图:
2、安装Tomcat,⼩编以mac为例
(2)解压,启动
将⽂件解压,可以改名成为Tomcat,进⼊到bin⽬录下
MacBook-Pro Library % cd apache-tomcat-8.5.37/bin
(3)开启
MacBook-Pro bin % ./startup.sh
Using CATALINA_BASE: /Users/ff/Library/apache-tomcat-8.5.37
Using CATALINA_HOME: /Users/ff/Library/apache-tomcat-8.5.37
Using CATALINA_TMPDIR: /Users/ff/Library/apache-tomcat-8.5.37/temp
Using JRE_HOME: /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk的副本/Contents/Home
Using CLASSPATH: /Users/ff/Library/apache-tomcat-8.5.37/bin/bootstrap.jar:/Users/zhengxiaofang/Library/apache-tomcat-8.5.37/bin/tomcat-juli.jar
Tomcat started.
(4)关闭
./shutdown.sh
(5)查看进程
MacBook-Pro bin % ps -ef|grep tomcat-
501 9019 1 0 11:18上午 ttys000 0:03.24 /Library/Java/JavaVirtualMachines/jdk1.8.0_211.jdk的副本/Contents/Home/bin/java -Djava.fig.file= 501 9022 7540 0 11:18上午 ttys000 0:00.01 grep tomcat-
MacBook-Pro bin %
(6)测试。在浏览器中打开localhost:8080
3、安装Mysql
Linux centos7x64系统下安装mysql(在线/离线)参考:
MAC安装Mysql
⼀、下⾯以MAC为例
1、执⾏安装命令:brew install mysql。
ffdeMacBook-Pro /Library % brew install mysql
==> Downloading homebrew.bintray/bottles/protobuf-3.12.4.catalina.
==> Downloading from d29vzk4ow07wi7.cloudfront/a18a7e12c9effa966240e3123ccd6d222b3663ae0399e48d00cb6c61bdae63f4?response-content-d >>>>>>>>>>>>>>## 100.0%
==> Downloading homebrew.bintray/bottles/mysql-8.0.21.catalina.
==> Downloading from d29vzk4ow07wi7.cloudfront/169ba3fdb1a0e61c98c47d021fbc20a9bd5513ac455b68ed449ce6fe96dbfa93?response-content-di >>>>>>>>>>>>>>## 100.0%
==> Installing dependencies for mysql: protobuf
==> Installing mysql dependency: protobuf
==> Pouring protobuf-3.12.4.catalina.
==> Caveats
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/protobuf
==> Summary
/usr/local/Cellar/protobuf/3.12.4: 268 files, 19.8MB
==> Installing mysql
==> Pouring mysql-8.0.21.catalina.
==> /usr/local/Cellar/mysql/8.0.21/bin/mysqld --initialize-insecure --user=zhengxiaofang --basedir=/usr/local/Cellar/mysql/8.0.21 --datadir=/usr/local/var/mysql --tm ==> Caveats
We've installed your MySQL database without a root password. To secure it run:
mysql_secure_installation
MySQL is configured to only allow connections from localhost by default
To connect run:
mysql -uroot
To have launchd start mysql now and restart at login:
brew services start mysql
Or, if you don't want/need a background service you can just run:
mysql.server start
==> Summary
/usr/local/Cellar/mysql/8.0.21: 290 files, 291.2MB
==> Caveats
==> protobuf
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/protobuf
==> mysql
We've installed your MySQL database without a root password. To secure it run:
mysql_secure_installation
MySQL is configured to only allow connections from localhost by default
To connect run:
mysql -uroot
To have launchd start mysql now and restart at login:
brew services start mysql
Or, if you don't want/need a background service you can just run:
mysql.server start
ffdeMacBook-Pro /Library %
或者搜索⼀下mysql版本:brew search mysql,再安装mysql:brew install mysql@5.7
ffdeMBP LaunchAgents % brew search mysql
==> Formulae
automysqlbackup mysql++ mysql-client@5.7 mysql-connector-c++@1.1 mysql-search-replace mysql@5.7
mysql mysql-client mysql-connector-c++ mysql-sandbox mysql@5.6 mysqltuner
==> Casks
homebrew/cask/mysql-connector-python homebrew/cask/mysql-utilities homebrew/cask/sqlpro-for-mysql
homebrew/cask/mysql-shell homebrew/cask/navicat-for-mysql
ffdeMBP LaunchAgents % brew install mysql@5.7
==> Downloading homebrew.bintray/bottles/mysql%405.7-5.7.31.catalina.
==> Downloading from d29vzk4ow07wi7.cloudfront/14ae8121e150830abdf81c06028a0aeeeae3051e5571a0f60fe54ba60fcc0586?response-content-d >>>>>>>>>>>>>>## 100.0%
==> Pouring mysql@5.7-5.7.31.catalina.
jdk最新下载安装步骤
==> /usr/local/Cellar/mysql@5.7/5.7.31/bin/mysqld --initialize-insecure --user=zhengxiaofang --basedir=/usr/local/Cellar/mysql@5.7/5.7.31 --datadir=/usr/local/var/ ==> Caveats
We've installed your MySQL database without a root password. To secure it run:
mysql_secure_installation
MySQL is configured to only allow connections from localhost by default
To connect run:
mysql -uroot
mysql@5.7 is keg-only, which means it was not symlinked into /usr/local,
because this is an alternate version of another formula.
If you need to have mysql@5.7 first in your PATH run:
echo 'export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"' >> ~/.zshrc
For compilers to find mysql@5.7 you may need to set:
export LDFLAGS="-L/usr/local/opt/mysql@5.7/lib"
export CPPFLAGS="-I/usr/local/opt/mysql@5.7/include"
To have launchd start mysql@5.7 now and restart at login:
brew services start mysql@5.7
Or, if you don't want/need a background service you can just run:
/usr/local/opt/mysql@5.7/bin/mysql.server start
==> Summary
/usr/local/Cellar/mysql@5.7/5.7.31: 319 files, 232.4MB
ffdeMBP LaunchAgents %
2、安装完后启动mysql:mysql.server start。重启 mysql:brew services restart mysql
ffdeMacBook-Pro /Library % mysql.server start
Starting MySQL
. SUCCESS!
3、执⾏安全设置:mysql_secure_installation,按照提⽰选择密码等级,并设置root密码
ffdeMacBook-Pro /Library % mysql_secure_installation
Securing the MySQL server deployment.
Connecting to MySQL using a blank password.
VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?
Press y|Y for Yes, any other key for No: y
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
基于Android的植保服务平台的研究与实现
« 上一篇
Linux安装JDK1.8.0_191
下一篇 »
推荐文章
热门文章
-
一种任意人头与任意人体的3D结合方法
2025-01-07 -
正则匹配c语言中8进制
2025-01-07 -
fortran数据格式
2025-01-07 -
python中文本转数字用的公式
2025-01-07 -
gh 文本变数值
2025-01-07 -
js判断输入是否为正整数、浮点数等数字的函数代码
2025-01-07 -
qt浮点数正则表达式
2025-01-07 -
QT正则表达式限制输入值
2025-01-07 -
手机号码和电话号码的正则表达式
2025-01-07 -
str转浮点-概述说明以及解释
2025-01-07 -
英豪结尾的诗句
2025-01-07 -
Java正则表达式:符合以特定字符串开头,以特定字符串结尾的所有结果
2025-01-07 -
machinebuilder使用手册
2025-01-07 -
ASP.NET网站建设基本常用代码
2025-01-07 -
LCD显示实时时钟
2025-01-07 -
经纬度正则表达式解析
2025-01-07 -
前端科学计数法转数字
2025-01-07 -
python正则表达式re之compile函数解析
2025-01-07 -
pythonunittest之断言及示例
2025-01-07 -
[lua]lua中匹配字符串小数
2025-01-07
最新文章
-
nginx map用法 正则
2025-01-07 -
Prometheus监控学习笔记之初识PromQL
2025-01-07 -
关于PHP中的webshell
2025-01-07 -
python中re.findall函数实例用法
2025-01-07 -
nginx url表达式
2025-01-07 -
nginx 正则匹配参数
2025-01-07
发表评论