Commit 3f84d6fd by donghu

移除加入公会相关用例

1 parent 6c7bc02f
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -22,7 +22,7 @@ public class BasicData {
public static int status = 200;
public final static String userMobile = "13823774138";
public final static String userMobile = "13823774134";
public final static String playMobile = "13823774131";
//派单厅
......
......@@ -57,5 +57,7 @@ public interface CosPlayPlayerService {
public JSONObject auditGuild(String mobile, String queryStr, String env);
public JSONObject roomList(String mobile, String env);
public JSONObject remove(String mobile, String env);
}
......@@ -740,5 +740,47 @@ public class CosPlyaPlayerServiceImpl implements CosPlayPlayerService {
}
/**
* 将成员从移除公会
* @param env
* @param mobile
* @return
*/
@Override
public JSONObject remove(String mobile,String env) {
String removeUrl = "https://"+env+"-guild-api.apeiwan.com/api/v2/guild-member/remove";
Map<String, Object> sendParams = new HashMap();
JSONObject userJsonObj = this.userList(mobile, env);
String userId = userJsonObj.getString("id");
sendParams.put("userId", userId);
String appToken = this.getAppToken("13823774131", env);
headers.put("token", appToken);
JSONObject jsonObj = HttpToolKit.invokePost(removeUrl, headers, sendParams).getJSONObject();
return jsonObj;
}
}
......@@ -144,14 +144,27 @@ public class CosPlayerTest extends AbstractTest {
* @param mobile
* @return
*/
@Test(enabled = true, alwaysRun = true, description = "申请加入公会及审核")
@Test(enabled = true, alwaysRun = true, dependsOnMethods="testRemove" ,description = "申请加入公会及审核")
public void testAuditGuild() {
CosPlayPlayerService cosPlyaPlayerServiceImpl = new CosPlyaPlayerServiceImpl();
//公会ID
JSONObject rsp = cosPlyaPlayerServiceImpl.auditGuild(BasicData.userMobile, BasicData.guildCode, env);
Assert.assertEquals(rsp.getIntValue("status"), BasicData.status);
}
/**
* 将成员从公会移除
* @param env
* @param mobile
* @return
*/
@Test(enabled = true, alwaysRun = true, description = "将成员从公会移除")
public void testRemove() {
CosPlayPlayerService cosPlyaPlayerServiceImpl = new CosPlyaPlayerServiceImpl();
JSONObject rsp = cosPlyaPlayerServiceImpl.remove(BasicData.userMobile, env);
Assert.assertEquals(rsp.getIntValue("status"), BasicData.status);
}
@AfterClass(alwaysRun = true)
public void afterClassTest() {
......
{"environment":"pre-test","failed":0,"passed":7,"skipped":0,"suiteDuration":"12秒672毫秒","suiteEnds":"2021-07-07 13:53:53","suiteStarts":"2021-07-07 13:53:40","total":7}
\ No newline at end of file
{"environment":"pre-test","failed":0,"passed":9,"skipped":0,"suiteDuration":"17秒279毫秒","suiteEnds":"2021-07-08 11:14:32","suiteStarts":"2021-07-08 11:14:14","total":9}
\ No newline at end of file
This diff could not be displayed because it is too large.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitXMLReporter -->
<testsuite hostname="DESKTOP-U3UHQH3" ignored="0" name="Default test" tests="7" failures="0" timestamp="07 七月 2021 05:53:53 GMT" time="12.66" errors="0">
<testcase name="testActivityList" time="1.779" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testGiftList" time="0.488" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testLotteryActivity" time="1.921" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testMoneyDetailsSave" time="0.475" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testRoomList" time="0.614" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testSend" time="0.994" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testVirtualMoneyModify" time="0.718" classname="com.pipi.invoker.CosPlayerTest"/>
<testsuite hostname="DESKTOP-U3UHQH3" ignored="0" name="Default test" tests="9" failures="0" timestamp="08 七月 2021 03:14:32 GMT" time="17.265" errors="0">
<testcase name="testRemove" time="1.833" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testSend" time="1.508" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testVirtualMoneyModify" time="0.489" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testActivityList" time="0.439" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testGiftList" time="0.502" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testLotteryActivity" time="0.763" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testMoneyDetailsSave" time="0.492" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testRoomList" time="0.647" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testAuditGuild" time="2.346" classname="com.pipi.invoker.CosPlayerTest"/>
</testsuite> <!-- Default test -->
......@@ -9,12 +9,12 @@
<include name="afterClass"/>
<include name="BeforeClassTest"/>
<include name="afterClassTest"/>
<include name="testRemove"/>
<include name="springTestContextPrepareTestInstance"/>
<include name="springTestContextAfterTestClass"/>
<include name="beforeClass"/>
<include name="beforeClassTest"/>
<include name="springTestContextBeforeTestMethod"/>
<include name="testMoneyDetailsSave"/>
<include name="springTestContextAfterTestMethod"/>
</methods>
</class> <!-- com.pipi.invoker.CosPlayerTest -->
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitReportReporter -->
<testsuite name="com.pipi.invoker.CosPlayerTest" tests="7" time="6.993" ignored="0" failures="0" timestamp="07 七月 2021 05:53:53 GMT" skipped="0" hostname="DESKTOP-U3UHQH3" errors="0">
<testcase name="testMoneyDetailsSave" time="0.475" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testSend" time="0.994" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testGiftList" time="0.488" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testRoomList" time="0.616" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testVirtualMoneyModify" time="0.719" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testActivityList" time="1.780" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testLotteryActivity" time="1.921" classname="com.pipi.invoker.CosPlayerTest"/>
<testsuite name="com.pipi.invoker.CosPlayerTest" tests="9" time="9.023" ignored="0" failures="0" timestamp="08 七月 2021 03:14:33 GMT" skipped="0" hostname="DESKTOP-U3UHQH3" errors="0">
<testcase name="testActivityList" time="0.440" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testRemove" time="1.834" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testSend" time="1.509" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testLotteryActivity" time="0.764" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testRoomList" time="0.647" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testAuditGuild" time="2.346" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testGiftList" time="0.502" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testMoneyDetailsSave" time="0.492" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testVirtualMoneyModify" time="0.489" classname="com.pipi.invoker.CosPlayerTest"/>
</testsuite> <!-- com.pipi.invoker.CosPlayerTest -->
......@@ -26,6 +26,11 @@
</tr>
<tr>
<td>&nbsp;</td>
<td>testRemove</td>
<td>t8t-ps-scg </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>testMoneyDetailsSave</td>
<td>t8t-ps-scg </td>
</tr>
......@@ -36,6 +41,11 @@
</tr>
<tr>
<td>&nbsp;</td>
<td>testAuditGuild</td>
<td>t8t-ps-scg </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>testSend</td>
<td>t8t-ps-scg </td>
</tr>
......
<h2>Groups used for this test run</h2><table border="1">
<tr> <td align="center"><b>Group name</b></td><td align="center"><b>Methods</b></td></tr><tr><td>t8t-ps-scg</td><td>CosPlayerTest.testRoomList()[pri:0, instance:com.pipi.invoker.CosPlayerTest@1623b78d]<br/>CosPlayerTest.testLotteryActivity()[pri:0, instance:com.pipi.invoker.CosPlayerTest@1623b78d]<br/>CosPlayerTest.testActivityList()[pri:0, instance:com.pipi.invoker.CosPlayerTest@1623b78d]<br/>CosPlayerTest.testMoneyDetailsSave()[pri:0, instance:com.pipi.invoker.CosPlayerTest@1623b78d]<br/>CosPlayerTest.testVirtualMoneyModify()[pri:0, instance:com.pipi.invoker.CosPlayerTest@1623b78d]<br/>CosPlayerTest.testGiftList()[pri:0, instance:com.pipi.invoker.CosPlayerTest@1623b78d]<br/>CosPlayerTest.testSend()[pri:0, instance:com.pipi.invoker.CosPlayerTest@1623b78d]<br/></td></tr>
<tr> <td align="center"><b>Group name</b></td><td align="center"><b>Methods</b></td></tr><tr><td>t8t-ps-scg</td><td>CosPlayerTest.testRoomList()[pri:0, instance:com.pipi.invoker.CosPlayerTest@c8c12ac]<br/>CosPlayerTest.testLotteryActivity()[pri:0, instance:com.pipi.invoker.CosPlayerTest@c8c12ac]<br/>CosPlayerTest.testRemove()[pri:0, instance:com.pipi.invoker.CosPlayerTest@c8c12ac]<br/>CosPlayerTest.testAuditGuild()[pri:0, instance:com.pipi.invoker.CosPlayerTest@c8c12ac]<br/>CosPlayerTest.testActivityList()[pri:0, instance:com.pipi.invoker.CosPlayerTest@c8c12ac]<br/>CosPlayerTest.testMoneyDetailsSave()[pri:0, instance:com.pipi.invoker.CosPlayerTest@c8c12ac]<br/>CosPlayerTest.testVirtualMoneyModify()[pri:0, instance:com.pipi.invoker.CosPlayerTest@c8c12ac]<br/>CosPlayerTest.testGiftList()[pri:0, instance:com.pipi.invoker.CosPlayerTest@c8c12ac]<br/>CosPlayerTest.testSend()[pri:0, instance:com.pipi.invoker.CosPlayerTest@c8c12ac]<br/></td></tr>
</table>
This diff could not be displayed because it is too large.
......@@ -10,7 +10,7 @@
<tr valign='top'>
<td>1 test</td>
<td><a target='mainFrame' href='classes.html'>1 class</a></td>
<td>7 methods:<br/>
<td>9 methods:<br/>
&nbsp;&nbsp;<a target='mainFrame' href='methods.html'>chronological</a><br/>
&nbsp;&nbsp;<a target='mainFrame' href='methods-alphabetical.html'>alphabetical</a><br/>
&nbsp;&nbsp;<a target='mainFrame' href='methods-not-run.html'>not run (0)</a></td>
......@@ -22,7 +22,7 @@
</tr></table>
<table width='100%' class='test-passed'>
<tr><td>
<table style='width: 100%'><tr><td valign='top'>Default test (7/0/0)</td><td valign='top' align='right'>
<table style='width: 100%'><tr><td valign='top'>Default test (9/0/0)</td><td valign='top' align='right'>
<a href='Default test.html' target='mainFrame'>Results</a>
</td></tr></table>
</td></tr><p/>
......
......@@ -4,6 +4,6 @@
</head><body>
<h2><p align='center'>Test results</p></h2>
<table border='1' width='100%' class='main-page'><tr><th>Suite</th><th>Passed</th><th>Failed</th><th>Skipped</th><th>testng.xml</th></tr>
<tr align='center' class='invocation-passed'><td><em>Total</em></td><td><em>7</em></td><td><em>0</em></td><td><em>0</em></td><td>&nbsp;</td></tr>
<tr align='center' class='invocation-passed'><td><em>Total</em></td><td><em>9</em></td><td><em>0</em></td><td><em>0</em></td><td>&nbsp;</td></tr>
<tr align='center' class='invocation-passed'><td><a href='Default suite/index.html'>Default suite</a></td>
<td>7</td><td>0</td><td>0</td><td><a href='Default suite/testng.xml.html'>Link</a></td></tr></table></body></html>
<td>9</td><td>0</td><td>0</td><td><a href='Default suite/testng.xml.html'>Link</a></td></tr></table></body></html>
......@@ -9,12 +9,12 @@
<include name="afterClass"/>
<include name="BeforeClassTest"/>
<include name="afterClassTest"/>
<include name="testRemove"/>
<include name="springTestContextPrepareTestInstance"/>
<include name="springTestContextAfterTestClass"/>
<include name="beforeClass"/>
<include name="beforeClassTest"/>
<include name="springTestContextBeforeTestMethod"/>
<include name="testMoneyDetailsSave"/>
<include name="springTestContextAfterTestMethod"/>
</methods>
</class> <!-- com.pipi.invoker.CosPlayerTest -->
......
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!