Commit 39248227 authored by 张艳玲's avatar 张艳玲

update

parent 19244246
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
\ No newline at end of file
# Default ignored files
/workspace.xml
\ No newline at end of file
kjj
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Gradle Imported" enabled="true">
<outputRelativeToContentRoot value="true" />
<processorPath useClasspath="false">
<entry name="$USER_HOME$/Applications/gradle-6.6.1/caches/modules-2/files-2.1/org.projectlombok/lombok/1.18.12/48e4e5d60309ebd833bc528dcf77668eab3cd72c/lombok-1.18.12.jar" />
</processorPath>
<module name="kjj.test" />
<module name="kjj.main" />
</profile>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="kjj" />
</profile>
</annotationProcessing>
<bytecodeTargetLevel target="1.8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="delegatedBuild" value="true" />
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="gradleJvm" value="1.8" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
</set>
</option>
</GradleProjectSettings>
</option>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="http://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="maven3" />
<option name="name" value="maven3" />
<option name="url" value="http://repo.spring.io/plugins-release" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenLocal" />
<option name="name" value="MavenLocal" />
<option name="url" value="file:$MAVEN_REPOSITORY$/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="http://nexus.dui88.com:8081/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven2" />
<option name="name" value="maven2" />
<option name="url" value="https://plugins.gradle.org/m2/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
...@@ -20,7 +20,7 @@ public class CloseLive implements AdminAuthorization{ ...@@ -20,7 +20,7 @@ public class CloseLive implements AdminAuthorization{
@Test(description = "结束直播", priority = 1) @Test(description = "结束直播", priority = 1)
public void closeLive() { public void 结束直播() {
Map<String, Object> closeParam = new HashMap<>(); Map<String, Object> closeParam = new HashMap<>();
closeParam.put("liveid", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey())); closeParam.put("liveid", LiveConstants.getValue(LiveConstants.StringKeyEnum.LIVE_ID.getKey()));
closeParam.put("cid", 101); closeParam.put("cid", 101);
......
...@@ -3,9 +3,7 @@ package com.kjj.cases.live; ...@@ -3,9 +3,7 @@ package com.kjj.cases.live;
import com.kjj.utils.NetworkUtils; import com.kjj.utils.NetworkUtils;
/** /**
* 管理员后台授权 * 管理员小程序授权
* @author zhanghuifeng
* date 2021/2/20-13:46
*/ */
public interface MngAuthorization { public interface MngAuthorization {
......
...@@ -126,7 +126,7 @@ public class SaveAndUpdate implements AdminAuthorization { ...@@ -126,7 +126,7 @@ public class SaveAndUpdate implements AdminAuthorization {
ids2.add(356L); ids2.add(356L);
ids2.add(357L); ids2.add(357L);
ids2.add(358L); ids2.add(358L);
//ids2.add(359L); ids2.add(359L);
saveOrUpdate3Param.put("ids", ids2); saveOrUpdate3Param.put("ids", ids2);
Response saveOrUpdate3Res = network.postResponse(saveOrUpdate3Param, BasicConfig.MANAGER_SAVEORUPDATE3); Response saveOrUpdate3Res = network.postResponse(saveOrUpdate3Param, BasicConfig.MANAGER_SAVEORUPDATE3);
boolean data4 = saveOrUpdate3Res.jsonPath().getBoolean("data"); boolean data4 = saveOrUpdate3Res.jsonPath().getBoolean("data");
......
package com.kjj.cases.live;
import com.kjj.config.BasicConfig;
import com.kjj.constants.LiveConstants;
import io.restassured.response.Response;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class User implements AdminAuthorization{
@BeforeClass
public void setUp() {
visitorAuth();
}
@Test(description = "预约直播间", priority = 1)
public void 预约直播间() {
Map<String, Object> sycParam = new HashMap<>();
sycParam.put("bizId", "Kj21MTg0NzE");
sycParam.put("bizType", 1);
List<Long> markIds1 = new ArrayList<>();
markIds1.add(142L);
markIds1.add(143L);
markIds1.add(140L);
sycParam.put("markIds", markIds1);
Response sycRes = network.postResponse(sycParam, BasicConfig.USER_SYCAPPOINTMENT);
Object data = sycRes.jsonPath().getJsonObject("data");
System.out.println(data);
Assert.assertNotNull(data, network.message(sycParam, BasicConfig.USER_SYCAPPOINTMENT, "预约失败", sycRes.body().asString()));
}
@Test(description = "关注直播间", priority = 2)
public void 关注直播间() {
Map<String, Object> subscribeParam = new HashMap<>();
subscribeParam.put("liveid", "Kj21MTg0NzE");
List<Long> markIds2 = new ArrayList<>();
markIds2.add(146L);
markIds2.add(144L);
subscribeParam.put("markIds", markIds2);
Response subscribeRes = network.postResponse(subscribeParam, BasicConfig.USER_SUBSCRIBE);
boolean data = subscribeRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(subscribeParam, BasicConfig.USER_SUBSCRIBE, "关注失败", subscribeRes.body().asString()));
}
@Test(description = "查询关注状态", priority = 3)
public void 查询关注状态() {
Map<String, Object> findParam = new HashMap<>();
findParam.put("liveid", "Kj21MTg0Nzk");
Response findRes = network.postResponse(findParam, BasicConfig.USER_FIND);
boolean data = findRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(findParam, BasicConfig.USER_FIND, "关注失败", findRes.body().asString()));
}
@Test(description = "保存海报获得抽奖码", priority = 4)
public void 保存海报获得抽奖码() {
Map<String, Object> saveposterParam = new HashMap<>();
saveposterParam.put("liveid","Kj21MTg0Nzk");
Response saveposterRes = network.postResponse(saveposterParam, BasicConfig.USER_SAVEPOSTER);
boolean data = saveposterRes.jsonPath().getBoolean("data");
System.out.println(data);
Assert.assertTrue(data, network.message(saveposterParam, BasicConfig.USER_SAVEPOSTER, "海报保存失败", saveposterRes.body().asString()));
}
}
...@@ -225,7 +225,7 @@ public class MysqlUtils { ...@@ -225,7 +225,7 @@ public class MysqlUtils {
MysqlUtils jdbcUtils = new MysqlUtils("tuia_adver"); MysqlUtils jdbcUtils = new MysqlUtils("tuia_adver");
jdbcUtils.getConnection(); jdbcUtils.getConnection();
Map<String, Object> map = jdbcUtils.findSimpleResult("select * from account where company_name=?","吧科技有限公司"); Map<String, Object> map = jdbcUtils.findSimpleResult("select * from account where company_name=?","吧科技有限公司");
jdbcUtils.releaseConn(); jdbcUtils.releaseConn();
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="直播" verbose="1" thread-count="3"> <suite name="直播" verbose="1" thread-count="3">
<test preserve-order="true" name="直播素材"> <!-- <test preserve-order="true" name="直播素材">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.LiveMaterial"/> <!-- <class name="com.kjj.cases.live.LiveMaterial"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="创建直播"> <test preserve-order="true" name="创建直播">
<classes> <classes>
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
</classes> </classes>
</test> </test>
<test preserve-order="true" name="代理人首页"> <!-- <test preserve-order="true" name="代理人首页">-->
<classes> <!-- <classes>-->
<class name="com.kjj.cases.live.Procurator"/> <!-- <class name="com.kjj.cases.live.Procurator"/>-->
</classes> <!-- </classes>-->
</test> <!-- </test>-->
<test preserve-order="true" name="助播-开启直播"> <test preserve-order="true" name="助播-开启直播">
<classes> <classes>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<suite-files> <suite-files>
<suite-file path="liveTestNG.xml"></suite-file> <suite-file path="liveTestNG.xml"></suite-file>
<suite-file path="wechatTestNG.xml"></suite-file> <!-- <suite-file path="wechatTestNG.xml"></suite-file>-->
</suite-files> </suite-files>
<!-- 监听器--> <!-- 监听器-->
......
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