【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
下一篇 »
热门文章
-
excel文字递增函数公式
2025-02-08 -
数字递增公式
2025-02-08 -
notepad 正则变量运算
2025-02-08 -
C++regex库常用函数及实例
2025-02-08 -
js正则表达式之前瞻后顾与非捕获分组
2025-02-08 -
indesign正则数字和英文之间的空格
2025-02-08 -
C#匹配中文字符串的4种正则表达式分享
2025-02-08 -
PHP正则表达式匹配中文字符
2025-02-08 -
匹配中文汉字的正则表达式介绍
2025-02-08 -
Python正则表达式如何进行字符串替换
2025-02-08 -
orcl中用正则表达式
2025-02-08 -
sql正则表达式excel
2025-02-08 -
dataframe正则表达式
2025-02-08 -
postgress sql正则
2025-02-08 -
el-upload accept 正则表达式
2025-02-08 -
半小时 正则表达式
2025-02-08 -
判断科学计数法的正则
2025-02-08 -
根据url判断静态资源的方法
2025-02-08 -
Java正则表达式-匹配正负浮点数
2025-02-08 -
替换模糊匹配正则-hive
2025-02-08
最新文章
-
一种基于正则表达式的DBC文件解析及报文分析方法[发明专利]
2025-02-08 -
能被5整除的十进制整数的正规表达式
2025-02-08 -
大于0小于等于1的正则表达式
2025-02-08 -
linux grep 26个字母
2025-02-08 -
java pattern 正则表达式
2025-02-08 -
掌握文本编辑器中的搜索和替换技巧
2025-02-08
发表评论