Commit 4cd080ae authored by 马博's avatar 马博

update

parent 96d6ec96
...@@ -126,9 +126,11 @@ public class Exchange_ExchangeTest extends CheckTemplet { ...@@ -126,9 +126,11 @@ public class Exchange_ExchangeTest extends CheckTemplet {
credits = String.valueOf(Integer.valueOf(credits)-100); credits = String.valueOf(Integer.valueOf(credits)-100);
//优惠券兑换 //优惠券兑换
Response response = couponExchangeService.couponExchange(authorization.dafuwengLogin(uid),"157070","27050"); Response response = couponExchangeService.couponExchange(authorization.dafuwengLogin(uid),"157070","27050");
response.prettyPrint();
String orderId = response.jsonPath().getString("orderId"); String orderId = response.jsonPath().getString("orderId");
//查看兑换结果 //查看兑换结果
response = mobileService.orderStatusQuery(response.getDetailedCookies(),uid,orderId); response = mobileService.orderStatusQuery(response.getDetailedCookies(),uid,orderId);
response.prettyPrint();
String status = response.jsonPath().getString("status"); String status = response.jsonPath().getString("status");
//异步接口 //异步接口
......
...@@ -24,6 +24,7 @@ import java.lang.reflect.Method; ...@@ -24,6 +24,7 @@ import java.lang.reflect.Method;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.Iterator; import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ThreadFactory;
/** /**
* Created by mabo on 2018/9/13 * Created by mabo on 2018/9/13
...@@ -143,6 +144,7 @@ public class Qb_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -143,6 +144,7 @@ public class Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
message = response.jsonPath().getString("message"); message = response.jsonPath().getString("message");
i--; i--;
} }
Thread.sleep(4000);
Map<String, Object> orderMap = jdbc.findSimpleResult("SELECT * from orders_consumer.orders_0693 where id ="+orderId); Map<String, Object> orderMap = jdbc.findSimpleResult("SELECT * from orders_consumer.orders_0693 where id ="+orderId);
String orderStatus = String.valueOf(orderMap.get("status")); String orderStatus = String.valueOf(orderMap.get("status"));
Assert.assertEquals(message,"兑换失败,用户积分余额不足","校验message失败"); Assert.assertEquals(message,"兑换失败,用户积分余额不足","校验message失败");
...@@ -183,6 +185,7 @@ public class Qb_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -183,6 +185,7 @@ public class Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
public void 每日兑换限制() throws Exception { public void 每日兑换限制() throws Exception {
int uid = 7475; int uid = 7475;
Thread.sleep(5000);
//第一次兑换 //第一次兑换
Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234345554","1"); Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234345554","1");
String orderId = (String)response.jsonPath().get("orderId"); String orderId = (String)response.jsonPath().get("orderId");
...@@ -214,6 +217,7 @@ public class Qb_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -214,6 +217,7 @@ public class Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
public void 永久兑换限制() throws Exception { public void 永久兑换限制() throws Exception {
int uid = 7476; int uid = 7476;
Thread.sleep(5000);
//第一次兑换 //第一次兑换
Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234345554","2"); Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234345554","2");
String orderId = (String)response.jsonPath().get("orderId"); String orderId = (String)response.jsonPath().get("orderId");
......
...@@ -68,6 +68,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet { ...@@ -68,6 +68,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
public void 用户每日兑换限制() throws Exception { public void 用户每日兑换限制() throws Exception {
int uid = 4932; int uid = 4932;
Thread.sleep(5000);
//第一次兑换 //第一次兑换
Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234343554","1"); Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234343554","1");
String orderId = (String)response.jsonPath().get("orderId"); String orderId = (String)response.jsonPath().get("orderId");
...@@ -101,6 +102,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet { ...@@ -101,6 +102,7 @@ public class Qb_兑换限制测试_ExchangeTest extends CheckTemplet {
public void 用户永久兑换限制() throws Exception { public void 用户永久兑换限制() throws Exception {
int uid = 7477; int uid = 7477;
Thread.sleep(5000);
//第一次兑换 //第一次兑换
Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234345554","2"); Response response = qbExchangeService.doTakePrize(authorization.dafuwengLogin(uid),"1234345554","2");
String orderId = (String)response.jsonPath().get("orderId"); String orderId = (String)response.jsonPath().get("orderId");
......
...@@ -154,6 +154,7 @@ public class 话费_兑换限制测试_ExchangeTest extends CheckTemplet { ...@@ -154,6 +154,7 @@ public class 话费_兑换限制测试_ExchangeTest extends CheckTemplet {
String appItemId = "191793"; String appItemId = "191793";
String itemId = "1664"; String itemId = "1664";
Thread.sleep(5000);
//20元话费兑换 //20元话费兑换
Response response = couponExchangeService.phonebillExchange(authorization.dafuwengLogin(uid),appItemId,itemId,"20"); Response response = couponExchangeService.phonebillExchange(authorization.dafuwengLogin(uid),appItemId,itemId,"20");
response.prettyPrint(); response.prettyPrint();
......
...@@ -70,6 +70,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -70,6 +70,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet {
String skuId = "61"; String skuId = "61";
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
String message = ""; String message = "";
Thread.sleep(5000);
try{ try{
//第一次兑换 //第一次兑换
...@@ -134,6 +135,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -134,6 +135,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet {
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
String message = ""; String message = "";
Thread.sleep(5000);
try{ try{
//第一次兑换 //第一次兑换
Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId);
...@@ -197,6 +199,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -197,6 +199,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet {
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
String message = ""; String message = "";
Thread.sleep(5000);
try{ try{
//第一次兑换 //第一次兑换
Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId);
...@@ -261,6 +264,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -261,6 +264,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet {
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
String message = ""; String message = "";
Thread.sleep(5000);
try{ try{
//第一次兑换 //第一次兑换
Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId);
...@@ -329,6 +333,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -329,6 +333,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet {
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
logger.info(caseName); logger.info(caseName);
Thread.sleep(5000);
//兑换 //兑换
try{ try{
Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId);
...@@ -379,6 +384,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -379,6 +384,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet {
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
String message = ""; String message = "";
Thread.sleep(5000);
//会员等级无法兑换 //会员等级无法兑换
try{ try{
Response response =gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response =gawService.couponExchange(cookies,appItemId,itemId,skuId);
...@@ -410,6 +416,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -410,6 +416,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet {
String message = ""; String message = "";
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
Thread.sleep(5000);
//无库存兑换 //无库存兑换
try{ try{
Response response =gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response =gawService.couponExchange(cookies,appItemId,itemId,skuId);
...@@ -436,6 +443,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -436,6 +443,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet {
String skuId = "70"; String skuId = "70";
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
Thread.sleep(5000);
Response response =gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response =gawService.couponExchange(cookies,appItemId,itemId,skuId);
response.prettyPrint(); response.prettyPrint();
String orderId = response.jsonPath().getString("data.orderId"); String orderId = response.jsonPath().getString("data.orderId");
...@@ -470,6 +478,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet { ...@@ -470,6 +478,7 @@ public class 兑吧卡密_兑换流程测试_ExchangeTest extends CheckTemplet {
String skuId = "106"; String skuId = "106";
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
Thread.sleep(5000);
//优惠券兑换 //优惠券兑换
Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId);
String orderId = response.jsonPath().getString("data.orderId"); String orderId = response.jsonPath().getString("data.orderId");
......
...@@ -154,6 +154,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -154,6 +154,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
String message = ""; String message = "";
Thread.sleep(5000);
//第一次兑换 //第一次兑换
Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId);
String orderId = response.jsonPath().getString("data.orderId"); String orderId = response.jsonPath().getString("data.orderId");
...@@ -206,6 +207,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -206,6 +207,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
String message = ""; String message = "";
Thread.sleep(5000);
//第一次兑换 //第一次兑换
Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId);
String orderId = response.jsonPath().getString("data.orderId"); String orderId = response.jsonPath().getString("data.orderId");
...@@ -259,6 +261,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -259,6 +261,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
String message = ""; String message = "";
Thread.sleep(5000);
//第一次兑换 //第一次兑换
Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId);
String orderId = response.jsonPath().getString("data.orderId"); String orderId = response.jsonPath().getString("data.orderId");
...@@ -316,6 +319,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -316,6 +319,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
logger.info(caseName); logger.info(caseName);
Thread.sleep(5000);
//兑换 //兑换
try{ try{
Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId);
...@@ -366,6 +370,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -366,6 +370,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
String message = ""; String message = "";
Thread.sleep(5000);
//会员等级无法兑换 //会员等级无法兑换
try{ try{
Response response =gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response =gawService.couponExchange(cookies,appItemId,itemId,skuId);
...@@ -397,6 +402,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -397,6 +402,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem
String message = ""; String message = "";
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
Thread.sleep(5000);
//无库存兑换 //无库存兑换
try{ try{
Response response =gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response =gawService.couponExchange(cookies,appItemId,itemId,skuId);
...@@ -428,6 +434,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -428,6 +434,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem
logger.info(caseName); logger.info(caseName);
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
Thread.sleep(5000);
//优惠券兑换 //优惠券兑换
Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId); Response response = gawService.couponExchange(cookies,appItemId,itemId,skuId);
String orderId = response.jsonPath().getString("data.orderId"); String orderId = response.jsonPath().getString("data.orderId");
...@@ -490,6 +497,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -490,6 +497,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem
String message = ""; String message = "";
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
Thread.sleep(5000);
//优惠券兑换 //优惠券兑换
try{ try{
Response response = gawService.couponExchange(cookies,appItemId,itemId,"172"); Response response = gawService.couponExchange(cookies,appItemId,itemId,"172");
...@@ -517,6 +525,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem ...@@ -517,6 +525,7 @@ public class 兑吧新优惠券_兑换流程测试_ExchangeTest extends CheckTem
String message = ""; String message = "";
Map cookies = authorization.dafuwengLogin(uid); Map cookies = authorization.dafuwengLogin(uid);
Thread.sleep(5000);
//优惠券兑换,skuId改为其它商品的 //优惠券兑换,skuId改为其它商品的
try{ try{
Response response = gawService.couponExchange(cookies,appItemId,itemId,"105"); Response response = gawService.couponExchange(cookies,appItemId,itemId,"105");
......
...@@ -78,10 +78,11 @@ public class 自有新卡密_兑换限制测试_ExchangeTest extends CheckTemple ...@@ -78,10 +78,11 @@ public class 自有新卡密_兑换限制测试_ExchangeTest extends CheckTemple
if (method.getName().equals("日期兑换限制测试")) { if (method.getName().equals("日期兑换限制测试")) {
result = new Object[][]{ result = new Object[][]{
new Object[]{1, "194628",87,"实物日期兑换限制未开始测试"}, //case1 new Object[]{1, "194628",87,"实物日期兑换限制未开始测试"}, //case1
new Object[]{2, "199855",291,"实物日期兑换限制进行中测试"}, //case2 199855 194629 new Object[]{2, "194629",88,"实物日期兑换限制进行中测试"}, //case2 199855 194629
new Object[]{3, "194630",89,"实物日期兑换限制已结束"}, //case3 new Object[]{3, "194630",89,"实物日期兑换限制已结束"}, //case3
}; };
} }
if (method.getName().equals("库存不足测试")) { if (method.getName().equals("库存不足测试")) {
result = new Object[][]{ result = new Object[][]{
new Object[]{"194595", "实物库存不足测试"}, //case1 new Object[]{"194595", "实物库存不足测试"}, //case1
......
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