Commit 2895c2dc authored by 龚小红's avatar 龚小红

修改假用户

parent 6af9c7fe
...@@ -564,7 +564,7 @@ public class GreetingCrad implements Authorization{ ...@@ -564,7 +564,7 @@ public class GreetingCrad implements Authorization{
int redPacketState = response.jsonPath().getInt("data.redPacketState"); int redPacketState = response.jsonPath().getInt("data.redPacketState");
int receivedAmount = response.jsonPath().getInt("data.receivedAmount"); int receivedAmount = response.jsonPath().getInt("data.receivedAmount");
Assert.assertEquals(redPacketState,3,network.message(params,GREETING_openResult,"红包领取失败",response.body().asString())); Assert.assertEquals(redPacketState,2,network.message(params,GREETING_openResult,"红包领取失败",response.body().asString()));
Assert.assertEquals(receivedAmount,0,network.message(params,GREETING_openResult,"红包领取金额错误",response.body().asString())); Assert.assertEquals(receivedAmount,0,network.message(params,GREETING_openResult,"红包领取金额错误",response.body().asString()));
} }
......
...@@ -654,7 +654,7 @@ public class FlipCard implements Authorization { ...@@ -654,7 +654,7 @@ public class FlipCard implements Authorization {
Response response2 = network.getResponse(params, BasicConfig.MOBILE_redOpenState); Response response2 = network.getResponse(params, BasicConfig.MOBILE_redOpenState);
System.out.println(response2.body().asString()); System.out.println(response2.body().asString());
int redStatus2 =response2.jsonPath().getInt("data.redStatus"); int redStatus2 =response2.jsonPath().getInt("data.redStatus");
Assert.assertTrue(redStatus2==4, network.message(params, BasicConfig.MOBILE_redOpenState, "红包领取状态不对", response2.body().asString())); Assert.assertTrue(redStatus2==2, network.message(params, BasicConfig.MOBILE_redOpenState, "红包领取状态不对", response2.body().asString()));
int redAmount2 =response2.jsonPath().getInt("data.redAmount"); int redAmount2 =response2.jsonPath().getInt("data.redAmount");
System.out.println(redAmount2); System.out.println(redAmount2);
Assert.assertTrue(redAmount2==40, network.message(params, BasicConfig.MOBILE_redOpenState, "红包金额不对", response2.body().asString())); Assert.assertTrue(redAmount2==40, network.message(params, BasicConfig.MOBILE_redOpenState, "红包金额不对", response2.body().asString()));
......
...@@ -200,7 +200,7 @@ public class Share implements Authorization { ...@@ -200,7 +200,7 @@ public class Share implements Authorization {
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveOrUpdateMpShare); Response response = network.postResponse(Params, BasicConfig.MANAGER_saveOrUpdateMpShare);
boolean data =response.jsonPath().getBoolean("data"); boolean data =response.jsonPath().getBoolean("data");
System.out.println(data); System.out.println(data);
Assert.assertTrue(data,network.message(Params, BasicConfig.MOBILE_info, "答题闯关分享失败", response.body().asString())); Assert.assertTrue(data,network.message(Params, BasicConfig.MOBILE_info, "亲友券分享失败", response.body().asString()));
Params.clear(); Params.clear();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey())); Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
...@@ -208,7 +208,7 @@ public class Share implements Authorization { ...@@ -208,7 +208,7 @@ public class Share implements Authorization {
response=network.getResponse(Params, BasicConfig.MANAGER_mpShareList); response=network.getResponse(Params, BasicConfig.MANAGER_mpShareList);
System.out.println(response.body().asString()); System.out.println(response.body().asString());
String mpShareTitle=response.jsonPath().getString("data[1].mpShareTitle"); String mpShareTitle=response.jsonPath().getString("data[1].mpShareTitle");
Assert.assertEquals(mpShareTitle,"亲友抽奖券分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "答题闯关配置列表为null", response.body().asString())); Assert.assertEquals(mpShareTitle,"亲友抽奖券分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "亲友券配置列表为null", response.body().asString()));
} }
} }
...@@ -13,12 +13,13 @@ import com.kjj.utils.JsonUtil; ...@@ -13,12 +13,13 @@ import com.kjj.utils.JsonUtil;
import com.kjj.utils.ThreadSleepUtils; import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response; import io.restassured.response.Response;
import org.testng.Assert; import org.testng.Assert;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test; import org.testng.annotations.Test;
import java.util.*; import java.util.*;
import static com.kjj.utils.BaseUtils.connectSuccess; import static com.kjj.utils.BaseUtils.*;
import static com.kjj.utils.ThreadSleepUtils.sleep; import static com.kjj.utils.ThreadSleepUtils.sleep;
public class SecondKill implements Authorization { public class SecondKill implements Authorization {
...@@ -37,6 +38,7 @@ public class SecondKill implements Authorization { ...@@ -37,6 +38,7 @@ public class SecondKill implements Authorization {
//假用户到场 //假用户到场
visitorAuto1(); visitorAuto1();
connectSuccess(); connectSuccess();
deleteTestUser(5287);
} }
/** /**
...@@ -1153,6 +1155,11 @@ public class SecondKill implements Authorization { ...@@ -1153,6 +1155,11 @@ public class SecondKill implements Authorization {
} }
} }
@AfterTest
public void Tear(){
insertTestUser(5287);
}
} }
...@@ -87,7 +87,7 @@ public class BasicConfig { ...@@ -87,7 +87,7 @@ public class BasicConfig {
// 基础线代理人 TKU,sid:2991 // 基础线代理人 TKU,sid:2991
public static String AGENT_TKU = "T3gM31f18jCFEcfTyJdjfJAfSjDmKNMHfH7CvpLDC6UCLbai6Pc41VyJK3bXHe1wg7Hb5FGFZheeLvHjbE"; public static String AGENT_TKU = "T3gM31f18jCFEcfTyJdjfJAfSjDmKNMHfH7CvpLDC6UCLbai6Pc41VyJK3bXHe1wg7Hb5FGFZheeLvHjbE";
// 基础线访客 TKU---"请勿打扰" // 基础线访客 TKU---"请勿打扰"
public static String VISITOR_TKU = "T3gM31f18jCGvqvoyJRzyMTdpcPDJWUJJP4VQje7p9sfC4HKmj5NJfCUkxusAyFb5SpkWS31srDTYr6KtV"; public static String VISITOR_TKU = "T3gM31f18jCFYKzgBmWq2dVykia7XxAC7pfxunJPHQ6GF8C9jxgj97YaY5dvsAoBD4B2vrkezsvgm4xgpE";
// 基础线一级邀请访客(Ryan) sid:186 // 基础线一级邀请访客(Ryan) sid:186
public static String VISITOR1_TKU = "2LYYwKJ1AqodGS5GJhJ9UU2CvroNP4oXBdXzWMjCXMZrpHnZQ6GNsAVoiDvyJbaiSVgzJGtkad6EnP4i"; public static String VISITOR1_TKU = "2LYYwKJ1AqodGS5GJhJ9UU2CvroNP4oXBdXzWMjCXMZrpHnZQ6GNsAVoiDvyJbaiSVgzJGtkad6EnP4i";
// 基础线二级邀请访客(向日葵) sid:207 // 基础线二级邀请访客(向日葵) sid:207
......
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