【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
下一篇 »
推荐文章
热门文章
-
随机森林算法的改进方法
2024-10-02 -
基于随机森林算法的风险预警模型研究
2024-10-02 -
Python中的随机森林算法详解
2024-10-02 -
随机森林发展历史
2024-10-02 -
如何使用随机森林进行时间序列数据模式识别(八)
2024-10-02 -
随机森林回归模型原理
2024-10-02 -
如何使用随机森林进行时间序列数据模式识别(六)
2024-10-02 -
如何使用随机森林进行时间序列数据预测(四)
2024-10-02 -
如何使用随机森林进行异常检测(六)
2024-10-02 -
随机森林算法和grandientboosting算法 -回复
2024-10-02 -
随机森林方法总结全面
2024-10-02 -
随机森林算法原理和步骤
2024-10-02 -
随机森林的原理
2024-10-02 -
随机森林 重要性
2024-10-02 -
随机森林算法
2024-10-02 -
机器学习中随机森林的原理
2024-10-02 -
随机森林算法原理
2024-10-02 -
使用计算机视觉技术进行动物识别的技巧
2024-10-02 -
基于crf命名实体识别实验总结
2024-10-02 -
transformer预测模型训练方法
2024-10-02
最新文章
-
随机森林算法介绍及R语言实现
2024-10-02 -
基于随机森林优化的神经网络算法在冬小麦产量预测中的应用研究_百度文 ...
2024-10-02 -
基于正则化贪心森林算法的情感分析方法研究
2024-10-02 -
随机森林算法和grandientboosting算法
2024-10-02 -
基于随机森林的图像分类算法研究
2024-10-02 -
随机森林结合直接正交信号校正的模型传递方法
2024-10-02
发表评论