1第一步:下载IntelliJ idea 代码编辑器
2第二步:下载浏览器Chrome
3第三步:下载JDK
4第四步:配置环境变量(1JAVA_HOME 2 path)
5第五步:下载Maven
6第六步:配置环境变量(1MAVEN_HOME 2path)
7第七步:下载与浏览器版本匹配的ChromeDriver
8第八步: 在 Idea里面设置 JDK , Maven
9 第九步:创建工程 project
10 第十步:pom.xml文件中写依赖(1 需要什么包去maven仓库下载依赖,拿整个dependancy 2在工程中terminal中执行 mvn clean install命令,并去maven块刷新工程和包)
11.drive
【笔记】chromedriver下载与安装方法_谷歌驱动_逸峰轻云的博客-CSDN博客
cucumebr:
Cucumber&selenium学习--工程搭建_cucumber和selenium 依赖-CSDN博客
自动化测试实战:Cucumber+Selenium测试场景应用 - 知乎
idea kubernetes插件 配置 idea cucumber插件_mob6454cc780924的技术博客_51CTO博客
Junit:
idea插件完成junit代码生成,和springboot代码示例_junitgenerator_weisian151的博客-CSDN博客
注意事项:
1 Runner文件写在test目录下
2 maven文件下conf文件夹下的settings.xml 加阿里云镜像
3 配置maven本地仓库
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0modelVersion>
-
- <groupId>org.examplegroupId>
- <artifactId>JSCTestingartifactId>
- <version>1.0-SNAPSHOTversion>
- <packaging>jarpackaging>
-
- <name>JSCTestingname>
- <url>http://maven.apache.orgurl>
-
- <properties>
- <project.build.sourceEncoding>UTF-8project.build.sourceEncoding>
- <logging.verson>1.2logging.verson>
- <selenium.version>4.13.0selenium.version>
- properties>
-
- <dependencies>
- <dependency>
- <groupId>junitgroupId>
- <artifactId>junitartifactId>
- <version>3.8.1version>
- <scope>testscope>
- dependency>
- <dependency>
- <groupId>org.apache.maven.pluginsgroupId>
- <artifactId>maven-resources-pluginartifactId>
- <version>2.4.3version>
- dependency>
- <dependency>
- <groupId>commons-logginggroupId>
- <artifactId>commons-loggingartifactId>
- <version>${logging.verson}version>
- dependency>
-
- <dependency>
- <groupId>org.seleniumhq.seleniumgroupId>
- <artifactId>selenium-javaartifactId>
- <version>${selenium.version}version>
- dependency>
-
- <dependency>
- <groupId>org.seleniumhq.seleniumgroupId>
- <artifactId>selenium-apiartifactId>
- <version>${selenium.version}version>
- dependency>
-
-
- <dependency>
- <groupId>org.seleniumhq.seleniumgroupId>
- <artifactId>selenium-chrome-driverartifactId>
- <version>4.13.0version>
- dependency>
-
- <dependency>
- <groupId>org.seleniumhq.seleniumgroupId>
- <artifactId>selenium-firefox-driverartifactId>
- <version>4.13.0version>
- dependency>
-
- <dependency>
- <groupId>org.apache.httpcomponentsgroupId>
- <artifactId>httpclientartifactId>
- <version>4.5.2version>
- dependency>
- <dependency>
- <groupId>com.aventstackgroupId>
- <artifactId>extentreportsartifactId>
- <version>3.0.6version>
- dependency>
-
- <dependency>
- <groupId>org.dom4jgroupId>
- <artifactId>dom4jartifactId>
- <version>2.0.0version>
- dependency>
-
- <dependency>
- <groupId>log4jgroupId>
- <artifactId>log4jartifactId>
- <version>1.2.17version>
- dependency>
-
- <dependency>
- <groupId>commons-emailgroupId>
- <artifactId>commons-emailartifactId>
- <version>1.1version>
- dependency>
-
- <dependency>
- <groupId>org.uncommonsgroupId>
- <artifactId>reportngartifactId>
- <version>1.1.4version>
- dependency>
-
-
-
- <dependency>
- <groupId>net.masterthoughtgroupId>
- <artifactId>cucumber-reportingartifactId>
- <version>5.6.1version>
- dependency>
-
- <dependency>
- <groupId>com.google.code.gsongroupId>
- <artifactId>gsonartifactId>
- <version>2.8.6version>
- dependency>
-
- <dependency>
- <groupId>junitgroupId>
- <artifactId>junitartifactId>
- <version>4.12version>
- dependency>
-
- <dependency>
- <groupId>io.cucumbergroupId>
- <artifactId>cucumber-junitartifactId>
- <version>7.14.0version>
- dependency>
- <dependency>
- <groupId>io.cucumbergroupId>
- <artifactId>cucumber-javaartifactId>
- <version>7.14.0version>
- dependency>
- <dependency>
- <groupId>io.cucumbergroupId>
- <artifactId>cucumber-gherkinartifactId>
- <version>7.14.0version>
- dependency>
-
- dependencies>
- project>