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