Commit a3dea6f7 authored by 张慧锋's avatar 张慧锋

更改为gradle项目

parent f98b6aef
# maven ignore
target/
*.jar
*.war
*.zip
*.tar
*.tar.gz
# eclipse ignore
.settings/
.project
.classpath
# idea ignore
.idea/
*.ipr
*.iml
*.iws
# gradle ignore
.gradle/
# temp ignore
*.log
*.cache
*.diff
*.patch
*.tmp
# system ignore
.DS_Store
Thumbs.db
bin
build
.class
#.gitignore
classes/
out/
node_modules
*.map
#rebel ignore
**/rebel.xml
gradlew
gradlew.bat
gradle/wrapper/gradle-wrapper.properties
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="kjj" />
<module name="kejiji" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel target="1.8">
<module name="kejiji" target="1.8" />
</bytecodeTargetLevel>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleHome" value="$USER_HOME$/Downloads/gradle-5.5.1" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
......@@ -16,5 +16,35 @@
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="http://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenLocal" />
<option name="name" value="MavenLocal" />
<option name="url" value="file:$MAVEN_REPOSITORY$/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="http://nexus.dui88.com:8081/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://plugins.gradle.org/m2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven3" />
<option name="name" value="maven3" />
<option name="url" value="http://repo.spring.io/plugins-release" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
......@@ -11,7 +14,7 @@
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
apply plugin: 'java'
apply plugin: 'maven'
group = 'kjj'
version = '1.0-SNAPSHOT'
description = """"""
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
maven { url "http://nexus.dui88.com:8081/nexus/content/groups/public/" }
maven { url "https://plugins.gradle.org/m2/" } //sonarqube
maven { url "http://repo.spring.io/plugins-release" }
mavenCentral()
}
dependencies {
compile group: 'com.alibaba', name: 'fastjson', version:'1.2.58'
compile(group: 'commons-lang', name: 'commons-lang', version:'2.6') {
exclude(module: 'commons-logging')
}
compile group: 'mysql', name: 'mysql-connector-java', version:'8.0.15'
compile group: 'org.apache.poi', name: 'poi', version:'4.1.0'
compile group: 'org.apache.poi', name: 'poi-ooxml', version:'3.17'
compile group: 'com.relevantcodes', name: 'extentreports', version:'2.41.0'
compile group: 'com.vimalselvam', name: 'testng-extentsreport', version:'1.3.1'
compile group: 'com.aventstack', name: 'extentreports', version:'3.0.6'
compile group: 'com.google.inject', name: 'guice', version:'4.2.2'
testCompile group: 'org.testng', name: 'testng', version:'6.8.8'
testCompile group: 'io.rest-assured', name: 'rest-assured', version:'4.0.0'
}
<?xml version="1.0" encoding="UTF-8"?>
<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.0</modelVersion>
<groupId>kjj</groupId>
<artifactId>kjj</artifactId>
<version>1.0-SNAPSHOT</version>
<!-- maven 参数配置,这里引用不同的testng.xml -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<!-- maven 引用依赖不同的jar -->
<dependencies>
<!--导入TestNG依赖包-->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.8</version>
<scope>test</scope>
</dependency>
<!-- 导入fastjson包 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.58</version>
</dependency>
<!-- rest-assured -->
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<!-- 导入commons-lang的jar包 -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 导入Mysql数据库链接jar包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.15</version>
</dependency>
<!-- 引入poi,解析workbook视图 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
<!-- 依赖reportNg 关联testNg-->
<!-- <dependency>-->
<!-- <groupId>org.uncommons</groupId>-->
<!-- <artifactId>reportng</artifactId>-->
<!-- <version>1.1.4</version>-->
<!-- <scope>test</scope>-->
<!-- <exclusions>-->
<!-- <exclusion>-->
<!-- <groupId>org.testng</groupId>-->
<!-- <artifactId>testng</artifactId>-->
<!-- </exclusion>-->
<!-- </exclusions>-->
<!-- </dependency>-->
<!-- ExtentReports测试报告 关联testNg-->
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.0</version>
</dependency>
<dependency>
<groupId>com.vimalselvam</groupId>
<artifactId>testng-extentsreport</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>3.0.6</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>4.2.2</version>
</dependency>
</dependencies>
<!-- 编译插件 -->
<build>
<defaultGoal>compile</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<encoding>utf-8</encoding>
<!--源代码的编译-->
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<suiteXmlFiles>
<suiteXmlFile>src/test/testNG.xml</suiteXmlFile>
</suiteXmlFiles>
<properties>
<!--即使测试失败,也继续下面的测试-->
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value>com.kjj.qa.config.ExtentTestNGIReporterListener</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
rootProject.name = 'kjj'
package com.kjj.qa.cases;
import com.kjj.qa.utils.BaseUtils;
import com.google.inject.internal.asm.$TypePath;
import com.kjj.qa.utils.NetworkUtils;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.IExpectedExceptionsAnnotation;
import org.testng.annotations.Test;
import org.testng.remote.strprotocol.IMessage;
import java.io.IOException;
import java.lang.reflect.Array;
import java.util.*;
import static com.kjj.qa.config.BasicConfig.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.kjj.qa.config.BasicConfig.BOSS_CREATE;
import static com.kjj.qa.config.BasicConfig.BOSS_DETAIL;
import static com.kjj.qa.config.BasicConfig.BOSS_EDITCONFIG;
import static com.kjj.qa.config.BasicConfig.BOSS_ISDEMO;
import static com.kjj.qa.config.BasicConfig.BOSS_PUBLISH;
import static com.kjj.qa.config.BasicConfig.BOSS_RECEIVERLIST;
import static com.kjj.qa.config.BasicConfig.BOSS_TEAMTASKLIST;
public class BossTest {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment