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
af9b13db
Commit
af9b13db
authored
Mar 04, 2021
by
张艳玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改钉钉推送
parent
1a0dbc2b
Changes
16
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
244 additions
and
4516 deletions
+244
-4516
compiler.xml
.idea/compiler.xml
+1
-6
gradle.xml
.idea/gradle.xml
+3
-1
build.gradle
build.gradle
+3
-0
AnswerBean.java
src/test/java/com/kjj/bean/AnswerBean.java
+4
-0
AnswerListBean.java
src/test/java/com/kjj/bean/AnswerListBean.java
+2
-16
RewardPkBean.java
src/test/java/com/kjj/bean/RewardPkBean.java
+3
-14
TokenUserBean.java
src/test/java/com/kjj/bean/TokenUserBean.java
+3
-43
VoteBean.java
src/test/java/com/kjj/bean/VoteBean.java
+15
-0
LiveMaterial.java
src/test/java/com/kjj/cases/live/LiveMaterial.java
+71
-0
SaveAndUpdate.java
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
+3
-3
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+5
-1
ExtentTestNGIReporterListener.java
...st/java/com/kjj/config/ExtentTestNGIReporterListener.java
+1
-1
DingTalkUtils.java
src/test/java/com/kjj/utils/DingTalkUtils.java
+2
-2
liveTestNG.xml
src/test/liveTestNG.xml
+9
-2
testNG.xml
src/test/testNG.xml
+1
-1
report.html
test-output/report.html
+118
-4426
No files found.
.idea/compiler.xml
View file @
af9b13db
...
@@ -2,12 +2,7 @@
...
@@ -2,12 +2,7 @@
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"CompilerConfiguration"
>
<component
name=
"CompilerConfiguration"
>
<annotationProcessing>
<annotationProcessing>
<profile
name=
"Maven default annotation processors profile"
enabled=
"true"
>
<profile
default=
"true"
name=
"Default"
enabled=
"true"
/>
<sourceOutputDir
name=
"target/generated-sources/annotations"
/>
<sourceTestOutputDir
name=
"target/generated-test-sources/test-annotations"
/>
<outputRelativeToContentRoot
value=
"true"
/>
<module
name=
"kjj"
/>
</profile>
</annotationProcessing>
</annotationProcessing>
<bytecodeTargetLevel
target=
"1.8"
/>
<bytecodeTargetLevel
target=
"1.8"
/>
</component>
</component>
...
...
.idea/gradle.xml
View file @
af9b13db
...
@@ -4,9 +4,11 @@
...
@@ -4,9 +4,11 @@
<component
name=
"GradleSettings"
>
<component
name=
"GradleSettings"
>
<option
name=
"linkedExternalProjectsSettings"
>
<option
name=
"linkedExternalProjectsSettings"
>
<GradleProjectSettings>
<GradleProjectSettings>
<option
name=
"delegatedBuild"
value=
"true"
/>
<option
name=
"testRunner"
value=
"GRADLE"
/>
<option
name=
"distributionType"
value=
"DEFAULT_WRAPPED"
/>
<option
name=
"distributionType"
value=
"DEFAULT_WRAPPED"
/>
<option
name=
"externalProjectPath"
value=
"$PROJECT_DIR$"
/>
<option
name=
"externalProjectPath"
value=
"$PROJECT_DIR$"
/>
<option
name=
"gradle
Home"
value=
"$USER_HOME$/Downloads/gradle-5.5.1
"
/>
<option
name=
"gradle
Jvm"
value=
"1.8
"
/>
<option
name=
"modules"
>
<option
name=
"modules"
>
<set>
<set>
<option
value=
"$PROJECT_DIR$"
/>
<option
value=
"$PROJECT_DIR$"
/>
...
...
build.gradle
View file @
af9b13db
...
@@ -22,6 +22,9 @@ repositories {
...
@@ -22,6 +22,9 @@ repositories {
mavenCentral
()
mavenCentral
()
}
}
dependencies
{
dependencies
{
implementation
'org.projectlombok:lombok:1.18.16'
compile
group:
'com.alibaba'
,
name:
'fastjson'
,
version:
'1.2.58'
compile
group:
'com.alibaba'
,
name:
'fastjson'
,
version:
'1.2.58'
compile
(
group:
'commons-lang'
,
name:
'commons-lang'
,
version:
'2.6'
)
{
compile
(
group:
'commons-lang'
,
name:
'commons-lang'
,
version:
'2.6'
)
{
exclude
(
module:
'commons-logging'
)
exclude
(
module:
'commons-logging'
)
...
...
src/test/java/com/kjj/bean/AnswerBean.java
View file @
af9b13db
package
com
.
kjj
.
bean
;
package
com
.
kjj
.
bean
;
import
lombok.Data
;
@Data
public
class
AnswerBean
{
public
class
AnswerBean
{
private
String
optionDetail
;
private
String
optionDetail
;
private
int
optionType
;
private
int
optionType
;
...
...
src/test/java/com/kjj/bean/AnswerListBean.java
View file @
af9b13db
package
com
.
kjj
.
bean
;
package
com
.
kjj
.
bean
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
@Data
public
class
AnswerListBean
{
public
class
AnswerListBean
{
private
String
questionDetail
;
private
String
questionDetail
;
private
List
<
AnswerBean
>
optionList
;
private
List
<
AnswerBean
>
optionList
;
public
String
getQuestionDetail
()
{
return
questionDetail
;
}
public
void
setQuestionDetail
(
String
questionDetail
)
{
this
.
questionDetail
=
questionDetail
;
}
public
List
<
AnswerBean
>
getOptionList
()
{
return
optionList
;
}
public
void
setOptionList
(
List
<
AnswerBean
>
optionList
)
{
this
.
optionList
=
optionList
;
}
}
}
src/test/java/com/kjj/bean/RewardPkBean.java
View file @
af9b13db
package
com
.
kjj
.
bean
;
package
com
.
kjj
.
bean
;
import
lombok.Data
;
@Data
public
class
RewardPkBean
{
public
class
RewardPkBean
{
private
String
prizeName
;
private
String
prizeName
;
private
int
ranking
;
private
int
ranking
;
public
String
getPrizeName
()
{
return
prizeName
;
}
public
void
setPrizeName
(
String
prizeName
)
{
this
.
prizeName
=
prizeName
;
}
public
int
getRanking
()
{
return
ranking
;
}
public
void
setRanking
(
int
ranking
)
{
this
.
ranking
=
ranking
;
}
}
}
\ No newline at end of file
src/test/java/com/kjj/bean/TokenUserBean.java
View file @
af9b13db
package
com
.
kjj
.
bean
;
package
com
.
kjj
.
bean
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
@Data
public
class
TokenUserBean
{
public
class
TokenUserBean
{
/**
/**
* 直播用户ID
* 直播用户ID
...
@@ -33,51 +36,8 @@ public class TokenUserBean {
...
@@ -33,51 +36,8 @@ public class TokenUserBean {
*/
*/
private
Date
disableTime
;
private
Date
disableTime
;
public
Long
getLiveUserId
()
{
return
liveUserId
;
}
public
void
setLiveUserId
(
Long
liveUserId
)
{
this
.
liveUserId
=
liveUserId
;
}
public
String
getThirdPartUId
()
{
return
thirdPartUId
;
}
public
void
setThirdPartUId
(
String
thirdPartUId
)
{
this
.
thirdPartUId
=
thirdPartUId
;
}
public
Long
getAgentId
()
{
return
agentId
;
}
public
void
setAgentId
(
Long
agentId
)
{
this
.
agentId
=
agentId
;
}
public
Long
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
Long
companyId
)
{
this
.
companyId
=
companyId
;
}
public
Long
getAdminId
()
{
return
adminId
;
}
public
void
setAdminId
(
Long
adminId
)
{
this
.
adminId
=
adminId
;
}
public
Date
getDisableTime
()
{
return
disableTime
;
}
public
void
setDisableTime
(
Date
disableTime
)
{
this
.
disableTime
=
disableTime
;
}
}
}
src/test/java/com/kjj/bean/VoteBean.java
0 → 100644
View file @
af9b13db
package
com
.
kjj
.
bean
;
import
lombok.Data
;
@Data
public
class
VoteBean
{
private
String
answer
;
private
String
relationResource
;
private
String
relationResourceId
;
}
src/test/java/com/kjj/cases/live/LiveMaterial.java
0 → 100644
View file @
af9b13db
package
com
.
kjj
.
cases
.
live
;
import
com.kjj.bean.VoteBean
;
import
com.kjj.config.BasicConfig
;
import
com.kjj.utils.BaseUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
java.util.*
;
public
class
LiveMaterial
implements
AdminAuthorization
{
@BeforeClass
public
void
setUp
()
{
adminAuth
();
BaseUtils
.
ssoLogin
();
}
@Test
(
description
=
"添加奖品"
,
priority
=
1
)
public
void
添加奖品
()
{
Map
<
String
,
Object
>
saveOrUpdateParam
=
new
HashMap
<>();
saveOrUpdateParam
.
put
(
"useDesc"
,
"盲盒锦鲤"
);
saveOrUpdateParam
.
put
(
"welfareImg"
,
"https://yun.dui88.com/kjy/image/20210304/1614844180065.jpg"
);
saveOrUpdateParam
.
put
(
"welfareUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/62c25dcb3b9b4d269a74894e4255a193.jpg"
);
saveOrUpdateParam
.
put
(
"welfareName"
,
"盲盒锦鲤"
);
saveOrUpdateParam
.
put
(
"welfarePictures"
,
"https://yun.dui88.com/kjy/image/20210304/1614844198545.jpeg"
);
saveOrUpdateParam
.
put
(
"welfarePicturesArr"
,
"https://yun.dui88.com/kjy/image/20210304/1614844198545.jpeg"
);
saveOrUpdateParam
.
put
(
"welfareUrl"
,
"null"
);
saveOrUpdateParam
.
put
(
"welfareUrlDesc"
,
"null"
);
saveOrUpdateParam
.
put
(
"companyId"
,
101
);
Response
saveOrUpdatePes
=
network
.
postResponse
(
saveOrUpdateParam
,
BasicConfig
.
MANAGER_SAVEORUPDATE6
);
boolean
data
=
saveOrUpdatePes
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data
);
Assert
.
assertTrue
(
data
,
network
.
message
(
saveOrUpdateParam
,
BasicConfig
.
MANAGER_SAVEORUPDATE6
,
"添加奖品失败"
,
saveOrUpdatePes
.
body
().
asString
()));
}
//删除奖品
//添加投票
@Test
(
description
=
"添加投票"
,
priority
=
2
)
public
void
添加投票
()
{
Map
<
String
,
Object
>
saveOrUpdate1Param
=
new
HashMap
<>();
saveOrUpdate1Param
.
put
(
"companyId"
,
101
);
saveOrUpdate1Param
.
put
(
"question"
,
"投票测试一"
);
List
<
VoteBean
>
votes
=
new
ArrayList
<>();
VoteBean
vote
=
new
VoteBean
();
vote
.
setAnswer
(
"选项一"
);
vote
.
setRelationResource
(
"null"
);
vote
.
setRelationResourceId
(
"null"
);
votes
.
add
(
vote
);
VoteBean
vote1
=
new
VoteBean
();
vote1
.
setAnswer
(
"选项二"
);
vote1
.
setRelationResource
(
"null"
);
vote1
.
setRelationResourceId
(
"null"
);
votes
.
add
(
vote1
);
saveOrUpdate1Param
.
put
(
"answerList"
,
votes
);
Response
saveOrUpdate1Res
=
network
.
postResponse
(
saveOrUpdate1Param
,
BasicConfig
.
MANAGER_SAVEORUPDATE5
);
boolean
data1
=
saveOrUpdate1Res
.
jsonPath
().
getBoolean
(
"data"
);
System
.
out
.
println
(
data1
);
Assert
.
assertTrue
(
data1
,
network
.
message
(
saveOrUpdate1Param
,
BasicConfig
.
MANAGER_SAVEORUPDATE5
,
"个人pk奖励配置失败"
,
saveOrUpdate1Res
.
body
().
asString
()));
}
}
src/test/java/com/kjj/cases/live/SaveAndUpdate.java
View file @
af9b13db
...
@@ -34,15 +34,15 @@ public class SaveAndUpdate implements AdminAuthorization {
...
@@ -34,15 +34,15 @@ public class SaveAndUpdate implements AdminAuthorization {
saveAndUpdateParam
.
put
(
"welfareUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/62c25dcb3b9b4d269a74894e4255a193.jpg"
);
saveAndUpdateParam
.
put
(
"welfareUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/62c25dcb3b9b4d269a74894e4255a193.jpg"
);
saveAndUpdateParam
.
put
(
"coverUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/d4093b24aaca49da8f0e3e276721feea.jpg"
);
saveAndUpdateParam
.
put
(
"coverUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/d4093b24aaca49da8f0e3e276721feea.jpg"
);
saveAndUpdateParam
.
put
(
"mpShareUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/182f3659e39b4ea6898af781cc6344a1.jpg"
);
saveAndUpdateParam
.
put
(
"mpShareUrl"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/182f3659e39b4ea6898af781cc6344a1.jpg"
);
saveAndUpdateParam
.
put
(
"title"
,
"
自动化专用
直播间"
);
saveAndUpdateParam
.
put
(
"title"
,
"
营业部公司
直播间"
);
saveAndUpdateParam
.
put
(
"mpShareTitle"
,
"
自动化专用
直播间"
);
saveAndUpdateParam
.
put
(
"mpShareTitle"
,
"
营业部公司
直播间"
);
saveAndUpdateParam
.
put
(
"companyId"
,
101
);
saveAndUpdateParam
.
put
(
"companyId"
,
101
);
long
noticeTime
=
DateUtils
.
addHours
(
new
Date
(),
2
).
getTime
();
long
noticeTime
=
DateUtils
.
addHours
(
new
Date
(),
2
).
getTime
();
long
broadcastTime
=
DateUtils
.
addHours
(
new
Date
(),
5
).
getTime
();
long
broadcastTime
=
DateUtils
.
addHours
(
new
Date
(),
5
).
getTime
();
saveAndUpdateParam
.
put
(
"noticeTime"
,
noticeTime
);
saveAndUpdateParam
.
put
(
"noticeTime"
,
noticeTime
);
saveAndUpdateParam
.
put
(
"broadcastTime"
,
broadcastTime
);
saveAndUpdateParam
.
put
(
"broadcastTime"
,
broadcastTime
);
saveAndUpdateParam
.
put
(
"shareContent"
,
"
自动化专用
直播间"
);
saveAndUpdateParam
.
put
(
"shareContent"
,
"
营业部公司
直播间"
);
saveAndUpdateParam
.
put
(
"shelfStatus"
,
"2"
);
saveAndUpdateParam
.
put
(
"shelfStatus"
,
"2"
);
saveAndUpdateParam
.
put
(
"secondPoster"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/cc999ebde48e49f99ac3f0d93480453f.jpg"
);
saveAndUpdateParam
.
put
(
"secondPoster"
,
"https://streamimg.kjjcrm.com/kjy/image/20210201/cc999ebde48e49f99ac3f0d93480453f.jpg"
);
...
...
src/test/java/com/kjj/config/BasicConfig.java
View file @
af9b13db
...
@@ -4,7 +4,7 @@ public class BasicConfig {
...
@@ -4,7 +4,7 @@ public class BasicConfig {
public
static
int
apiCount
;
//接口数量统计
public
static
int
apiCount
;
//接口数量统计
// 是否开启钉钉机器人推送
// 是否开启钉钉机器人推送
public
static
final
boolean
isPushReport
=
tru
e
;
//true
public
static
final
boolean
isPushReport
=
fals
e
;
//true
// 代理人微信昵称
// 代理人微信昵称
public
static
final
String
WECHAT_NAME
=
"客集集-梦晨"
;
//true
public
static
final
String
WECHAT_NAME
=
"客集集-梦晨"
;
//true
...
@@ -75,6 +75,10 @@ public class BasicConfig {
...
@@ -75,6 +75,10 @@ public class BasicConfig {
public
static
final
String
MANAGER_SAVEORUPDATE7
=
MANAGER_HOST
+
"/kjy/manager/welfare/pre/conf/saveOrUpdate"
;
public
static
final
String
MANAGER_SAVEORUPDATE7
=
MANAGER_HOST
+
"/kjy/manager/welfare/pre/conf/saveOrUpdate"
;
//***************直播素材*****************
public
static
final
String
MANAGER_SAVEORUPDATE6
=
"https://kjj-mng.duibatest.com.cn/kjy/manager/conf/base/welfare/saveOrUpdate"
;
// *************** 素材ID ***************
// *************** 素材ID ***************
public
static
final
String
ARTICLE_CONTENTID
=
"Kj21NjM4NDc"
;
public
static
final
String
ARTICLE_CONTENTID
=
"Kj21NjM4NDc"
;
...
...
src/test/java/com/kjj/config/ExtentTestNGIReporterListener.java
View file @
af9b13db
...
@@ -44,7 +44,7 @@ public class ExtentTestNGIReporterListener implements IReporter {
...
@@ -44,7 +44,7 @@ public class ExtentTestNGIReporterListener implements IReporter {
// 统计suite下的成功、失败、跳过的总用例数
// 统计suite下的成功、失败、跳过的总用例数
int
suiteFailSize
=
0
;
int
suiteFailSize
=
0
;
int
suitePassSize
=
0
;
int
suitePassSize
=
0
;
int
suiteSkipSize
=
0
;
//
int suiteSkipSize = 0;
ExtentTest
suiteTest
=
null
;
ExtentTest
suiteTest
=
null
;
// 存在多个suite的情况下,在报告中将同一个suite的测试结果归为一类,创建一级节点。
// 存在多个suite的情况下,在报告中将同一个suite的测试结果归为一类,创建一级节点。
if
(
createSuiteNode
)
{
if
(
createSuiteNode
)
{
...
...
src/test/java/com/kjj/utils/DingTalkUtils.java
View file @
af9b13db
...
@@ -41,7 +41,7 @@ public class DingTalkUtils {
...
@@ -41,7 +41,7 @@ public class DingTalkUtils {
contentParams
.
put
(
"content"
,
"【测试结果】\n"
+
errorMessage
);
contentParams
.
put
(
"content"
,
"【测试结果】\n"
+
errorMessage
);
//钉钉机器人消息体
//钉钉机器人消息体
/*
Map<String, Object> params = new HashMap<String, Object>();
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"msgtype"
,
"text"
);
params
.
put
(
"msgtype"
,
"text"
);
params
.
put
(
"text"
,
contentParams
);
params
.
put
(
"text"
,
contentParams
);
System
.
out
.
println
(
params
);
System
.
out
.
println
(
params
);
...
@@ -50,7 +50,7 @@ public class DingTalkUtils {
...
@@ -50,7 +50,7 @@ public class DingTalkUtils {
if
(
isPushReport
){
if
(
isPushReport
){
Response
response
=
network
.
dingTalkRobot
(
params
);
Response
response
=
network
.
dingTalkRobot
(
params
);
response
.
body
().
prettyPrint
();
response
.
body
().
prettyPrint
();
}
*/
}
}
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/test/liveTestNG.xml
View file @
af9b13db
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"直播"
verbose=
"1"
thread-count=
"3"
>
<suite
name=
"直播"
verbose=
"1"
thread-count=
"3"
>
<test
preserve-order=
"true"
name=
"创建直播"
>
<!-- <test preserve-order="true" name="创建直播">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.live.SaveAndUpdate"/>-->
<!-- </classes>-->
<!-- </test>-->
<test
preserve-order=
"true"
name=
"直播素材"
>
<classes>
<classes>
<class
name=
"com.kjj.cases.live.
SaveAndUpdate
"
/>
<class
name=
"com.kjj.cases.live.
LiveMaterial
"
/>
</classes>
</classes>
</test>
</test>
</suite>
</suite>
src/test/testNG.xml
View file @
af9b13db
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"客集集"
verbose=
"1"
thread-count=
"3"
>
<suite
name=
"客集集"
verbose=
"1"
thread-count=
"3"
>
<suite-files>
<suite-files>
<suite-file
path=
"wechatTestNG.xml"
></suite-file
>
<!-- <suite-file path="wechatTestNG.xml"></suite-file>--
>
<suite-file
path=
"liveTestNG.xml"
></suite-file>
<suite-file
path=
"liveTestNG.xml"
></suite-file>
</suite-files>
</suite-files>
<!-- 监听器-->
<!-- 监听器-->
...
...
test-output/report.html
View file @
af9b13db
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