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
1b2e1931
Commit
1b2e1931
authored
Dec 18, 2018
by
赵然
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zr
parent
d933348f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
143 additions
and
2 deletions
+143
-2
瓜分积分_作弊瓜分_AccessTest.java
...st/java/http/cases/PkMoudleTest/瓜分积分_作弊瓜分_AccessTest.java
+61
-0
瓜分积分_实际瓜分_AccessTest.java
...st/java/http/cases/PkMoudleTest/瓜分积分_实际瓜分_AccessTest.java
+64
-1
瓜分红包_作弊瓜分_AccessTest.java
...st/java/http/cases/PkMoudleTest/瓜分红包_作弊瓜分_AccessTest.java
+17
-0
SingleLottery_AccessTest.java
...ttp/cases/SingleLotteryTest/SingleLottery_AccessTest.java
+1
-1
No files found.
src/test/java/http/cases/PkMoudleTest/瓜分积分_作弊瓜分_AccessTest.java
View file @
1b2e1931
...
@@ -20,8 +20,10 @@ import org.joda.time.format.DateTimeFormat;
...
@@ -20,8 +20,10 @@ import org.joda.time.format.DateTimeFormat;
import
org.joda.time.format.DateTimeFormatter
;
import
org.joda.time.format.DateTimeFormatter
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.AfterClass
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
java.sql.SQLException
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -200,6 +202,65 @@ public class 瓜分积分_作弊瓜分_AccessTest extends DuibaTestBase {
...
@@ -200,6 +202,65 @@ public class 瓜分积分_作弊瓜分_AccessTest extends DuibaTestBase {
Assert
.
assertEquals
(
response2
.
jsonPath
().
getString
(
"data.show"
),
"false"
,
"展示弹窗校验失败"
);
Assert
.
assertEquals
(
response2
.
jsonPath
().
getString
(
"data.show"
),
"false"
,
"展示弹窗校验失败"
);
}
}
@Test
(
dependsOnMethods
=
{
"出奖弹层校验"
})
public
void
战绩页校验
()
throws
Exception
{
Response
response
=
pkService
.
list
(
uid1
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].userWin"
),
"true"
,
"中奖记录校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.id"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.shareExp"
),
"30"
,
"活动瓜分金额校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.configStatus"
),
"4"
,
"活动状态校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.creditsValue"
),
"1.00"
,
"活动消耗校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.betType"
),
"1"
,
"活动押注类型校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.bonusType"
),
"4"
,
"活动瓜分类型校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].resultStatus"
),
"4"
,
"活动选项结果状态校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].optionId"
),
optionId1
,
"活动投注id1校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].rank"
),
"1"
,
"活动投注结果校验失败"
);
// Assert.assertEquals(response.jsonPath().getString("data.list[0].options[0].betTimes"),"4","活动投注人数校验失败");
// Assert.assertEquals(response.jsonPath().getString("data.list[0].options[0].scale"),"66.7","活动投注人数比例校验失败");
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].resultStatus"
),
"4"
,
"活动选项结果状态校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].optionId"
),
optionId2
,
"活动投注id1校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].rank"
),
"2"
,
"活动投注结果校验失败"
);
// Assert.assertEquals(response.jsonPath().getString("data.list[0].options[1].betTimes"),"2","活动投注人数校验失败");
// Assert.assertEquals(response.jsonPath().getString("data.list[0].options[1].scale"),"33.3","活动投注人数比例校验失败");
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.optionId"
),
optionId1
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.bonus"
),
"0.01"
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.exchangeStatus"
),
"1"
,
"兑换状态校验失败"
);
response
=
pkService
.
list
(
uid3
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].userWin"
),
"false"
,
"中奖记录校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.optionId"
),
optionId2
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.bonus"
),
"0.0"
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.exchangeStatus"
),
"0"
,
"兑换状态校验失败"
);
}
@AfterClass
public
void
afterclass
()
{
try
{
Boolean
result1
=
jdbc
.
update
(
"delete from act_com_conf.tb_bet_option where bet_id = ?"
,
betId
);
Boolean
result4
=
jdbc
.
update
(
"delete from act_record.tb_bet_record where bet_id = ?"
,
betId
);
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
);
}
catch
(
SQLException
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
public
void
modifyOpenPrizeTime
(
String
betId
,
int
x
)
throws
Exception
{
public
void
modifyOpenPrizeTime
(
String
betId
,
int
x
)
throws
Exception
{
DateTime
time1
=
new
DateTime
();
DateTime
time1
=
new
DateTime
();
...
...
src/test/java/http/cases/PkMoudleTest/瓜分积分_实际瓜分_AccessTest.java
View file @
1b2e1931
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* FileName: 瓜分积分测试_AccessTest
* FileName: 瓜分积分测试_AccessTest
* Author: zhaoran
* Author: zhaoran
* Date: 2018/12/10 19:45
* Date: 2018/12/10 19:45
* Description:
* Description:
"appId": 21771
*/
*/
package
http
.
cases
.
PkMoudleTest
;
package
http
.
cases
.
PkMoudleTest
;
...
@@ -21,8 +21,10 @@ import org.joda.time.format.DateTimeFormat;
...
@@ -21,8 +21,10 @@ import org.joda.time.format.DateTimeFormat;
import
org.joda.time.format.DateTimeFormatter
;
import
org.joda.time.format.DateTimeFormatter
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.AfterClass
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
java.sql.SQLException
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -202,6 +204,64 @@ public class 瓜分积分_实际瓜分_AccessTest extends DuibaTestBase {
...
@@ -202,6 +204,64 @@ public class 瓜分积分_实际瓜分_AccessTest extends DuibaTestBase {
Assert
.
assertEquals
(
response2
.
jsonPath
().
getString
(
"data.show"
),
"false"
,
"展示弹窗校验失败"
);
Assert
.
assertEquals
(
response2
.
jsonPath
().
getString
(
"data.show"
),
"false"
,
"展示弹窗校验失败"
);
}
}
@Test
(
dependsOnMethods
=
{
"出奖弹层校验"
})
public
void
战绩页校验
()
throws
Exception
{
Response
response
=
pkService
.
list
(
uid1
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].userWin"
),
"true"
,
"中奖记录校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.id"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.shareExp"
),
"30"
,
"活动瓜分金额校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.configStatus"
),
"4"
,
"活动状态校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.creditsValue"
),
"1.00"
,
"活动消耗校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.betType"
),
"1"
,
"活动押注类型校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].betConfig.bonusType"
),
"4"
,
"活动瓜分类型校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].resultStatus"
),
"4"
,
"活动选项结果状态校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].optionId"
),
optionId1
,
"活动投注id1校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].rank"
),
"1"
,
"活动投注结果校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].betTimes"
),
"4"
,
"活动投注人数校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[0].scale"
),
"66.7"
,
"活动投注人数比例校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].resultStatus"
),
"4"
,
"活动选项结果状态校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].optionId"
),
optionId2
,
"活动投注id1校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].rank"
),
"2"
,
"活动投注结果校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].betTimes"
),
"2"
,
"活动投注人数校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].options[1].scale"
),
"33.3"
,
"活动投注人数比例校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.optionId"
),
optionId1
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.bonus"
),
"0.07"
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.exchangeStatus"
),
"1"
,
"兑换状态校验失败"
);
response
=
pkService
.
list
(
uid3
);
response
.
prettyPrint
();
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].userWin"
),
"false"
,
"中奖记录校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.betId"
),
betId
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.optionId"
),
optionId2
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.bonus"
),
"0.0"
,
"活动id校验失败"
);
Assert
.
assertEquals
(
response
.
jsonPath
().
getString
(
"data.list[0].record.exchangeStatus"
),
"0"
,
"兑换状态校验失败"
);
}
@AfterClass
public
void
afterclass
()
{
try
{
Boolean
result1
=
jdbc
.
update
(
"delete from act_com_conf.tb_bet_option where bet_id = ?"
,
betId
);
Boolean
result4
=
jdbc
.
update
(
"delete from act_record.tb_bet_record where bet_id = ?"
,
betId
);
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
);
}
catch
(
SQLException
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
public
void
modifyOpenPrizeTime
(
String
betId
,
int
x
)
throws
Exception
{
public
void
modifyOpenPrizeTime
(
String
betId
,
int
x
)
throws
Exception
{
DateTime
time1
=
new
DateTime
();
DateTime
time1
=
new
DateTime
();
...
@@ -216,4 +276,6 @@ public class 瓜分积分_实际瓜分_AccessTest extends DuibaTestBase {
...
@@ -216,4 +276,6 @@ public class 瓜分积分_实际瓜分_AccessTest extends DuibaTestBase {
Boolean
result2
=
jdbc
.
update
(
"update act_com_conf.tb_bet_group_relation set end_time = ? where bet_id = ?\n"
,
endTimeStr
,
betId
);
Boolean
result2
=
jdbc
.
update
(
"update act_com_conf.tb_bet_group_relation set end_time = ? where bet_id = ?\n"
,
endTimeStr
,
betId
);
}
}
}
}
\ No newline at end of file
src/test/java/http/cases/PkMoudleTest/瓜分红包_作弊瓜分_AccessTest.java
View file @
1b2e1931
...
@@ -20,9 +20,11 @@ import org.joda.time.format.DateTimeFormat;
...
@@ -20,9 +20,11 @@ import org.joda.time.format.DateTimeFormat;
import
org.joda.time.format.DateTimeFormatter
;
import
org.joda.time.format.DateTimeFormatter
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.AfterClass
;
import
org.testng.annotations.Test
;
import
org.testng.annotations.Test
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.sql.SQLException
;
import
java.text.DecimalFormat
;
import
java.text.DecimalFormat
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -241,6 +243,21 @@ public class 瓜分红包_作弊瓜分_AccessTest extends DuibaTestBase {
...
@@ -241,6 +243,21 @@ public class 瓜分红包_作弊瓜分_AccessTest extends DuibaTestBase {
}
}
@AfterClass
public
void
afterclass
()
{
try
{
Boolean
result1
=
jdbc
.
update
(
"delete from act_com_conf.tb_bet_option where bet_id = ?"
,
betId
);
Boolean
result4
=
jdbc
.
update
(
"delete from act_record.tb_bet_record where bet_id = ?"
,
betId
);
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
);
}
catch
(
SQLException
e
)
{
e
.
printStackTrace
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
public
void
modifyOpenPrizeTime
(
String
betId
,
int
x
)
throws
Exception
{
public
void
modifyOpenPrizeTime
(
String
betId
,
int
x
)
throws
Exception
{
DateTime
time1
=
new
DateTime
();
DateTime
time1
=
new
DateTime
();
...
...
src/test/java/http/cases/SingleLotteryTest/SingleLottery_AccessTest.java
View file @
1b2e1931
...
@@ -173,7 +173,7 @@ public class SingleLottery_AccessTest extends DuibaTestBase {
...
@@ -173,7 +173,7 @@ public class SingleLottery_AccessTest extends DuibaTestBase {
}
}
Assert
.
assertEquals
(
flowWork
,
"SupplierExchange-started"
,
"数据库主订单流程节点校验失败"
);
Assert
.
assertEquals
(
flowWork
,
"SupplierExchange-started"
,
"数据库主订单流程节点校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"item_id"
)),
"27131"
,
"数据库主订单奖项id校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"item_id"
)),
"27131"
,
"数据库主订单奖项id校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"biz_params"
)),
"胡梦新:18258853242:浙江
省:杭州市:西湖区:数娱大厦
"
,
"数据库主订单biz_params校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"biz_params"
)),
"胡梦新:18258853242:浙江
:杭州市:西湖区:西溪街道:数娱大厦
"
,
"数据库主订单biz_params校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"pay_status"
)),
"prereduce"
,
"数据库主订单pay_status校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"pay_status"
)),
"prereduce"
,
"数据库主订单pay_status校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"status"
)),
"consume_success"
,
"数据库主订单status校验失败"
);
Assert
.
assertEquals
(
String
.
valueOf
(
selectResult2
.
get
(
"status"
)),
"consume_success"
,
"数据库主订单status校验失败"
);
...
...
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