Commit 0c57c7de authored by 马博's avatar 马博

test

parent f4efedf8
......@@ -68,6 +68,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
int uid = 4932;
//第一次兑换
Thread.sleep(3000);
Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234345554","1");
String orderId = (String)response.jsonPath().get("orderId");
response = mobileService.orderStatusQuery(authorization.dafuwengLogin(uid),orderId);
......@@ -80,6 +81,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
i--;
}
//第二次兑换
Thread.sleep(3000);
response = qbExchangeService.doTakePrize1(authorization.dafuwengLogin(uid),"1234345554","1");
message = response.jsonPath().getString("message");
logger.info(message);
......@@ -99,6 +101,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
int uid = 4933;
//第一次兑换
Thread.sleep(3000);
Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234345554","2");
String orderId = (String)response.jsonPath().get("orderId");
response = mobileService.orderStatusQuery(authorization.dafuwengLogin(uid),orderId);
......@@ -111,6 +114,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
i--;
}
//第二次兑换
Thread.sleep(3000);
response = qbExchangeService.doTakePrize1(authorization.dafuwengLogin(uid),"12343455541","2");
response.prettyPrint();
message = response.jsonPath().getString("message");
......@@ -133,6 +137,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
int uid = 4933;
//第一次兑换
Thread.sleep(3000);
Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234345554","3");
String orderId = (String)response.jsonPath().get("orderId");
response = mobileService.orderStatusQuery(authorization.dafuwengLogin(uid),orderId);
......@@ -145,6 +150,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
i--;
}
//第二次兑换
Thread.sleep(3000);
response = qbExchangeService.doTakePrize1(authorization.dafuwengLogin(uid),"12343455541","3");
response.prettyPrint();
message = response.jsonPath().getString("message");
......@@ -173,6 +179,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
//会员等级无法兑换
try{
Thread.sleep(3000);
Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234345554",degreeId);
response.prettyPrint();
......@@ -182,6 +189,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
logger.info(message);
//会员等级可兑换,vip=5
Thread.sleep(3000);
Response response = qbExchangeService.doTakePrize(authorization.generateSignAutoLogin("42vkFzeLnoNjXt6AhMM7LPj4G8pT",vipUid),"1234345554",degreeId);
response.prettyPrint();
......@@ -198,6 +206,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
int uid = 4934;
//第一次兑换
Thread.sleep(3000);
Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"123434555412","1");
String orderId = (String)response.jsonPath().get("orderId");
response = mobileService.orderStatusQuery(authorization.dafuwengLogin(uid),orderId);
......@@ -212,6 +221,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
//第二次兑换
//不同的用户,同一个 qq好
int uid1=4935;
Thread.sleep(3000);
response = qbExchangeService.doTakePrize1(authorization.dafuwengLogin(uid1),"123434555412","1");
response.prettyPrint();
message = response.jsonPath().getString("message");
......
......@@ -45,11 +45,14 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
try{
//话费第一次兑换
Thread.sleep(3000);
Response response = couponExchangeService.phonebillExchange(authorization.dafuwengLogin(uid),"10");
response.prettyPrint();
Assert.assertEquals(response.jsonPath().getString("success"),"true","校验兑换失败");
logger.info("用户成功兑换一次");
Thread.sleep(3000);
//再次兑换
try{
response = couponExchangeService.phonebillExchange(authorization.dafuwengLogin(uid),"10");
......@@ -90,11 +93,13 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
try{
//话费第一次兑换
Thread.sleep(3000);
Response response = couponExchangeService.phonebillExchange(authorization.dafuwengLogin(uid),"20");
response.prettyPrint();
Assert.assertEquals(response.jsonPath().getString("success"),"true","校验兑换失败");
logger.info("用户成功兑换一次");
Thread.sleep(3000);
//再次兑换
try{
response = couponExchangeService.phonebillExchange(authorization.dafuwengLogin(uid),"20");
......@@ -135,11 +140,13 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
try{
//话费第一次兑换
Thread.sleep(3000);
Response response = couponExchangeService.phonebillExchange(authorization.dafuwengLogin(uid),"50");
response.prettyPrint();
Assert.assertEquals(response.jsonPath().getString("success"),"true","校验兑换失败");
logger.info("用户成功兑换一次");
Thread.sleep(3000);
//再次兑换
try{
response = couponExchangeService.phonebillExchange(authorization.dafuwengLogin(uid),"50");
......@@ -186,6 +193,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
//会员等级无法兑换
try{
Thread.sleep(3000);
Response response = couponExchangeService.phonebillExchange(authorization.dafuwengLogin(uid),degreeId);
response.prettyPrint();
......@@ -194,6 +202,7 @@ public class 多档位话费_兑换流程测试_ExchangeTest extends CheckTemple
}
logger.info(message);
Thread.sleep(3000);
//会员等级可兑换,vip=5
Response response = couponExchangeService.phonebillExchange(authorization.generateSignAutoLogin("42vkFzeLnoNjXt6AhMM7LPj4G8pT",vipUid),degreeId);
response.prettyPrint();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment