Commit 6ac63db1 by yangfangfang

增加会员管理接口

parent c8290f14
...@@ -30,7 +30,7 @@ public class TestFindDetailById extends XMBaseTest { ...@@ -30,7 +30,7 @@ public class TestFindDetailById extends XMBaseTest {
//暂时还不能转会员,只能写死:memberId:1771002119284924417-自动化正式会员勿动 //暂时还不能转会员,只能写死:memberId:1771002119284924417-自动化正式会员勿动
JSONObject jsonObject=new JSONObject(); JSONObject jsonObject=new JSONObject();
jsonObject.put("memberId","1771002119284924417"); jsonObject.put("memberId","1771059838226341890");
xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers).assetsSuccess(true); xmAppApi.doRequest(RequestType.JSON,params,jsonObject.toJSONString(),headers).assetsSuccess(true);
JSONObject response=xmAppApi.getBodyInJSON(); JSONObject response=xmAppApi.getBodyInJSON();
......
package com.xiaomai.cases.polar.member;
import com.alibaba.fastjson.JSONObject;
import com.xiaomai.enums.ApiModule;
import com.xiaomai.enums.LoginAccount;
import com.xiaomai.enums.RequestType;
import com.xiaomai.enums.Terminal;
import com.xiaomai.utils.RandomStringUtil;
import com.xiaomai.utils.TimeUtils;
import com.xiaomai.utils.XMBaseTest;
import com.xiaomai.utils.XMJSONPath;
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
public class TestForceUpdate extends XMBaseTest {
@BeforeMethod
public void beforeTest(){
xmAppApi.setApiModule(ApiModule.Polar_Clue)
.setApiName("API_forceUpdate")
.setLoginUser(LoginAccount.YFF_DEV)
.setTerminal(Terminal.B);
dal.setCase_owner("yff")
.setCase_name(Thread.currentThread().getStackTrace()[1].getFileName().split("\\.")[0]);
super.beforeTest();
}
@Test(description = "编辑正式会员信息")
public void testForceUpdate() {
//暂时还不能转会员,只能写死:memberId:1771059838226341890-自动化正式会员勿动
JSONObject jsonObject = new JSONObject();
jsonObject.put("brandId", xmAppApi.getLoginInfo().getBrandId());
jsonObject.put("studioId", xmAppApi.getLoginInfo().getStudioId());
jsonObject.put("operatorId", xmAppApi.getLoginInfo().getAdminId());
jsonObject.put("status", "NORMAL");
jsonObject.put("name", "自动化正式会员" + RandomStringUtil.randomString(2));
jsonObject.put("phone", RandomStringUtil.randomMobile("22"));
jsonObject.put("gender", "WOMEN");
jsonObject.put("wechat", RandomStringUtil.randomMobile("66"));
jsonObject.put("birthday", TimeUtils.getBeforeDayDate(10));
jsonObject.put("idCardType", "IDENTITY");
jsonObject.put("idCardCode", "411421199808080225");
jsonObject.put("height", "186");
jsonObject.put("weight", "76");
jsonObject.put("trainTarget", "塑形"+RandomStringUtil.randomString(2));
jsonObject.put("profession", "金融"+RandomStringUtil.randomString(2));
jsonObject.put("incomeLevel", "亿万富翁"+RandomStringUtil.randomString(2));
jsonObject.put("address", "地址"+RandomStringUtil.randomString(6));
jsonObject.put("emergencyContactPerson", RandomStringUtil.randomString(3));
jsonObject.put("emergencyContactPhone", RandomStringUtil.randomMobile("66"));
jsonObject.put("resourceId", "1");
jsonObject.put("creatorId", xmAppApi.getLoginInfo().getAdminId());
jsonObject.put("remark", "备注"+RandomStringUtil.randomString(12));
jsonObject.put("memberId", "1771059838226341890");
xmAppApi.doRequest(RequestType.JSON, params, jsonObject.toJSONString(), headers).assetsSuccess(true);
Assert.assertEquals(XMJSONPath.readPath(xmAppApi.getBodyInJSON(),"$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