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
5ae0afcc
Commit
5ae0afcc
authored
Jul 20, 2021
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改部分接口规范名,修改了我的名片-选择公司,增加了营销工具首页、贺卡首页的接口测试用例
parent
d7339e21
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
513 additions
and
240 deletions
+513
-240
ArticalPersonCard.java
.../java/com/kjj/cases/assistant/card/ArticalPersonCard.java
+3
-3
PersonCard.java
src/test/java/com/kjj/cases/assistant/card/PersonCard.java
+132
-132
greetingCrad.java
...ava/com/kjj/cases/assistant/markettools/greetingCrad.java
+258
-0
GreetingCard.java
src/test/java/com/kjj/cases/basics/GreetingCard.java
+8
-9
SellerCard.java
src/test/java/com/kjj/cases/basics/SellerCard.java
+46
-47
BasicConfig.java
src/test/java/com/kjj/config/BasicConfig.java
+27
-15
wechatTestNG.xml
src/test/wechatTestNG.xml
+39
-34
No files found.
src/test/java/com/kjj/cases/
basics
/card/ArticalPersonCard.java
→
src/test/java/com/kjj/cases/
assistant
/card/ArticalPersonCard.java
View file @
5ae0afcc
package
com
.
kjj
.
cases
.
basics
.
card
;
package
com
.
kjj
.
cases
.
assistant
.
card
;
import
static
com
.
kjj
.
config
.
BasicConfig
.*;
import
static
com
.
kjj
.
utils
.
ThreadSleepUtils
.
sleep
;
...
...
@@ -101,7 +101,7 @@ public class ArticalPersonCard implements Authorization {
@Test
(
description
=
"代理人_头部名片详情"
,
priority
=
7
)
public
void
代理人
_
头部名片详情
(){
//获取加密的销售ID
sleep
(
1
000
);
sleep
(
5
000
);
Response
response
=
network
.
getResponse
(
USER_INFO
);
sid
=
response
.
jsonPath
().
getString
(
"data.encodeSellerId"
);
String
sellerName
=
response
.
jsonPath
().
getString
(
"data.sellerName"
);
...
...
@@ -201,7 +201,7 @@ public class ArticalPersonCard implements Authorization {
//切换为访客
userTku
();
sleep
(
1
000
);
sleep
(
2
000
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"scid"
,
scid
);
//代理人的scid
params
.
put
(
"cancelPush"
,
false
);
...
...
src/test/java/com/kjj/cases/
basics
/card/PersonCard.java
→
src/test/java/com/kjj/cases/
assistant
/card/PersonCard.java
View file @
5ae0afcc
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/assistant/markettools/greetingCrad.java
0 → 100644
View file @
5ae0afcc
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/cases/basics/GreetingCard.java
View file @
5ae0afcc
package
com
.
kjj
.
cases
.
basics
;
import
com.kjj.utils.BaseUtils
;
import
com.kjj.utils.NetworkUtils
;
import
io.restassured.response.Response
;
import
org.testng.Assert
;
...
...
@@ -32,17 +31,17 @@ public class GreetingCard {
// BANNER
@Test
(
description
=
"BANNER"
,
priority
=
1
)
public
void
BANNER
()
throws
IOException
{
Response
response
=
network
.
getResponse
(
GREETING_
BANNER
);
Response
response
=
network
.
getResponse
(
GREETING_
banner
);
boolean
hasList
=
response
.
jsonPath
().
getInt
(
"data.size()"
)
>
0
;
Assert
.
assertTrue
(
hasList
,
network
.
message
(
GREETING_
BANNER
,
"获取Banner列表失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
hasList
,
network
.
message
(
GREETING_
banner
,
"获取Banner列表失败"
,
response
.
body
().
asString
()));
}
// 转发最多
@Test
(
description
=
"大家都在发"
,
priority
=
2
)
public
void
大家都在发
()
throws
IOException
{
Response
response
=
network
.
getResponse
(
GREETING_
ALLFORWARD
);
Response
response
=
network
.
getResponse
(
GREETING_
allForward
);
boolean
hasList
=
response
.
jsonPath
().
getInt
(
"data.size()"
)
>
0
;
Assert
.
assertTrue
(
hasList
,
network
.
message
(
GREETING_
ALLFORWARD
,
"获取大家都在发列表失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
hasList
,
network
.
message
(
GREETING_
allForward
,
"获取大家都在发列表失败"
,
response
.
body
().
asString
()));
}
// 贺卡tab
...
...
@@ -51,10 +50,10 @@ public class GreetingCard {
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"tagType"
,
"greeting_card"
);
params
.
put
(
"exclusiveArea"
,
0
);
Response
response
=
network
.
getResponse
(
params
,
GREETING_FINDBYTYPE
);
Response
response
=
network
.
getResponse
(
params
,
GREETING_findByType
);
int
totalCount
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
);
tagId
=
response
.
jsonPath
().
getInt
(
"data.list[-1].id"
);
Assert
.
assertEquals
(
totalCount
,
3
,
network
.
message
(
params
,
GREETING_FINDBYTYPE
,
"获取贺卡tab失败"
,
response
.
body
().
asString
()));
Assert
.
assertEquals
(
totalCount
,
3
,
network
.
message
(
params
,
GREETING_findByType
,
"获取贺卡tab失败"
,
response
.
body
().
asString
()));
}
// 获取539的贺卡列表
...
...
@@ -65,11 +64,11 @@ public class GreetingCard {
params
.
put
(
"pageSize"
,
10
);
params
.
put
(
"type"
,
6
);
params
.
put
(
"tag1Id"
,
tagId
);
Response
response
=
network
.
getResponse
(
params
,
GREETING_PAGELIST
);
Response
response
=
network
.
getResponse
(
params
,
GREETING_pageList
);
boolean
hasList
=
response
.
jsonPath
().
getInt
(
"data.list.size()"
)
>
0
;
contentId
=
response
.
jsonPath
().
getString
(
"data.list[0].id"
);
greetingName
=
response
.
jsonPath
().
getString
(
"data.list[0].title"
);
Assert
.
assertTrue
(
hasList
,
network
.
message
(
params
,
GREETING_PAGELIST
,
"获取贺卡tab失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
hasList
,
network
.
message
(
params
,
GREETING_pageList
,
"获取贺卡tab失败"
,
response
.
body
().
asString
()));
}
// 贺卡详情页
...
...
src/test/java/com/kjj/cases/basics/SellerCard.java
View file @
5ae0afcc
This diff is collapsed.
Click to expand it.
src/test/java/com/kjj/config/BasicConfig.java
View file @
5ae0afcc
...
...
@@ -598,16 +598,16 @@ public class BasicConfig {
// *************** 名片 ***************
public
static
final
String
SELLERCARD_
TOPOFDETAIL
=
HOST
+
"/kjy/mp/sellerCardV5/topOfDetail"
;
public
static
final
String
SELLERCARD_
EDITBASEINFO
=
HOST
+
"/kjy/mp/sellerCard/editBaseInfo"
;
public
static
final
String
SELLERCARD_
PERSONALPROFILE
=
HOST
+
"/kjy/mp/sellerCardV5/personalProfile"
;
public
static
final
String
SELLERCARD_
EDITMAJORGOODAUTH
=
HOST
+
"/kjy/mp/sellerCard/editMajorGoodAuth"
;
public
static
final
String
SELLERCARD_
APPRAISELISTNEW
=
HOST
+
"/kjy/mp/sellerCardV5/appraiseListNew"
;
public
static
final
String
SELLERCARD_
GETQUESTIONS
=
HOST
+
"/kjy/mp/sellerCardV5/getQuestions"
;
public
static
final
String
SELLERCARD_
ISDISPLAYACTIVITY
=
HOST
+
"/kjy/mp/clue/activity/isDisplayActivity"
;
public
static
final
String
SELLERCARD_
COMPANYLIST
=
HOST
+
"/kjy/mp/company/list"
;
public
static
final
String
SELLERCARD_
SELLERCARDCASENEW
=
HOST
+
"/kjy/mp/sellerCardV5/sellerCardCasesList"
;
public
static
final
String
SELLERCARD_
PRODUCTLIST
=
HOST
+
"/kjy/mp/sellerCardV5/productList"
;
public
static
final
String
SELLERCARD_
topOfDetail
=
HOST
+
"/kjy/mp/sellerCardV5/topOfDetail"
;
public
static
final
String
SELLERCARD_
editBaseInfo
=
HOST
+
"/kjy/mp/sellerCard/editBaseInfo"
;
public
static
final
String
SELLERCARD_
personalProfile
=
HOST
+
"/kjy/mp/sellerCardV5/personalProfile"
;
public
static
final
String
SELLERCARD_
editMajorGoodAuth
=
HOST
+
"/kjy/mp/sellerCard/editMajorGoodAuth"
;
public
static
final
String
SELLERCARD_
appraiseListNew
=
HOST
+
"/kjy/mp/sellerCardV5/appraiseListNew"
;
public
static
final
String
SELLERCARD_
getQuestions
=
HOST
+
"/kjy/mp/sellerCardV5/getQuestions"
;
public
static
final
String
SELLERCARD_
isDisplayActivity
=
HOST
+
"/kjy/mp/clue/activity/isDisplayActivity"
;
public
static
final
String
SELLERCARD_
companyList
=
HOST
+
"/kjy/mp/company/list"
;
public
static
final
String
SELLERCARD_
sellerCardCasesList
=
HOST
+
"/kjy/mp/sellerCardV5/sellerCardCasesList"
;
public
static
final
String
SELLERCARD_
productList
=
HOST
+
"/kjy/mp/sellerCardV5/productList"
;
public
static
final
String
SELLERCARD_GETSELLERCARDCONFIG
=
HOST
+
"/kjy/mp/sellerConfig/getSellerCardConfig"
;
public
static
final
String
SELLERCARD_GETSELLERCARDSTYLE
=
HOST
+
"/kjy/mp/sellerConfig/getSellerCardStyle"
;
public
static
final
String
SELLERCARD_TOPOFCONTENT
=
HOST
+
"/kjy/mp/sellerCardV5/topOfContent"
;
...
...
@@ -724,15 +724,27 @@ public class BasicConfig {
// *************** 贺卡 ***************
public
static
final
String
GREETING_
BANNER
=
HOST
+
"/kjy/mp/greeting/banner"
;
public
static
final
String
GREETING_
ALLFORWARD
=
HOST
+
"/kjy/mp/greeting/allForward"
;
public
static
final
String
GREETING_
FINDBYTYPE
=
HOST
+
"/kjy/mp/tag/findByType"
;
public
static
final
String
GREETING_
PAGELIST
=
HOST
+
"/kjy/mp/greeting/pageList"
;
public
static
final
String
GREETING_
banner
=
HOST
+
"/kjy/mp/greeting/banner"
;
public
static
final
String
GREETING_
allForward
=
HOST
+
"/kjy/mp/greeting/allForward"
;
public
static
final
String
GREETING_
findByType
=
HOST
+
"/kjy/mp/tag/findByType"
;
public
static
final
String
GREETING_
pageList
=
HOST
+
"/kjy/mp/greeting/pageList"
;
public
static
final
String
GREETING_CONFLIST
=
HOST
+
"/kjy/mp/greeting/conf/list"
;
public
static
final
String
GREETING_H5SHARE
=
ACTIVITY_HOST
+
"/kjy/mp/greeting/conf/h5share"
;
public
static
final
String
GREETING_H5INFO
=
ACTIVITY_HOST
+
"/kjy/mp/content/h5info"
;
public
static
final
String
GREETING_SAVEDEFAULT
=
ACTIVITY_HOST
+
"/kjy/mp/greeting/conf/saveDefault"
;
public
static
final
String
GREETING_getTipsByPage
=
HOST
+
"/kjy/mp/tips/getTipsByPage"
;
public
static
final
String
GREETING_getMarketingToolArea
=
HOST
+
"/kjy/mp/home/getMarketingToolArea"
;
public
static
final
String
GREETING_answerPageList
=
HOST
+
"/kjy/mp/game/answerPageList"
;
public
static
final
String
GREETING_getSellerVipInfo
=
HOST
+
"/kjy/mp/seller/getSellerVipInfo"
;
public
static
final
String
GREETING_checkVisitor
=
HOST
+
"/kjy/mp/greeting/checkVisitor"
;
public
static
final
String
GREETING_oaSubscribeType
=
HOST
+
"/kjy/mp/user/oaSubscribeType"
;
public
static
final
String
GREETING_check
=
ACTIVITY_HOST
+
"/kjy/mp/greeting/conf/check"
;
public
static
final
String
GREETING_preView
=
ACTIVITY_HOST
+
"/kjy/mp/greeting/preView"
;
public
static
final
String
GREETING_isRedpackEnable
=
ACTIVITY_HOST
+
"/kjy/mp/greeting/packet/isRedpackEnable"
;
public
static
final
String
GREETING_self
=
ACTIVITY_HOST
+
"/kjy/mp/seller/self"
;
public
static
final
String
GREETING_getInfoByScid
=
ACTIVITY_HOST
+
"/kjy/mp/seller/getInfoByScid"
;
public
static
final
String
GREETING_checkLimit
=
ACTIVITY_HOST
+
"/kjy/mp/greeting/conf/checkLimit"
;
public
static
final
String
GREETING_more
=
ACTIVITY_HOST
+
"/kjy/mp/greeting/more"
;
// *************** 管理后台 ***************
...
...
src/test/wechatTestNG.xml
View file @
5ae0afcc
...
...
@@ -11,51 +11,56 @@
<!-- <class name="com.kjj.qa.cases.Novice"/>-->
<!-- </classes>-->
<!-- </test>-->
<test
preserve-order=
"true"
name=
"支付"
>
<classes
>
<class
name=
"com.kjj.cases.basics.Pay"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name=
"上传"
>
<classes
>
<class
name=
"com.kjj.cases.basics.Upload"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name=
"发圈"
>
<classes
>
<class
name=
"com.kjj.cases.basics.CircleFriends"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name=
"boss看板"
>
<classes
>
<class
name=
"com.kjj.cases.basics.Boss"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name=
"boss看板演示版"
>
<classes
>
<class
name=
"com.kjj.cases.basics.BossTest"
/
>
</classes
>
</test
>
<test
preserve-order=
"true"
name=
"贺卡"
>
<classes
>
<class
name=
"com.kjj.cases.basics.GreetingCard"
/
>
</classes
>
</test
>
<!-- <test preserve-order="true" name="支付">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.basics.Pay"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name="上传">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.basics.Upload"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name="发圈">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.basics.CircleFriends"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name="boss看板">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.basics.Boss"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name="boss看板演示版">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.basics.BossTest"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<!-- <test preserve-order="true" name="贺卡">--
>
<!-- <classes>--
>
<!-- <class name="com.kjj.cases.basics.GreetingCard"/>--
>
<!-- </classes>--
>
<!-- </test>--
>
<test
preserve-order=
"true"
name=
"我的名片"
>
<classes>
<class
name=
"com.kjj.cases.
basics
.card.PersonCard"
/>
<class
name=
"com.kjj.cases.
assistant
.card.PersonCard"
/>
</classes>
</test>
<test
preserve-order=
"true"
name=
"文章中个人名片"
>
<classes>
<class
name=
"com.kjj.cases.
basics
.card.ArticalPersonCard"
/>
<class
name=
"com.kjj.cases.
assistant
.card.ArticalPersonCard"
/>
</classes>
</test>
<test
preserve-order=
"true"
name
=
"种草素材
"
>
<test
preserve-order=
"true"
name
=
"营销工具-贺卡
"
>
<classes>
<class
name=
"com.kjj.cases.assistant.
RecommendMaterial
"
/>
<class
name=
"com.kjj.cases.assistant.
markettools.greetingCrad
"
/>
</classes>
</test>
<!-- <test preserve-order="true" name = "种草素材">-->
<!-- <classes>-->
<!-- <class name="com.kjj.cases.assistant.RecommendMaterial"/>-->
<!-- </classes>-->
<!-- </test>-->
</suite>
<!-- 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