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
2d8482da
Commit
2d8482da
authored
Jul 30, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
备份
parent
eb1e5eb8
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1086 additions
and
58 deletions
+1086
-58
GameLottery.java
...java/com/kjj/cases/assistant/markettools/GameLottery.java
+11
-2
GreetingCrad.java
...ava/com/kjj/cases/assistant/markettools/GreetingCrad.java
+2
-3
InvitationLetter.java
...com/kjj/cases/assistant/markettools/InvitationLetter.java
+522
-0
PersonalCenter.java
...est/java/com/kjj/cases/assistant/menu/PersonalCenter.java
+457
-0
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+32
-1
wechatTestNG.xml
src/test/wechatTestNG.xml
+62
-52
No files found.
src/test/java/com/kjj/cases/assistant/markettools/GameLottery.java
View file @
2d8482da
...
...
@@ -209,7 +209,7 @@ public class GameLottery implements Authorization {
prizeDetails
.
add
(
prizeDetail
);
//奖品列表
params
.
put
(
"scid"
,
scid
);
params
.
put
(
"pageTitle"
,
"
来抽奖吧
"
);
params
.
put
(
"pageTitle"
,
"
指定中奖抽奖转盘自动化测试
"
);
params
.
put
(
"prizeDetails"
,
prizeDetails
);
System
.
out
.
println
(
JSON
.
toJSONString
(
params
));
Response
response
=
network
.
postResponse
(
params
,
LOTTERRY_saveOrUpdateConf
);
...
...
@@ -484,7 +484,7 @@ public class GameLottery implements Authorization {
prizeDetails
.
add
(
prizeDetail
);
//奖品列表
params
.
put
(
"scid"
,
rateScid
);
params
.
put
(
"pageTitle"
,
"
来抽奖吧
"
);
params
.
put
(
"pageTitle"
,
"
概率中奖抽奖转盘自动化测试
"
);
params
.
put
(
"prizeDetails"
,
prizeDetails
);
System
.
out
.
println
(
JSON
.
toJSONString
(
params
));
response
=
network
.
postResponse
(
params
,
LOTTERRY_saveOrUpdateConf
);
...
...
@@ -510,6 +510,15 @@ public class GameLottery implements Authorization {
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
CONTENT_READ
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
CONTENT_READ
,
"获取访问贺卡记录失败"
,
response
.
body
().
asString
()));
params
.
clear
();
params
.
put
(
"scid"
,
rateScid
);
params
.
put
(
"forwardTime"
,
System
.
currentTimeMillis
());
response
=
network
.
postResponse
(
params
,
DYNAMIC_addVisit
);
success
=
response
.
jsonPath
().
getBoolean
(
"success"
);
data
=
response
.
jsonPath
().
getJsonObject
(
"data"
);
Assert
.
assertTrue
(
success
,
network
.
message
(
params
,
DYNAMIC_addVisit
,
"接口返回失败"
,
response
.
body
().
asString
()));
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
DYNAMIC_addVisit
,
"接口返回数据为空"
,
response
.
body
().
asString
()));
//抽奖
params
.
clear
();
params
.
put
(
"scid"
,
rateScid
);
...
...
src/test/java/com/kjj/cases/assistant/markettools/GreetingCrad.java
View file @
2d8482da
...
...
@@ -6,8 +6,7 @@ import com.kjj.utils.JsonUtil;
import
com.kjj.utils.NetworkUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.*
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -133,7 +132,7 @@ public class GreetingCrad implements Authorization{
Assert
.
assertNotNull
(
data
,
network
.
message
(
params
,
GREETING_findByType
,
"返回数据为空"
,
response
.
body
().
asString
()));
int
size
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
GREETING_findByType
,
"
贺卡
列表为空"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
size
>
0
,
network
.
message
(
params
,
GREETING_findByType
,
"
标签
列表为空"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"代理人_获取当前用户关注公众号类型"
,
priority
=
9
)
...
...
src/test/java/com/kjj/cases/assistant/markettools/InvitationLetter.java
0 → 100644
View file @
2d8482da
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/assistant/menu/PersonalCenter.java
0 → 100644
View file @
2d8482da
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/config/BasicConfig.java
View file @
2d8482da
...
...
@@ -611,7 +611,9 @@ public class BasicConfig {
public
static
final
String
VISITHEADER
=
HOST
+
"/kjy/mp/visit/header/v2"
;
public
static
final
String
SELLERWEEKLY
=
HOST
+
"/kjy/mp/whoSawMe/sellerWeekly"
;
public
static
final
String
WEEKLY_LIST
=
HOST
+
"/kjy/mp/seller/weekly/list"
;
public
static
final
String
QRCODE_create
=
HOST
+
"/kjy/mp/qrcode/create"
;
public
static
final
String
UPLOAD_image
=
HOST
+
"/kjy/mp/upload/image"
;
public
static
final
String
DYNAMIC_addVisit
=
HOST
+
"/kjy/mp/seller/dynamic/addVisit"
;
// *************** 支付 ***************
public
static
final
String
PAY_getMiddleDetail
=
HOST
+
"/kjy/mp/payMiddle/getMiddleDetail"
;
...
...
@@ -762,6 +764,18 @@ public class BasicConfig {
public
static
final
String
HOME_getPosterTemplateList
=
HOST
+
"/kjy/mp/posterTemplate/getPosterTemplateList"
;
public
static
final
String
HOME_findPosterById
=
HOST
+
"/kjy/mp/posterTemplate/findPosterById"
;
//******************个人中心**********************
public
static
final
String
USINGSTRATAGY_index
=
HOST
+
"/kjy/mp/usingStrategy/index"
;
public
static
final
String
USINGSTRATAGY_strategyList
=
HOST
+
"/kjy/mp/usingStrategy/strategyList"
;
public
static
final
String
USINGSTRATAGY_faqDetail
=
HOST
+
"/kjy/mp/usingStrategy/faqDetail"
;
public
static
final
String
USINGSTRATAGY_useful
=
HOST
+
"/kjy/mp/usingStrategy/useful"
;
public
static
final
String
USINGSTRATAGY_strategyDetail
=
HOST
+
"/kjy/mp/usingStrategy/strategyDetail"
;
public
static
final
String
USINGSTRATAGY_successCaseDetail
=
HOST
+
"/kjy/mp/usingStrategy/successCaseDetail"
;
public
static
final
String
PUSH_list
=
HOST
+
"/kjy/mp/seller/push/list"
;
public
static
final
String
PUSH_switch
=
HOST
+
"/kjy/mp/seller/push/switch"
;
public
static
final
String
PUSH_updateCloseTime
=
HOST
+
"/kjy/mp/seller/push/updateCloseTime"
;
public
static
final
String
SELLERCARD_getInsuranceConceptConfig
=
HOST
+
"/kjy/mp/sellerConfig/getInsuranceConceptConfig"
;
public
static
final
String
SELLERCARD_getIncreaseStaffConfig
=
HOST
+
"/kjy/mp/sellerConfig/getIncreaseStaffConfig"
;
// ************** 设置中心 ***************
public
static
final
String
SELLERCONFIG_EDITCONFIG
=
HOST
+
"/kjy/mp/sellerConfig/editConfig"
;
...
...
@@ -841,6 +855,23 @@ public class BasicConfig {
public
static
final
String
LOTTERRY_getDrawRecord
=
HOST
+
"/kjy/mp/game/getDrawRecord"
;
public
static
final
String
LOTTERRY_getDrawWinningRecord
=
HOST
+
"/kjy/mp/game/getDrawWinningRecord"
;
//*********************邀请函************************
public
static
final
String
INViTATION_index
=
HOST
+
"/kjy/mp/invitationLetter/index"
;
public
static
final
String
INViTATION_preView
=
HOST
+
"/kjy/mp/invitationLetter/preView"
;
public
static
final
String
INViTATION_saveOrUpdate
=
HOST
+
"/kjy/mp/invitationLetter/saveOrUpdate"
;
public
static
final
String
INViTATION_getH5ShareInfo
=
HOST
+
"/kjy/mp/invitationLetter/getH5ShareInfo"
;
public
static
final
String
INViTATION_savePosterImg
=
HOST
+
"/kjy/mp/invitationLetter/savePosterImg"
;
public
static
final
String
INViTATION_view
=
HOST
+
"/kjy/mp/invitationLetter/view"
;
public
static
final
String
INViTATION_acceptInvitation
=
HOST
+
"/kjy/mp/invitationLetter/acceptInvitation"
;
public
static
final
String
INViTATION_myInvitationLetters
=
HOST
+
"/kjy/mp/invitationLetter/myInvitationLetters"
;
public
static
final
String
INViTATION_getConfigDetail
=
HOST
+
"/kjy/mp/invitationLetter/getConfigDetail"
;
public
static
final
String
INViTATION_getViewRecordList
=
HOST
+
"/kjy/mp/invitationLetter/getViewRecordList"
;
public
static
final
String
INViTATION_getAcceptRecordList
=
HOST
+
"/kjy/mp/invitationLetter/getAcceptRecordList"
;
//*********************趣味测试************************
public
static
final
String
GAME_answerPageList
=
HOST
+
"/kjy/mp/game/answerPageList"
;
public
static
final
String
GAME_clueList
=
HOST
+
"/kjy/mp/tag/clue/list"
;
// *************** 管理后台 ***************
public
static
final
String
SSO_doLogin
=
SSO_HOST
+
"/doLogin"
;
public
static
final
String
MANAGER_disableUser
=
MANAGER_HOST
+
"/kjy/manager/testUser/disableUser"
;
...
...
src/test/wechatTestNG.xml
View file @
2d8482da
...
...
@@ -2,59 +2,69 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite
name=
"集客助手"
verbose=
"1"
thread-count=
"3"
>
<test
preserve-order=
"true"
name=
"支付"
>
<!-- <test preserve-order="true" name="支付">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.Pay"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "首页">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.homePage"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="我的名片">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.card.PersonCard"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name="文章中个人名片">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.card.ArticalPersonCard"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "种草素材">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.RecommendMaterial"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "今日早报">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.DailyPaper"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "获取访客">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.whoSawMe.ForwardAndRead"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "谁看过我">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.whoSawMe.WhoSawMe"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "我的转发">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.whoSawMe.MyForward"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "贺卡">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.markettools.GreetingCrad"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "抽奖转盘">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.markettools.GameLottery"/>-->
<!-- </classes>-->
<!-- </test>-->
<!-- <test preserve-order="true" name = "邀请函和趣味测评">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.markettools.InvitationLetter"/>-->
<!-- </classes>-->
<!-- </test>-->
<test
preserve-order=
"true"
name =
"使用攻略和设置中心"
>
<classes>
<class
name=
"com.kjj.cases.assistant.Pay"
/>
</classes>
</test>
<test
preserve-order=
"true"
name =
"首页"
>
<classes>
<class
name=
"com.kjj.cases.assistant.homePage"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"我的名片"
>
<classes>
<class
name=
"com.kjj.cases.assistant.card.PersonCard"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"文章中个人名片"
>
<classes>
<class
name=
"com.kjj.cases.assistant.card.ArticalPersonCard"
/>
</classes>
</test>
<test
preserve-order=
"true"
name =
"种草素材"
>
<classes>
<class
name=
"com.kjj.cases.assistant.RecommendMaterial"
/>
</classes>
</test>
<test
preserve-order=
"true"
name =
"今日早报"
>
<classes>
<class
name=
"com.kjj.cases.assistant.DailyPaper"
/>
</classes>
</test>
<test
preserve-order=
"true"
name =
"获取访客"
>
<classes>
<class
name=
"com.kjj.cases.assistant.whoSawMe.ForwardAndRead"
/>
</classes>
</test>
<test
preserve-order=
"true"
name =
"谁看过我"
>
<classes>
<class
name=
"com.kjj.cases.assistant.whoSawMe.WhoSawMe"
/>
</classes>
</test>
<test
preserve-order=
"true"
name =
"我的转发"
>
<classes>
<class
name=
"com.kjj.cases.assistant.whoSawMe.MyForward"
/>
</classes>
</test>
<test
preserve-order=
"true"
name =
"贺卡"
>
<classes>
<class
name=
"com.kjj.cases.assistant.markettools.GreetingCrad"
/>
</classes>
</test>
<test
preserve-order=
"true"
name =
"抽奖转盘"
>
<classes>
<class
name=
"com.kjj.cases.assistant.markettools.GameLottery"
/>
<class
name=
"com.kjj.cases.assistant.menu.PersonalCenter"
/>
</classes>
</test>
</suite>
...
...
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