Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
test-platform
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
马博
test-platform
Commits
6915177d
Commit
6915177d
authored
Mar 05, 2019
by
赵然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zr
parent
86a3ba5f
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
76 additions
and
28 deletions
+76
-28
新活动工具测试.java
src/test/java/http/cases/ActivityReconTest/新活动工具测试.java
+1
-1
瓜分积分_作弊瓜分_AccessTest.java
...st/java/http/cases/PkMoudleTest/瓜分积分_作弊瓜分_AccessTest.java
+8
-3
瓜分积分_实际瓜分.java
src/test/java/http/cases/PkMoudleTest/瓜分积分_实际瓜分.java
+1
-1
瓜分积分_实际瓜分_主胜方.java
src/test/java/http/cases/PkMoudleTest/瓜分积分_实际瓜分_主胜方.java
+1
-1
瓜分红包_作弊瓜分.java
src/test/java/http/cases/PkMoudleTest/瓜分红包_作弊瓜分.java
+1
-1
瓜分红包_实际瓜分.java
src/test/java/http/cases/PkMoudleTest/瓜分红包_实际瓜分.java
+1
-1
BetDevelopVo.java
src/test/java/http/model/BetDevelopVo.java
+24
-0
ActivityReconService.java
...test/java/http/service/Activity/ActivityReconService.java
+1
-0
PkService.java
src/test/java/http/service/Activity/PkService.java
+1
-0
PkDevelopService.java
src/test/java/http/service/hd/PkDevelopService.java
+37
-20
No files found.
src/test/java/http/cases/ActivityReconTest/新活动工具测试.java
View file @
6915177d
...
...
@@ -102,7 +102,7 @@ public class 新活动工具测试 extends DuibaTestBase {
logger
.
info
(
"校验第一次抽奖前后积分正确"
);
//第二次抽奖
response
=
activityReconService
.
doJoin2
(
uid
,
"18580"
,
"m8rhchc"
,
response
.
jsonPath
().
getString
(
"againTag"
));
response
=
activityReconService
.
doJoin2
(
uid
,
"18580"
,
"m8rhchc"
,
response
.
jsonPath
().
getString
(
"
data.
againTag"
));
response
.
prettyPrint
();
Thread
.
sleep
(
2000
);
//第二次抽奖后查询数据库,获取当前积分
...
...
src/test/java/http/cases/PkMoudleTest/瓜分积分_作弊瓜分.java
→
src/test/java/http/cases/PkMoudleTest/瓜分积分_作弊瓜分
_AccessTest
.java
View file @
6915177d
...
...
@@ -23,11 +23,12 @@ import org.testng.Assert;
import
org.testng.annotations.AfterClass
;
import
org.testng.annotations.Test
;
import
java.math.BigDecimal
;
import
java.sql.SQLException
;
import
java.util.Map
;
public
class
瓜分积分
_
作弊瓜分
extends
DuibaTestBase
{
public
class
瓜分积分
_
作弊瓜分
_AccessTest
extends
DuibaTestBase
{
@Autowired
PkDevelopService
pkDevelopService
;
...
...
@@ -48,7 +49,7 @@ public class 瓜分积分_作弊瓜分 extends DuibaTestBase {
@Test
public
void
创建
PK
活动
()
throws
Exception
{
Response
response
=
pkDevelopService
.
betEditor
(
"21827"
,
"4"
,
"1"
,
"1"
,
"30"
);
Response
response
=
pkDevelopService
.
betEditor
(
"21827"
,
"
2"
,
"
4"
,
"1"
,
"1"
,
"30"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"desc"
),
"成功"
,
"创建组件化pk活动失败"
);
response
=
pkService
.
getBetList
(
uid1
);
...
...
@@ -192,7 +193,9 @@ public class 瓜分积分_作弊瓜分 extends DuibaTestBase {
public
void
出奖弹层校验
()
throws
Exception
{
Response
response
=
pkService
.
popup
(
uid1
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.prizeList[0].totalBonus"
),
"1"
,
"中奖弹窗积分校验失败"
);
//Assert.assertEquals(response.jsonPath().getString("data.prizeList[0].totalBonus"),"1","中奖弹窗积分校验失败");
Assert
.
assertTrue
(
new
BigDecimal
(
response
.
jsonPath
().
getString
(
"data.prizeList[0].totalBonus"
)).
compareTo
(
new
BigDecimal
(
"1"
))==
0
,
"中奖弹窗积分校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.prizeList[0].bonusType"
),
"4"
,
"中奖弹窗类型校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.show"
),
"true"
,
"展示弹窗校验失败"
);
...
...
@@ -254,6 +257,8 @@ public class 瓜分积分_作弊瓜分 extends DuibaTestBase {
Boolean
result5
=
jdbc
.
update
(
"delete from bet_activity.tb_bet_result where bet_id = ?"
,
betId
);
Boolean
result2
=
jdbc
.
update
(
"delete from act_com_conf.tb_bet_group_relation where bet_id = ?"
,
betId
);
Boolean
result3
=
jdbc
.
update
(
"delete from act_com_conf.tb_bet_config where id = ?"
,
betId
);
Boolean
result6
=
jdbc
.
update
(
"delete from credits.operating_activity where activity_id = ?"
,
betId
);
}
catch
(
SQLException
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
){
...
...
src/test/java/http/cases/PkMoudleTest/瓜分积分_实际瓜分.java
View file @
6915177d
...
...
@@ -50,7 +50,7 @@ public class 瓜分积分_实际瓜分 extends DuibaTestBase {
@Test
public
void
创建
PK
活动
()
throws
Exception
{
Response
response
=
pkDevelopService
.
betEditor
(
"21771"
,
"4"
,
null
,
"1"
,
"30"
);
Response
response
=
pkDevelopService
.
betEditor
(
"21771"
,
"
2"
,
"
4"
,
null
,
"1"
,
"30"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"desc"
),
"成功"
,
"创建组件化pk活动失败"
);
response
=
pkService
.
getBetList
(
uid1
);
...
...
src/test/java/http/cases/PkMoudleTest/瓜分积分_实际瓜分_主胜方.java
View file @
6915177d
...
...
@@ -55,7 +55,7 @@ public class 瓜分积分_实际瓜分_主胜方 extends DuibaTestBase {
@Test
public
void
创建
PK
活动
()
throws
Exception
{
Response
response
=
pkDevelopService
.
betEditor_right
(
"18157163293"
,
"21832"
,
"4"
,
null
,
"1"
,
"30"
,
"false"
,
"true"
);
Response
response
=
pkDevelopService
.
betEditor_right
(
"18157163293"
,
"21832"
,
"
2"
,
"
4"
,
null
,
"1"
,
"30"
,
"false"
,
"true"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"desc"
),
"成功"
,
"创建组件化pk活动失败"
);
response
=
pkService
.
getBetList
(
uid1
);
...
...
src/test/java/http/cases/PkMoudleTest/瓜分红包_作弊瓜分.java
View file @
6915177d
...
...
@@ -50,7 +50,7 @@ public class 瓜分红包_作弊瓜分 extends DuibaTestBase {
@Test
public
void
创建
PK
活动
()
throws
Exception
{
Response
response
=
pkDevelopService
.
betEditor
(
"21829"
,
"2"
,
"0.01"
,
"0"
,
"10"
);
Response
response
=
pkDevelopService
.
betEditor
(
"21829"
,
"
1"
,
"
2"
,
"0.01"
,
"0"
,
"10"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"desc"
),
"成功"
,
"创建组件化pk_分红包活动失败"
);
response
=
pkService
.
getBetList
(
uid1
);
...
...
src/test/java/http/cases/PkMoudleTest/瓜分红包_实际瓜分.java
View file @
6915177d
...
...
@@ -50,7 +50,7 @@ public class 瓜分红包_实际瓜分 extends DuibaTestBase {
@Test
public
void
创建
PK
活动
()
throws
Exception
{
Response
response
=
pkDevelopService
.
betEditor
(
"21828"
,
"2"
,
null
,
"1"
,
"30"
);
Response
response
=
pkDevelopService
.
betEditor
(
"21828"
,
"
1"
,
"
2"
,
null
,
"1"
,
"30"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"desc"
),
"成功"
,
"创建组件化pk_分红包活动失败"
);
response
=
pkService
.
getBetList
(
uid1
);
...
...
src/test/java/http/model/BetDevelopVo.java
View file @
6915177d
...
...
@@ -34,6 +34,9 @@ public class BetDevelopVo {
private
String
shareExp
;
//'瓜分的经验池'
private
String
startTime
;
// '活动开始时间'
private
String
title
;
//'投注活动标题'
private
String
delayHours
;
//'结算时间'
private
String
isHover
;
private
String
popoverVisible
;
// private String id; //主键
// private String pluginId; //'发奖品时需要填插件id'
// private String prizeLimit; //'发奖品时的发放上限'
...
...
@@ -125,7 +128,28 @@ public class BetDevelopVo {
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
public
String
getDelayHours
()
{
return
delayHours
;
}
public
void
setDelayHours
(
String
delayHours
)
{
this
.
delayHours
=
delayHours
;
}
public
String
getIsHover
()
{
return
isHover
;
}
public
void
setIsHover
(
String
isHover
)
{
this
.
isHover
=
isHover
;
}
public
String
getPopoverVisible
()
{
return
popoverVisible
;
}
public
void
setPopoverVisible
(
String
popoverVisible
)
{
this
.
popoverVisible
=
popoverVisible
;
}
// public String getId() {
// return id;
// }
...
...
src/test/java/http/service/Activity/ActivityReconService.java
View file @
6915177d
...
...
@@ -152,6 +152,7 @@ public class ActivityReconService {
}
public
Response
doJoin2
(
int
uid
,
String
activityId
,
String
token
,
String
orderId
)
throws
Exception
{
logger
.
info
(
"再抽一次订单号为:"
+
orderId
);
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"activityId"
,
activityId
);
map
.
put
(
"token"
,
token
);
...
...
src/test/java/http/service/Activity/PkService.java
View file @
6915177d
...
...
@@ -99,6 +99,7 @@ public class PkService {
}
public
Response
doJoin
(
Integer
uid
,
String
betId
,
String
optionId
)
throws
Exception
{
String
url
=
activityHost
+
"/betActivity2/doJoin"
;
...
...
src/test/java/http/service/hd/PkDevelopService.java
View file @
6915177d
...
...
@@ -40,10 +40,11 @@ public class PkDevelopService {
@Autowired
Authorization
authorization
;
public
Response
betEditor
(
String
appId
,
String
bonusType
,
String
bonusAmount
,
String
creditsValue
,
String
shareExp
)
throws
Exception
{
public
Response
betEditor
(
String
appId
,
String
bonusType
,
String
questionType
,
String
bonusAmount
,
String
creditsValue
,
String
shareExp
)
throws
Exception
{
String
data
=
PublicMethod
.
data
();
String
url
=
"http://"
+
hdHost
+
"/visual-editor/bet/post"
;
//String url = "http://" + hdHost + "/visual-editor/bet/post";
String
url
=
"http://"
+
hdHost
+
"/visual-editor/bet/save"
;
//创建投注项
List
<
BetOptionVo
>
betOptionVoList
=
new
ArrayList
<>();
...
...
@@ -64,24 +65,32 @@ public class PkDevelopService {
BetDevelopVo
betDevelopVo
=
new
BetDevelopVo
();
betDevelopVo
.
setBetOptionDtoList
(
betOptionVoList
);
betDevelopVo
.
setBetType
(
"1"
);
betDevelopVo
.
setBonusType
(
bonusType
);
if
(
bonusType
.
equals
(
"2"
)){
betDevelopVo
.
setTitle
(
"【自动化】组件pk_瓜分红包"
+
data
);
}
else
if
(
bonusType
.
equals
(
"4"
)){
betDevelopVo
.
setTitle
(
"【自动化】组件pk_瓜分积分"
+
data
);
}
betDevelopVo
.
setBonusAmount
(
bonusAmount
);
betDevelopVo
.
setBonusType
(
questionType
);
betDevelopVo
.
setConfigStatus
(
"3"
);
betDevelopVo
.
setCreditsValue
(
creditsValue
);
betDevelopVo
.
setEndTime
(
"2029-12-31 00:00"
);
betDevelopVo
.
setShareExp
(
shareExp
);
betDevelopVo
.
setDelayHours
(
"2"
);
betDevelopVo
.
setEndTime
(
""
);
betDevelopVo
.
setIsHover
(
"false"
);
betDevelopVo
.
setPopoverVisible
(
"false"
);
betDevelopVo
.
setShareExp
(
shareExp
);
if
(
questionType
.
equals
(
"2"
)){
betDevelopVo
.
setTitle
(
"【自动化】组件pk_瓜分红包"
+
data
);
}
else
if
(
questionType
.
equals
(
"4"
)){
betDevelopVo
.
setTitle
(
"【自动化】组件pk_瓜分积分"
+
data
);
}
betDevelopVoList
.
add
(
betDevelopVo
);
Map
<
String
,
Object
>
para
=
new
HashMap
<>();
para
.
put
(
"list"
,
betDevelopVoList
);
para
.
put
(
"bonusAccount"
,
bonusAmount
);
para
.
put
(
"bonusType"
,
bonusType
);
//2-瓜分积分
para
.
put
(
"periodStartTime"
,
"2019-03-04T16:00:00.000Z"
);
para
.
put
(
"periodEndTime"
,
"2029-03-22T16:00:00.000Z"
);
para
.
put
(
"rules"
,
"自动化规则自动化规则"
);
para
.
put
(
"timeType"
,
"create"
);
para
.
put
(
"title"
,
"组件pk自动化"
);
para
.
put
(
"list"
,
betDevelopVoList
);
JSONObject
jsonParam
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
para
));
...
...
@@ -98,7 +107,7 @@ public class PkDevelopService {
return
betResponse
;
}
public
Response
betEditor_right
(
String
account
,
String
appId
,
String
bonusType
,
String
bonusAmount
,
String
creditsValue
,
String
shareExp
,
String
loser
,
String
winner
)
throws
Exception
{
public
Response
betEditor_right
(
String
account
,
String
appId
,
String
bonusType
,
String
questionType
,
String
bonusAmount
,
String
creditsValue
,
String
shareExp
,
String
loser
,
String
winner
)
throws
Exception
{
String
data
=
PublicMethod
.
data
();
String
url
=
"http://"
+
hdHost
+
"/visual-editor/bet/post"
;
...
...
@@ -122,24 +131,32 @@ public class PkDevelopService {
BetDevelopVo
betDevelopVo
=
new
BetDevelopVo
();
betDevelopVo
.
setBetOptionDtoList
(
betOptionVoList
);
betDevelopVo
.
setBetType
(
"1"
);
betDevelopVo
.
setBonusType
(
bonusType
);
betDevelopVo
.
setBonusAmount
(
bonusAmount
);
betDevelopVo
.
setBonusType
(
questionType
);
betDevelopVo
.
setConfigStatus
(
"3"
);
betDevelopVo
.
setCreditsValue
(
creditsValue
);
betDevelopVo
.
setDelayHours
(
"2"
);
betDevelopVo
.
setEndTime
(
""
);
betDevelopVo
.
setIsHover
(
"false"
);
betDevelopVo
.
setPopoverVisible
(
"false"
);
betDevelopVo
.
setShareExp
(
shareExp
);
if
(
bonusType
.
equals
(
"2"
)){
betDevelopVo
.
setTitle
(
"【自动化】组件pk_瓜分红包"
+
data
);
}
else
if
(
bonusType
.
equals
(
"4"
)){
betDevelopVo
.
setTitle
(
"【自动化】组件pk_瓜分积分"
+
data
);
}
betDevelopVo
.
setBonusAmount
(
bonusAmount
);
betDevelopVo
.
setConfigStatus
(
"3"
);
betDevelopVo
.
setCreditsValue
(
creditsValue
);
betDevelopVo
.
setEndTime
(
"2029-12-31 00:00"
);
betDevelopVo
.
setShareExp
(
shareExp
);
betDevelopVoList
.
add
(
betDevelopVo
);
Map
<
String
,
Object
>
para
=
new
HashMap
<>();
para
.
put
(
"list"
,
betDevelopVoList
);
para
.
put
(
"bonusAccount"
,
""
);
//账户类型1-总帐户
para
.
put
(
"bonusType"
,
bonusType
);
//2-瓜分积分
para
.
put
(
"periodStartTime"
,
"2019-03-05T16:00:00.000Z"
);
para
.
put
(
"periodEndTime"
,
"2029-03-22T16:00:00.000Z"
);
para
.
put
(
"rules"
,
"自动化规则自动化规则"
);
para
.
put
(
"timeType"
,
"create"
);
para
.
put
(
"title"
,
"组件pk自动化_主胜方"
);
para
.
put
(
"list"
,
betDevelopVoList
);
JSONObject
jsonParam
=
JSONObject
.
parseObject
(
JSON
.
toJSONString
(
para
));
...
...
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