Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oto
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
龚小红
oto
Commits
633fc37f
Commit
633fc37f
authored
Mar 06, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改钉钉推送
parent
06ba160a
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
1202 additions
and
258 deletions
+1202
-258
compiler.xml
.idea/compiler.xml
+8
-0
gradle.xml
.idea/gradle.xml
+1
-1
build.gradle
build.gradle
+4
-1
pom.xml
pom.xml
+0
-156
AnswerBean.java
src/test/java/com/kjj/bean/AnswerBean.java
+0
-15
VoteBean.java
src/test/java/com/kjj/bean/VoteBean.java
+3
-6
VoteListBean.java
src/test/java/com/kjj/bean/VoteListBean.java
+14
-0
WelfareBean.java
src/test/java/com/kjj/bean/WelfareBean.java
+9
-0
WelfareListBean.java
src/test/java/com/kjj/bean/WelfareListBean.java
+11
-0
LiveMaterial.java
src/test/java/com/kjj/cases/live/LiveMaterial.java
+225
-22
SaveAndUpdate.java
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
+5
-6
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+26
-1
JsonUtil.java
src/test/java/com/kjj/utils/JsonUtil.java
+18
-0
liveTestNG.xml
src/test/liveTestNG.xml
+5
-5
report.html
test-output/report.html
+873
-45
No files found.
.idea/compiler.xml
View file @
633fc37f
...
...
@@ -3,6 +3,14 @@
<component
name=
"CompilerConfiguration"
>
<annotationProcessing>
<profile
default=
"true"
name=
"Default"
enabled=
"true"
/>
<profile
name=
"Gradle Imported"
enabled=
"true"
>
<outputRelativeToContentRoot
value=
"true"
/>
<processorPath
useClasspath=
"false"
>
<entry
name=
"$USER_HOME$/Applications/gradle-6.6.1/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.12/48e4e5d60309ebd833bc528dcf77668eab3cd72c/lombok-1.18.12.jar"
/>
</processorPath>
<module
name=
"kjj.test"
/>
<module
name=
"kjj.main"
/>
</profile>
</annotationProcessing>
<bytecodeTargetLevel
target=
"1.8"
/>
</component>
...
...
.idea/gradle.xml
View file @
633fc37f
...
...
@@ -5,7 +5,7 @@
<option
name=
"linkedExternalProjectsSettings"
>
<GradleProjectSettings>
<option
name=
"delegatedBuild"
value=
"true"
/>
<option
name=
"testRunner"
value=
"
GRADLE
"
/>
<option
name=
"testRunner"
value=
"
PLATFORM
"
/>
<option
name=
"distributionType"
value=
"DEFAULT_WRAPPED"
/>
<option
name=
"externalProjectPath"
value=
"$PROJECT_DIR$"
/>
<option
name=
"gradleJvm"
value=
"1.8"
/>
...
...
build.gradle
View file @
633fc37f
...
...
@@ -23,7 +23,10 @@ repositories {
}
dependencies
{
implementation
'org.projectlombok:lombok:1.18.16'
compile
'org.projectlombok:lombok:1.18.12'
annotationProcessor
'org.projectlombok:lombok:1.18.12'
testCompile
'org.projectlombok:lombok:1.18.12'
testAnnotationProcessor
'org.projectlombok:lombok:1.18.12'
compile
group:
'com.alibaba'
,
name:
'fastjson'
,
version:
'1.2.58'
compile
(
group:
'commons-lang'
,
name:
'commons-lang'
,
version:
'2.6'
)
{
...
...
pom.xml
deleted
100644 → 0
View file @
06ba160a
<?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.config.ExtentTestNGIReporterListener
</value>
</property>
</properties>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
src/test/java/com/kjj/bean/AnswerBean.java
View file @
633fc37f
...
...
@@ -8,20 +8,5 @@ public class AnswerBean {
private
String
optionDetail
;
private
int
optionType
;
public
String
getOptionDetail
()
{
return
optionDetail
;
}
public
void
setOptionDetail
(
String
optionDetail
)
{
this
.
optionDetail
=
optionDetail
;
}
public
int
getOptionType
()
{
return
optionType
;
}
public
void
setOptionType
(
int
optionType
)
{
this
.
optionType
=
optionType
;
}
}
src/test/java/com/kjj/bean/VoteBean.java
View file @
633fc37f
...
...
@@ -5,11 +5,8 @@ import lombok.Data;
@Data
public
class
VoteBean
{
private
String
answer
;
private
String
relationResource
;
private
String
relationResourceId
;
private
int
id
;
private
String
name
;
private
int
resourceType
;
}
src/test/java/com/kjj/bean/VoteListBean.java
0 → 100644
View file @
633fc37f
package
com
.
kjj
.
bean
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
VoteListBean
{
private
String
answer
;
private
int
relationResourceId
;
private
VoteBean
relationResource
;
}
src/test/java/com/kjj/bean/WelfareBean.java
0 → 100644
View file @
633fc37f
package
com
.
kjj
.
bean
;
import
lombok.Data
;
@Data
public
class
WelfareBean
{
private
int
id
;
}
src/test/java/com/kjj/bean/WelfareListBean.java
0 → 100644
View file @
633fc37f
package
com
.
kjj
.
bean
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
WelfareListBean
{
private
int
totalCount
;
private
List
<
WelfareBean
>
list
;
}
src/test/java/com/kjj/cases/live/LiveMaterial.java
View file @
633fc37f
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
View file @
633fc37f
...
...
@@ -94,26 +94,24 @@ public class SaveAndUpdate implements AdminAuthorization {
ids
.
add
(
291L
);
ids
.
add
(
292L
);
ids
.
add
(
293L
);
ids
.
add
(
294L
);
ids
.
add
(
295L
);
saveOrUpdateParam
.
put
(
"ids"
,
ids
);
Response
saveOrUpdateRes
=
network
.
postResponse
(
saveOrUpdateParam
,
BasicConfig
.
MANAGER_SAVEORUPDATE
);
boolean
data2
=
saveOrUpdateRes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data2
);
Assert
.
assert
True
(
data2
,
network
.
message
(
saveOrUpdateParam
,
BasicConfig
.
MANAGER_SAVEORUPDATE
,
"互动问题配置失败"
,
saveOrUpdateRes
.
body
().
asString
()));
Assert
.
assert
NotNull
(
data2
,
network
.
message
(
saveOrUpdateParam
,
BasicConfig
.
MANAGER_SAVEORUPDATE
,
"互动问题配置失败"
,
saveOrUpdateRes
.
body
().
asString
()));
//投票
Map
<
String
,
Object
>
saveOrUpdate2Param
=
new
HashMap
<>();
saveOrUpdate2Param
.
put
(
"liveId"
,
liveID
);
List
<
Long
>
ids1
=
new
ArrayList
<>();
ids1
.
add
(
227
L
);
ids1
.
add
(
226
L
);
ids1
.
add
(
378
L
);
ids1
.
add
(
380
L
);
saveOrUpdate2Param
.
put
(
"ids"
,
ids1
);
Response
saveOrUpdate2Res
=
network
.
postResponse
(
saveOrUpdateParam
,
BasicConfig
.
MANAGER_SAVEORUPDATE2
);
boolean
data3
=
saveOrUpdate2Res
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data3
);
Assert
.
assert
True
(
data3
,
network
.
message
(
saveOrUpdate2Param
,
BasicConfig
.
MANAGER_SAVEORUPDATE2
,
"投票配置失败"
,
saveOrUpdate2Res
.
body
().
asString
()));
Assert
.
assert
NotNull
(
data3
,
network
.
message
(
saveOrUpdate2Param
,
BasicConfig
.
MANAGER_SAVEORUPDATE2
,
"投票配置失败"
,
saveOrUpdate2Res
.
body
().
asString
()));
//产品资料
Map
<
String
,
Object
>
saveOrUpdate3Param
=
new
HashMap
<>();
...
...
@@ -266,6 +264,7 @@ public class SaveAndUpdate implements AdminAuthorization {
Answer
.
setOptionDetail
(
"选项一"
);
Answer
.
setOptionType
(
1
);
Answers
.
add
(
Answer
);
AnswerBean
Answer2
=
new
AnswerBean
();
Answer2
.
setOptionDetail
(
"选项二"
);
Answer2
.
setOptionType
(
2
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
633fc37f
...
...
@@ -76,8 +76,33 @@ public class BasicConfig {
//***************直播素材*****************
public
static
final
String
MANAGER_SAVEORUPDATE6
=
"https://kjj-mng.duibatest.com.cn
/kjy/manager/conf/base/welfare/saveOrUpdate"
;
public
static
final
String
MANAGER_SAVEORUPDATE6
=
MANAGER_HOST
+
"
/kjy/manager/conf/base/welfare/saveOrUpdate"
;
public
static
final
String
MANAGER_WELFARELIST
=
MANAGER_HOST
+
"/kjy/manager/conf/base/welfare/list"
;
public
static
final
String
MANAGER_DEL
=
MANAGER_HOST
+
"/kjy/manager/conf/base/welfare/del"
;
public
static
final
String
MANAGER_CHOICE
=
MANAGER_HOST
+
"/kjy/manager/conf/base/choice/saveOrUpdate"
;
public
static
final
String
MANAGER_GETLIST
=
MANAGER_HOST
+
"/kjy/manager/conf/base/choice/getList"
;
public
static
final
String
MANAGER_DELCHOICE
=
MANAGER_HOST
+
"/kjy/manager/conf/base/choice/delChoice"
;
public
static
final
String
MANAGER_LIST1
=
MANAGER_HOST
+
"/kjy/manager/conf/base/question/list"
;
public
static
final
String
MANAGER_DEL1
=
MANAGER_HOST
+
"/kjy/manager/conf/base/question/del"
;
public
static
final
String
MANAGER_QUESTION
=
MANAGER_HOST
+
"/kjy/manager/conf/base/question/saveOrUpdate"
;
public
static
final
String
MANAGER_RESOURCE
=
MANAGER_HOST
+
"/kjy/manager/live/resource/saveOrUpdatePic"
;
public
static
final
String
MANAGER_RESOURCELIST
=
MANAGER_HOST
+
"/kjy/manager/live/resource/list"
;
public
static
final
String
MANAGER_GELRESOURCE
=
MANAGER_HOST
+
"/kjy/manager/live/resource/delResource"
;
public
static
final
String
MANAGER_SAVEORUPDATELINK
=
MANAGER_HOST
+
"/kjy/manager/live/resource/saveOrUpdateLink"
;
// public static final String MANAGER_SAVEORUPDATELINK= MANAGER_HOST+ "/kjy/manager/live/resource/list";
// *************** 素材ID ***************
...
...
src/test/java/com/kjj/utils/JsonUtil.java
0 → 100644
View file @
633fc37f
package
com
.
kjj
.
utils
;
import
com.alibaba.fastjson.JSON
;
import
com.kjj.bean.WelfareListBean
;
import
groovy.json.JsonBuilder
;
import
io.restassured.response.Response
;
public
class
JsonUtil
{
private
JsonUtil
()
{
}
public
static
<
T
>
T
parseResponseToBean
(
Response
response
,
Class
<
T
>
tClass
){
Object
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
String
str
=
new
JsonBuilder
(
data
).
toString
();
return
JSON
.
parseObject
(
str
,
tClass
);
}
}
src/test/liveTestNG.xml
View file @
633fc37f
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"直播"
verbose=
"1"
thread-count=
"3"
>
<!-- <test preserve-order="true" name="创建直播">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.live.SaveAndUpdate"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"创建直播"
>
<classes
>
<class
name=
"com.kjj.cases.live.SaveAndUpdate"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name=
"直播素材"
>
<classes>
...
...
test-output/report.html
View file @
633fc37f
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment