Commit bd342f46 authored by 龚小红's avatar 龚小红

Merge branch '2021082502_gxh' into 'master'

2021082502 gxh

See merge request test-group/kejiji!107
parents e4f9ceae 403267d1
package com.kjj.bean.issue;
import lombok.Data;
import java.util.ArrayList;
@Data
public class Dialogue {
private ArrayList<String> quesList;
private String agentConclusion;
private String agentGreet;
private String promiseTitle;
private String promiseDesc;
private String promiseButton;
private String customerActionPromise;
private int inviteType;
public Dialogue(ArrayList<String> quesList, String agentConclusion, String agentGreet, String promiseTitle, String promiseDesc, String promiseButton, String customerActionPromise, int inviteType) {
this.quesList = quesList;
this.agentConclusion = agentConclusion;
this.agentGreet = agentGreet;
this.promiseTitle = promiseTitle;
this.promiseDesc = promiseDesc;
this.promiseButton = promiseButton;
this.customerActionPromise = customerActionPromise;
this.inviteType = inviteType;
}
}
......@@ -229,7 +229,16 @@ public interface Authorization {
network.agentCookies.put("authKey", visitorAuth25);
System.out.println("用户AUTH_KEY:" + visitorAuth25);
}
//访客X(Xmz)ID:96 实名
default void visitorAuth26() {
network.agentCookies.put("authKey", visitorAuth26);
System.out.println("用户AUTH_KEY:" + visitorAuth26);
}
//访客X(Db)ID:96 实名
default void visitorAuth27() {
network.agentCookies.put("authKey", visitorAuth27);
System.out.println("用户AUTH_KEY:" + visitorAuth27);
}
}
......@@ -254,8 +254,7 @@ public class Customer implements Authorization {
int chanceType=response.jsonPath().getInt("data.chanceType");
Assert.assertTrue(chanceType==1, network.message(BasicConfig.MOBILE_followChanceDetail, "跟进类型非咨询", response.body().asString()));
String question=response.jsonPath().getString("data.question");
Assert.assertEquals(question,"咨询问题一",network.message(BasicConfig.MOBILE_followChanceDetail, "咨询问题为null", response.body().asString()));
Assert.assertTrue(question.equals("一度问题1")||question.equals("一度问题2")||question.equals("一度问题3"),network.message(BasicConfig.MOBILE_followChanceDetail, "咨询问题为null", response.body().asString()));
}
......
......@@ -5,6 +5,7 @@ import com.kjj.bean.agent.LiveUserList;
import com.kjj.cases.admin.Authorization;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import com.kjj.utils.IdMakeUtil;
import com.kjj.utils.JsonUtil;
import com.kjj.utils.ThreadSleepUtils;
import io.restassured.response.Response;
......@@ -20,6 +21,7 @@ public class LiveLater implements Authorization {
public String pageSize;
public List<LiveUserList> liveUserId;
@BeforeClass
public void setUp() { agentAuth(); }
......@@ -351,4 +353,14 @@ public class LiveLater implements Authorization {
e.printStackTrace();
}
}
@Test(description = "直播后准客户数量统计",priority = 20)
public void 直播后准客户数量统计(){
Map<String,Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(params,BasicConfig.MOBILE_potentialNum);
System.out.println(response.body().asString());
int potentialNum = response.jsonPath().getInt("data.potentialNum");
Assert.assertTrue(potentialNum > 0,network.message(params,BasicConfig.MOBILE_potentialNum,"准客户数量错误",response.body().asString()));
}
}
......@@ -28,14 +28,16 @@ public class Potential implements Authorization {
}
@Test(description = "获取推送问题咨询", priority =2)
public void 获取推送问题() {
@Test(description = "一度用户获取话术模板", priority =2)
public void 一度用户获取话术模板() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.ANCHOR_questions);
Response response = network.getResponse(Params, BasicConfig.MOBILE_dialogue);
System.out.println(response.body().asString());
bizConfId=response.jsonPath().getString("data[0].id");
Assert.assertNotNull(bizConfId, network.message(Params, BasicConfig.ANCHOR_questions, "为获取到问题ID", response.body().asString()));
String promiseTitle = response.jsonPath().getString("data.promiseTitle");
Assert.assertEquals(promiseTitle,"一度承诺标题", network.message(Params, BasicConfig.MOBILE_dialogue, "一度用户标题", response.body().asString()));
bizConfId=response.jsonPath().getString("data.quesList[0].id");
Assert.assertNotNull(bizConfId, network.message(Params, BasicConfig.MOBILE_dialogue, "未获取到问题ID", response.body().asString()));
}
......@@ -104,7 +106,15 @@ public class Potential implements Authorization {
}
@Test(description = "二度用户获取话术模板", priority =8)
public void 二度用户获取话术模板() {
visitorAuth5();
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Response response = network.getResponse(Params, BasicConfig.MOBILE_dialogue);
System.out.println(response.body().asString());
String promiseTitle = response.jsonPath().getString("data.promiseTitle");
Assert.assertEquals(promiseTitle,"二度承诺标题", network.message(Params, BasicConfig.MOBILE_dialogue, "二度用户获取话术模板错误", response.body().asString()));
}
}
......@@ -659,9 +659,6 @@ public class passQues implements Authorization {
int amount1 =resultRes.jsonPath().getInt("data.amount");
System.out.println(amount1);
Assert.assertTrue(amount1==30, network.message(redResultParam, BasicConfig.ANCHOR_redResult, "红包领取金额为空", resultRes.body().asString()));
}
}
......@@ -61,6 +61,7 @@ public class FlipCard implements Authorization {
Map<String, Object> params = new HashMap<>();
params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
params.put("shareType",6);
params.put("userType","A");
Response response = network.getResponse(params, BasicConfig.MOBILE_helpInfo);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
......@@ -481,8 +482,4 @@ public class FlipCard implements Authorization {
}
}
......@@ -38,9 +38,6 @@ public class Share implements Authorization {
System.out.println(response.body().asString());
String mpShareTitle=response.jsonPath().getString("data[0].mpShareTitle");
Assert.assertEquals(mpShareTitle,"直播前常规分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "直播前_常规分享配置列表为null", response.body().asString()));
}
@Test(description = "直播中_常规分享", priority = 2)
......@@ -62,8 +59,6 @@ public class Share implements Authorization {
System.out.println(response.body().asString());
String mpShareTitle=response.jsonPath().getString("data[0].mpShareTitle");
Assert.assertEquals(mpShareTitle,"直播中常规分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "直播中常规分享配置列表为null", response.body().asString()));
}
@Test(description = "红包分享", priority = 3)
......@@ -85,8 +80,6 @@ public class Share implements Authorization {
System.out.println(response.body().asString());
String mpShareTitle=response.jsonPath().getString("data[0].mpShareTitle");
Assert.assertEquals(mpShareTitle,"红包分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "红包分享配置列表为null", response.body().asString()));
}
......@@ -109,8 +102,6 @@ public class Share implements Authorization {
System.out.println(response.body().asString());
String mpShareTitle=response.jsonPath().getString("data[0].mpShareTitle");
Assert.assertEquals(mpShareTitle,"宝箱裂变分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "宝箱裂变分享配置列表为null", response.body().asString()));
}
@Test(description = "猜数红包分享", priority = 5)
......@@ -132,8 +123,6 @@ public class Share implements Authorization {
System.out.println(response.body().asString());
String mpShareTitle=response.jsonPath().getString("data[0].mpShareTitle");
Assert.assertEquals(mpShareTitle,"猜数字红包分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "猜数字红包配置列表为null", response.body().asString()));
}
@Test(description = "翻牌分享", priority = 6)
......@@ -155,8 +144,6 @@ public class Share implements Authorization {
System.out.println(response.body().asString());
String mpShareTitle=response.jsonPath().getString("data[0].mpShareTitle");
Assert.assertEquals(mpShareTitle,"翻牌红包分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "翻牌红包配置列表为null", response.body().asString()));
}
@Test(description = "好运红包分享", priority = 7)
......@@ -178,9 +165,6 @@ public class Share implements Authorization {
System.out.println(response.body().asString());
String mpShareTitle=response.jsonPath().getString("data[0].mpShareTitle");
Assert.assertEquals(mpShareTitle,"好运红包分享",network.message(Params, BasicConfig.MANAGER_mpShareList, "好运红包配置列表为null", response.body().asString()));
}
@Test(description = "答题闯关分享", priority = 8)
......@@ -202,12 +186,27 @@ public class Share implements Authorization {
System.out.println(response.body().asString());
String mpShareTitle=response.jsonPath().getString("data[0].mpShareTitle");
Assert.assertEquals(mpShareTitle,"答题闯关分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "答题闯关配置列表为null", response.body().asString()));
}
@Test(description = "亲友抽奖券分享", priority = 9)
public void 亲友抽奖券分享() {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("mpShareUrl", "//yun.dui88.com/kjy/image/20210526/1622022856685.jpeg");
Params.put("mpShareTitle", "亲友抽奖券分享文案");
Params.put("shareType",10);
Response response = network.postResponse(Params, BasicConfig.MANAGER_saveOrUpdateMpShare);
boolean data =response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data,network.message(Params, BasicConfig.MOBILE_info, "答题闯关分享失败", response.body().asString()));
Params.clear();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
Params.put("shareType",10);
response=network.getResponse(Params, BasicConfig.MANAGER_mpShareList);
System.out.println(response.body().asString());
String mpShareTitle=response.jsonPath().getString("data[0].mpShareTitle");
Assert.assertEquals(mpShareTitle,"亲友抽奖券分享文案",network.message(Params, BasicConfig.MANAGER_mpShareList, "答题闯关配置列表为null", response.body().asString()));
}
}
......@@ -373,6 +373,7 @@ public class Lottery implements Authorization {
Map<String, Object> Params = new HashMap<>();
Params.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
Params.put("shareType",11);
Params.put("userType","A");
Response response = network.getResponse(Params, BasicConfig.MOBILE_helpInfo);
System.out.println( response.body().asString());
boolean success = response.jsonPath().getBoolean("success");
......@@ -593,7 +594,6 @@ public class Lottery implements Authorization {
long data = myCountRes.jsonPath().getLong("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(myCountParam, BasicConfig.USER_myCount, "获取抽奖码数量失败", myCountRes.body().asString()));
}
@Test(description = "幸运任务邀请E关系绑定", priority = 42)
......
This diff is collapsed.
......@@ -389,10 +389,10 @@ public class LiveVistorRed implements Authorization {
}
@Test(description = "访客H查询被助力者访客I的信息", priority = 23)
public void 访客H查询被助力者访客I的信息()
@Test(description = "访客C查询被助力者访客I的信息", priority = 23)
public void 访客C查询被助力者访客I的信息()
{
visitorAuth9();
visitorAuth3();
Map<String, Object> params = new HashMap<>();
params.put("confId", confId_Red);
params.put("shareSign", red_sharesign);
......@@ -402,9 +402,9 @@ public class LiveVistorRed implements Authorization {
Assert.assertNotNull(data, network.message(params, BasicConfig.MOBILE_RedHelpQuery, "帮好友助力失败", response.body().asString()));
}
/*访客端-访客A帮访客B助力*/
@Test(description = "访客H帮访客I助力", priority = 24)
public void 访客H帮访客I助力()
/*访客端-访客C帮访客I助力*/
@Test(description = "访客C帮访客I助力", priority = 24)
public void 访客C帮访客I助力()
{
visitorAuth3();
ThreadSleepUtils.sleep(2000);
......
......@@ -521,7 +521,7 @@ public class TimeRed implements Authorization {
System.out.println(data);
Integer state = response.jsonPath().getInt("data.state");
System.out.println(state);
Assert.assertTrue(state==2, network.message(Params, BasicConfig.ANCHOR_openState, "访客H未领取第4轮红包", response.body().asString()));
Assert.assertTrue(state==2, network.message(Params, BasicConfig.ANCHOR_openState, "访客H未领取第5轮红包", response.body().asString()));
visitorAuth8();
ThreadSleepUtils.sleep(3000);
......@@ -530,7 +530,7 @@ public class TimeRed implements Authorization {
System.out.println(data1);
Integer state1 = stateRes.jsonPath().getInt("data.state");
System.out.println(state1);
Assert.assertTrue(state1==2, network.message(Params, BasicConfig.ANCHOR_openState, "访客I未领取第4轮红包", stateRes.body().asString()));
Assert.assertTrue(state1==2, network.message(Params, BasicConfig.ANCHOR_openState, "访客I未领取第5轮红包", stateRes.body().asString()));
}
@Test(description = "下架第6轮红包任务对应的权益", priority = 23)
......@@ -561,14 +561,14 @@ public class TimeRed implements Authorization {
Response response = network.getResponse(Params, BasicConfig.ANCHOR_tasks);
Object data =response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(Params, BasicConfig.ANCHOR_tasks, "访客H未完成表单任务",response.body().asString()));
Assert.assertNotNull(data, network.message(Params, BasicConfig.ANCHOR_tasks, "访客H未完成任务",response.body().asString()));
visitorAuth8();
ThreadSleepUtils.sleep(1000);
response = network.getResponse(Params, BasicConfig.ANCHOR_tasks);
data =response.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(Params, BasicConfig.ANCHOR_tasks, "访客H未完成表单任务",response.body().asString()));
Assert.assertNotNull(data, network.message(Params, BasicConfig.ANCHOR_tasks, "访客I未完成任务",response.body().asString()));
}
@Test(description = "开启第6轮红包", priority = 25)
......@@ -581,14 +581,14 @@ public class TimeRed implements Authorization {
Response response = network.postResponse(Params, BasicConfig.ANCHOR_redOpen);
boolean data = response.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(Params, BasicConfig.ANCHOR_redOpen, "访客H开启第4轮红包失败", response.body().asString()));
Assert.assertTrue(data, network.message(Params, BasicConfig.ANCHOR_redOpen, "访客H开启第6轮红包失败", response.body().asString()));
visitorAuth8();
ThreadSleepUtils.sleep(3000);
Response redRes = network.postResponse(Params, BasicConfig.ANCHOR_redOpen);
boolean data1 = redRes.jsonPath().getBoolean("data");
System.out.println(data1);
Assert.assertTrue(data1, network.message(Params, BasicConfig.ANCHOR_redOpen, "访客I开启第4轮红包失败", redRes.body().asString()));
Assert.assertTrue(data1, network.message(Params, BasicConfig.ANCHOR_redOpen, "访客I开启第6轮红包失败", redRes.body().asString()));
}
@Test(description = "查询开启第6轮红包结果", priority = 26)
......@@ -604,7 +604,7 @@ public class TimeRed implements Authorization {
System.out.println(data);
Integer state = response.jsonPath().getInt("data.state");
System.out.println(response.body().asString());
Assert.assertTrue(state==2, network.message(Params, BasicConfig.ANCHOR_openState, "访客H未领取第4轮红包", response.body().asString()));
Assert.assertTrue(state==2, network.message(Params, BasicConfig.ANCHOR_openState, "访客H未领取第6轮红包", response.body().asString()));
visitorAuth8();
ThreadSleepUtils.sleep(3000);
......@@ -613,7 +613,7 @@ public class TimeRed implements Authorization {
System.out.println(data1);
Integer state1 = stateRes.jsonPath().getInt("data.state");
System.out.println(state1);
Assert.assertTrue(state1==2, network.message(Params, BasicConfig.ANCHOR_openState, "访客I未领取第4轮红包", stateRes.body().asString()));
Assert.assertTrue(state1==2, network.message(Params, BasicConfig.ANCHOR_openState, "访客I未领取第6f d s s d f轮红包", stateRes.body().asString()));
}
//提现
......
......@@ -99,6 +99,7 @@ public class Treasure implements Authorization {
Map<String, Object> infoParam = new HashMap<>();
infoParam.put("liveId", LiveConstants.getValue(LiveConstants.StringKeyEnum.ENCODE_LIVE_ID.getKey()));
infoParam.put("shareType",7);
infoParam.put("userType","A");
Response response = network.getResponse(infoParam, BasicConfig.MOBILE_helpInfo);
Object data = response.jsonPath().getJsonObject("data");
System.out.println(data);
......
......@@ -64,6 +64,10 @@ public class BasicConfig {
public static String visitorAuth24 ="2Tsc8MwHZmXJKPfze38rXm37UEX1EtfvfjxjLr1GZDVAdRXD3hSK2j6WjZQgFaqHHJcT5yk3tB64Ebu38fmuJymWQtPcAdr";
//直播访客 (亦心)ID:96 实名用户
public static String visitorAuth25 ="5MgSyboxqzAQZZJEsTf43nVX38cJBxsCHATPDDoWL7qHS5PaPehMLbSmTNWgySTMFYevyw9tSxYKVU2VfhR9fW1FrWTk";
//直播访客 (小米粥)ID:749
public static String visitorAuth26 ="LEH7epeHVDJWzhZ6DiexTHnfbvr9gocGu9FvH3CVz6g4Cez7hNpJpzWTAnDH2FiQ3oj3dDx5W6NQYDzd3ToQiPbQpbtag";
//直播访客 (兑吧集团)ID:947
public static String visitorAuth27 ="LEH7epeHVDJWzhZ6DiexTHnfbvr9gocGu9ExJDb9xHoegrcNGiGyvUPrCXu5VECCsW6HDaVZMFu1Rph5WvdbB3jbkGcM9";
/**
* 集客助手授权key
......@@ -100,7 +104,6 @@ public class BasicConfig {
// *************** 准客户 ***************
public static final String ANCHOR_card = MOBILE_HOST + "/clue/agent/card";
public static final String ANCHOR_questions = MOBILE_HOST + "/kjy/live/agent/potential/questions";
public static final String ANCHOR_submit = MOBILE_HOST + "/kjy/live/agent/potential/submit";
public static final String ANCHOR_agree = MOBILE_HOST + "/kjy/live/agent/potential/agree";
public static final String ANCHOR_questionSubmitted = MOBILE_HOST + "/kjy/live/agent/potential/questionSubmitted";
......@@ -137,6 +140,12 @@ public class BasicConfig {
public static final String MANAGER_secondKillDel = MANAGER_HOST + "/kjy/manager/live/second/kill/goods/delete";
public static final String MANAGER_secondKillUpdate = MANAGER_HOST + "/kjy/manager/live/second/kill/goods/update";
//客户承诺话术配置
public static final String MANAGER_saveDialogue = MANAGER_HOST + "/kjy/manager/live/potential/saveDialogue";
public static final String MANAGER_findDialogue = MANAGER_HOST + "/kjy/manager/live/potential/findDialogue";
public static final String MOBILE_dialogue= MOBILE_HOST + "/kjy/live/agent/potential/dialogue";
public static final String MOBILE_potentialNum= MOBILE_HOST + "/kjy/live/agent/clue/potentialNum";
// *************** 闯关答题 ***************
public static final String MANAGER_addOrUpdateQues = MANAGER_HOST + "/kjy/manager/pass/ques/addOrUpdateQues";
public static final String MANAGER_deleteQues = MANAGER_HOST + "/kjy/manager/pass/ques/deleteQues";
......@@ -281,11 +290,21 @@ public class BasicConfig {
public static final String MOBILE_sign = MOBILE_HOST + "/kjy/live/share/help/sign";
public static final String MOBILE_simple = MOBILE_HOST + "/kjy/live/help/simple";
public static final String MOBILE_info = MOBILE_HOST + "/kjy/live/help/info";
public static final String MOBILE_helpInfo = MOBILE_HOST + "/kjy/live/share/help/info";
public static final String MOBILE_helpInfo = MOBILE_HOST + "/kjy/live/share/help/shareInfo";
public static final String MOBILE_assist = MOBILE_HOST + "/kjy/live/help/assist";
public static final String MOBILE_popupDetail = MOBILE_HOST + "/kjy/live/auth/popup/detail";
// *************** 亲友抽奖券 ***************
public static final String MANAGER_relativeLottery = MANAGER_HOST + "/kjy/manager/fission/lottery/saveOrUpdate";
public static final String MANAGER_detailLottery = MANAGER_HOST + "/kjy/manager/fission/lottery/detail";
public static final String MANAGER_switchStatusLottery = MANAGER_HOST + "/kjy/manager/fission/lottery/switchStatus";
public static final String MOBILE_allLottery = MOBILE_HOST + "/kjy/live/info/pre/data";
public static final String MOBILE_confLottery = MOBILE_HOST +"/kjy/live/fission/lottery/conf/all";
public static final String MOBILE_codeLottery = MOBILE_HOST +"/kjy/live/fission/lottery/user/code";
public static final String MOBILE_drawCode = MOBILE_HOST +"/kjy/live/fission/lottery/user/drawCode";
public static final String MOBILE_codeDetailLottery = MOBILE_HOST +"/kjy/live/fission/lottery/user/code/detail";
public static final String MOBILE_drawDetailLottery = MOBILE_HOST +"/kjy/live/fission/lottery/user/drawCode/detail";
public static final String MOBILE_acceptLottery = MOBILE_HOST +"/kjy/live/fission/lottery/user/accept";
// *************** 时长宝箱 ***************
public static final String MANAGER_list1 = MANAGER_HOST + "/kjy/manager/treasure/time/conf/list";
......@@ -402,11 +421,6 @@ public class BasicConfig {
public static final String MANAGER_popupDetail = MANAGER_HOST + "/kjy/manager/live/auth/popup/detail";
public static final String MANAGER_popupUpdate = MANAGER_HOST + "/kjy/manager/live/auth/popup/update";
//准客户
public static final String MANAGER_potentialSaveQues = MANAGER_HOST + "/kjy/manager/live/potential/saveQues";
public static final String MANAGER_potentialQuesList = MANAGER_HOST + "/kjy/manager/live/potential/quesList";
//客户管理
public static final String MOBILE_potentialCount = MOBILE_HOST + "/kjy/live/agent/customer/potentialCount";
public static final String MOBILE_customerList = MOBILE_HOST + "/kjy/live/agent/customer/list";
......
......@@ -24,7 +24,7 @@ public class DingTalkUtils {
context = "【接口自动化测试结果反馈】\n"
+ context
+ "报告地址: http://10.172.58.199/view/kkk/job/kejiji_interface/HTML_20Report\n"
+ "@张艳玲";
+ "@龚小红";
System.out.println(context);
Map<String, Object> contentParams = new HashMap<String, Object>();
......
......@@ -80,6 +80,11 @@
</classes>
</test>
<test preserve-order="true" name="亲友券">
<classes>
<class name="com.kjj.cases.live.lottery.RelativeLottery"/>
</classes>
</test>
<test preserve-order="true" name="直播前-我的客户页">
<classes>
......
This diff is collapsed.
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