Commit 41da1017 authored by 吕雯燕's avatar 吕雯燕

lv

parent 4cd080ae
......@@ -46,7 +46,7 @@ public class 新Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
String message = "";
try{
//支付宝兑换
//Q币兑换
Response response = this.Q币兑换(uid,actualCredits,degreeId,appItemId,credits,qq);
Assert.assertEquals(response.jsonPath().getString("data.payCreditsStatus"),"1","校验兑换失败");
logger.info("用户成功兑换一次");
......@@ -67,7 +67,7 @@ public class 新Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
String btnText = MatcherString.getString(detailResponse.asString(), "\"1\":\\{\"btnText\":\"(.*?)\",", 1);
logger.info("再次兑换按钮:" + btnText);
Assert.assertTrue(message.contains("\"desc\":\"抱歉,该QQ号已达到充值上限,请换一个QQ号吧。\""),"校验用户兑换限制失败");
Assert.assertTrue(message.contains("抱歉,该QQ号已达到充值上限,请换一个QQ号吧。"),"校验用户兑换限制失败");
Assert.assertEquals(btnText,"已兑换","校验马上兑换按钮状态失败");
logger.info("校验1个Q币用户永久兑换限制成功");
......@@ -118,7 +118,7 @@ public class 新Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
String btnText = MatcherString.getString(detailResponse.asString(), "\"2\":\\{\"btnText\":\"(.*?)\",", 1);
logger.info("再次兑换按钮:" + btnText);
Assert.assertTrue(message.contains("\"desc\":\"已兑完\""),"校验用户兑换限制失败");
Assert.assertTrue(message.contains("已兑完"),"校验用户兑换限制失败");
Assert.assertEquals(btnText,"今日已兑换","校验马上兑换按钮状态失败");
logger.info("校验2个Q币用户每天兑换限制成功");
......@@ -147,7 +147,6 @@ public class 新Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
}
@Test(description = "3个Q币用户兑换限制每月1次")
public void Q币用户每月兑换限制测试() throws Exception{
......@@ -181,7 +180,7 @@ public class 新Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
String btnText = MatcherString.getString(detailResponse.asString(), "\"3\":\\{\"btnText\":\"(.*?)\",", 1);
logger.info("再次兑换按钮:" + btnText);
Assert.assertTrue(message.contains("\"desc\":\"已兑完\""),"校验用户兑换限制失败");
Assert.assertTrue(message.contains("已兑完"),"校验用户兑换限制失败");
Assert.assertEquals(btnText,"已兑换","校验马上兑换按钮状态失败");
logger.info("校验3个Q币用户每月兑换限制成功");
......@@ -238,7 +237,7 @@ public class 新Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
message = e.toString();
}
logger.info(message);
Assert.assertTrue(message.contains("\"desc\":\"未达到会员等级要求\""),"校验message失败");
Assert.assertTrue(message.contains("未达到会员等级要求"),"校验message失败");
logger.info("校验Q币会员等级兑换成功");
}
......@@ -265,8 +264,8 @@ public class 新Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
}
logger.info(message);
Assert.assertTrue(message.contains("\"success\":false"),"校验message失败");
Assert.assertTrue(message.contains("\"desc\":\"档位不存在\""),"校验message失败");
Assert.assertTrue(message.contains("false"),"校验message失败");
Assert.assertTrue(message.contains("档位不存在"),"校验message失败");
logger.info("校验Q币档位篡改无法兑换成功");
}
......@@ -316,8 +315,8 @@ public class 新Qb_兑换流程测试_ExchangeTest extends CheckTemplet {
}
logger.info(message);
Assert.assertTrue(message.contains("\"success\":false"),"校验message失败");
Assert.assertTrue(message.contains("\"desc\":\"兑吧加钱购商品不可以加入到开发者商品中\""),"校验message失败"); //这个提示很奇怪
Assert.assertTrue(message.contains("false"),"校验message失败");
Assert.assertTrue(message.contains("兑吧加钱购商品不可以加入到开发者商品中"),"校验message失败"); //这个提示很奇怪
logger.info("校验Q币用户id2篡改无法兑换成功");
......
......@@ -602,7 +602,7 @@ public class gawService {
logger.info("请求Qb兑换接口:"+ "/gaw/qbExchange/create");
Response response = given().contentType("application/json; charset=UTF-8").cookies(authorization.dafuwengLogin(uid)).body(jsonParam).post("http://"+goodsHost+"/gaw/qbExchange/create");
response.prettyPrint();
// response.prettyPrint();
try{
Assert.assertEquals(response.jsonPath().getString("success"),"true");
......
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