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
17a6d815
Commit
17a6d815
authored
Mar 18, 2023
by
龚小红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改邀约测试用例
parent
eaba6bcf
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
50 additions
and
22 deletions
+50
-22
CheckTask.java
src/test/java/com/oto/cases/otoseller/CheckTask.java
+11
-11
Depts.java
src/test/java/com/oto/cases/otoseller/Depts.java
+1
-0
Invite.java
src/test/java/com/oto/cases/otoseller/Invite.java
+23
-2
Manager.java
src/test/java/com/oto/cases/otoseller/Manager.java
+1
-3
Phone.java
src/test/java/com/oto/cases/otoseller/Phone.java
+1
-1
Work.java
src/test/java/com/oto/cases/otoseller/Work.java
+3
-3
JmeterAccountFile.java
src/test/java/com/oto/utils/JmeterAccountFile.java
+10
-2
No files found.
src/test/java/com/oto/cases/otoseller/CheckTask.java
View file @
17a6d815
...
...
@@ -270,7 +270,7 @@ public class CheckTask implements Authorization {
params
.
put
(
"strategyMove"
,
"down"
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_strategyMove
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_strategyMove
,
"
上传KYC
失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_strategyMove
,
"
移动策略
失败"
,
response
.
body
().
asString
()));
otoLeaderAuth
();
response
=
network
.
getResponse
(
BasicConfig
.
WORK_strategy_onAbleList
);
...
...
@@ -283,7 +283,7 @@ public class CheckTask implements Authorization {
params
.
put
(
"strategyMove"
,
"up"
);
response
=
network
.
postResponse
(
params
,
BasicConfig
.
WORK_strategyMove
);
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_strategyMove
,
"
上传KYC
失败"
,
response
.
body
().
asString
()));
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
WORK_strategyMove
,
"
移动策略
失败"
,
response
.
body
().
asString
()));
}
@Test
(
description
=
"修改盘点策略"
,
priority
=
22
)
...
...
@@ -590,6 +590,8 @@ public class CheckTask implements Authorization {
saveKyc
(
true
);
otoAssistAuth
();
saveKyc
(
true
);
otoLeaderAuth
();
saveKyc
(
true
);
//其他角色不可上传kyc
otoInviterAuth
();
...
...
@@ -598,13 +600,11 @@ public class CheckTask implements Authorization {
saveKyc
(
false
);
otoExpertAuth
();
saveKyc
(
false
);
otoLeaderAuth
();
saveKyc
(
false
);
otoAreaAuth
();
saveKyc
(
false
);
sleep
(
1000
);
getSchemeNum
(
3
,
0
,
0
,
null
);
getSchemeNum
(
4
,
0
,
0
,
null
);
}
@Test
(
description
=
"上传客户方案"
,
priority
=
52
)
...
...
@@ -630,13 +630,13 @@ public class CheckTask implements Authorization {
savePlanFile
(
false
);
sleep
(
1000
);
getSchemeNum
(
3
,
2
,
0
,
null
);
getSchemeNum
(
4
,
2
,
0
,
null
);
}
@Test
(
description
=
"查看kyc和方案上传历史列表"
,
priority
=
53
)
public
void
查看
kyc
和方案上传历史列表
(){
//查看kys上传历史
getSchemeList
(
1
,
3
,
null
);
getSchemeList
(
1
,
4
,
null
);
//查看方案上传历史
getSchemeList
(
2
,
2
,
null
);
...
...
@@ -651,14 +651,14 @@ public class CheckTask implements Authorization {
otoManagerAuth
();
qualifiedKyc
(
1
,
true
);
sleep
(
1000
);
getSchemeNum
(
3
,
2
,
0
,
true
);
getSchemeList
(
1
,
3
,
1
);
getSchemeNum
(
4
,
2
,
0
,
true
);
getSchemeList
(
1
,
4
,
1
);
otoPMAuth
();
qualifiedKyc
(
0
,
true
);
sleep
(
1000
);
getSchemeNum
(
3
,
2
,
0
,
false
);
getSchemeList
(
1
,
3
,
0
);
getSchemeNum
(
4
,
2
,
0
,
false
);
getSchemeList
(
1
,
4
,
0
);
//其他角色不可标记kyc
otoAssistAuth
();
...
...
src/test/java/com/oto/cases/otoseller/Depts.java
View file @
17a6d815
...
...
@@ -233,6 +233,7 @@ public class Depts implements Authorization {
params
.
put
(
"expertId"
,
EXPERT_ID
);
params
.
put
(
"guaranteeSlipNo"
,
"ZDHCS202303230001_01"
);
params
.
put
(
"insuranceAmount"
,
"100000000"
);
params
.
put
(
"insuranceYearStandard"
,
"100000000"
);
params
.
put
(
"insureTime"
,
"2023-03-24"
);
params
.
put
(
"insuredName"
,
"测试被保人"
);
params
.
put
(
"productId"
,
19
);
...
...
src/test/java/com/oto/cases/otoseller/Invite.java
View file @
17a6d815
...
...
@@ -13,6 +13,7 @@ import org.testng.annotations.BeforeTest;
import
org.testng.annotations.Test
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -30,6 +31,7 @@ public class Invite implements Authorization {
public
String
inviteUrl
;
//邀请函链接
public
static
long
now
;
//当前时间戳
public
static
long
today
;
//当前日期0点时间戳
public
static
long
sunndayWeek
;
//当前周日日期
public
double
takerCoefficient
;
public
static
InvitationRecord
recordItem
;
...
...
@@ -40,6 +42,7 @@ public class Invite implements Authorization {
now
=
System
.
currentTimeMillis
();
today
=
now
-(
now
+
8
*
3600
*
1000
)
%
(
60
*
60
*
24
*
1000
);
otoManagerAuth
();
Sunday
();
}
@Test
(
description
=
"新增见面场景"
,
priority
=
1
)
public
void
新增见面场景
(){
...
...
@@ -461,8 +464,14 @@ public class Invite implements Authorization {
int
flag
=
0
;
HashMap
<
String
,
Object
>
params
=
new
HashMap
<>();
SimpleDateFormat
sdt
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
params
.
put
(
"calendarTime"
,
sdt
.
format
(
now
));
if
(
calendarTime
>
sunndayWeek
){
params
.
put
(
"calendarTime"
,
sdt
.
format
(
now
+
86400000
*
7
));
}
else
{
params
.
put
(
"calendarTime"
,
sdt
.
format
(
now
));
}
Response
response
=
network
.
getResponse
(
params
,
BasicConfig
.
WORK_calendar_list
);
System
.
out
.
println
(
calendarTime
);
List
<
InviteDay
>
invitationList
=
JsonUtil
.
parseResponseToListBean
(
response
,
InviteDay
.
class
);
for
(
InviteDay
day:
invitationList
)
{
if
(
day
.
calendarTime
==
calendarTime
){
...
...
@@ -483,5 +492,17 @@ public class Invite implements Authorization {
Assert
.
fail
(
"未找到相应的约面记录"
);
}
}
public
static
void
Sunday
(){
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
cal
=
Calendar
.
getInstance
();
if
(
cal
.
get
(
Calendar
.
DAY_OF_WEEK
)
==
Calendar
.
SUNDAY
){
sunndayWeek
=
cal
.
getTimeInMillis
();
System
.
out
.
println
(
simpleDateFormat
.
format
(
cal
.
getTime
()));
}
else
{
cal
.
set
(
Calendar
.
DAY_OF_WEEK
,
Calendar
.
MONDAY
);
cal
.
set
(
Calendar
.
DATE
,
cal
.
get
(
Calendar
.
DATE
)
+
6
);
System
.
out
.
println
(
simpleDateFormat
.
format
(
cal
.
getTime
()));
sunndayWeek
=
cal
.
getTimeInMillis
();
}
}
}
src/test/java/com/oto/cases/otoseller/Manager.java
View file @
17a6d815
...
...
@@ -153,7 +153,6 @@ public class Manager implements Authorization {
params
.
put
(
"supplierId"
,
11
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品更新"
);
params
.
put
(
"costOptions"
,
costOptions
);
params
.
put
(
"conversionCoefficient"
,
0.123
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productSave
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
Assert
.
assertTrue
(
data
,
network
.
message
(
params
,
BasicConfig
.
MANAGER_oto_productSave
,
"修改公司产品失败"
,
response
.
body
().
asString
()));
...
...
@@ -192,7 +191,6 @@ public class Manager implements Authorization {
params
.
put
(
"businessType"
,
2
);
params
.
put
(
"supplierId"
,
21
);
params
.
put
(
"prodName"
,
"勿动-自动化专用产品"
);
params
.
put
(
"conversionCoefficient"
,
0.356
);
params
.
put
(
"costOptions"
,
costOptions
);
Response
response
=
network
.
postResponse
(
params
,
BasicConfig
.
MANAGER_oto_productSave
);
boolean
data
=
response
.
jsonPath
().
getBoolean
(
"data"
);
...
...
@@ -607,7 +605,7 @@ public class Manager implements Authorization {
}
@Test
(
description
=
"客户标签更新"
,
priority
=
46
)
public
void
标记成单
(){
public
void
客户标签更新
(){
HashMap
<
String
,
Object
>
selectParams
=
new
HashMap
<
String
,
Object
>();
selectParams
.
put
(
"pageIndex"
,
1
);
selectParams
.
put
(
"pageSize"
,
10
);
...
...
src/test/java/com/oto/cases/otoseller/Phone.java
View file @
17a6d815
...
...
@@ -721,7 +721,7 @@ public class Phone implements Authorization {
@Test
(
description
=
"方案讲解历史更新"
,
priority
=
67
)
public
void
方案讲解历史更新
(){
getSchemeNum
(
3
,
2
,
2
,
false
);
getSchemeNum
(
4
,
2
,
2
,
false
);
getSchemeList
(
3
,
2
,
0
);
}
...
...
src/test/java/com/oto/cases/otoseller/Work.java
View file @
17a6d815
...
...
@@ -40,7 +40,7 @@ public class Work implements Authorization {
@Test
(
description
=
"工作台_菜单权限列表"
,
priority
=
4
)
public
void
工作台
_
菜单权限列表
(){
otoInviterAuth
();
menuList
(
3
);
menuList
(
4
);
otoTakerAuth
();
menuList
(
2
);
...
...
@@ -55,13 +55,13 @@ public class Work implements Authorization {
menuList
(
11
);
otoPMAuth
();
menuList
(
1
1
);
menuList
(
1
2
);
otoAreaAuth
();
menuList
(
10
);
otoManagerAuth
();
menuList
(
1
8
);
menuList
(
1
9
);
}
@Test
(
description
=
"工作台_标签列表"
,
priority
=
5
)
...
...
src/test/java/com/oto/utils/JmeterAccountFile.java
View file @
17a6d815
...
...
@@ -11,6 +11,8 @@ import java.io.File;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
java.sql.SQLException
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -19,8 +21,14 @@ public class JmeterAccountFile {
private
static
final
NetworkUtils
network
=
NetworkUtils
.
getInstance
();
public
static
void
main
(
String
[]
args
)
{
// String path = String.valueOf(JmeterAccountFile.class.getResource("/"));
// accountFile(path);
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
Calendar
cal
=
Calendar
.
getInstance
();
if
(
cal
.
get
(
Calendar
.
DAY_OF_WEEK
)
==
Calendar
.
SUNDAY
){
System
.
out
.
println
(
simpleDateFormat
.
format
(
cal
.
getTime
()));
}
cal
.
set
(
Calendar
.
DAY_OF_WEEK
,
Calendar
.
MONDAY
);
cal
.
set
(
Calendar
.
DATE
,
cal
.
get
(
Calendar
.
DATE
)
+
6
);
System
.
out
.
println
(
simpleDateFormat
.
format
(
cal
.
getTime
()));
}
//仅用于生成直播账号Authkey文件
...
...
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