Commit 6c7bc02f by donghu

增加送礼物与加入公会相关用例

1 parent e63b06bf
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.
......@@ -25,4 +25,10 @@ public class BasicData {
public final static String userMobile = "13823774138";
public final static String playMobile = "13823774131";
//派单厅
public final static String roomNo = "TEST833760";
public final static String guildCode = "18306720";
}
......@@ -735,7 +735,8 @@ public class CosPlyaPlayerServiceImpl implements CosPlayPlayerService {
//cosPlyaPlayerServiceImpl.applyList(mobile, env);
//cosPlyaPlayerServiceImpl.handleApply(mobile,applyId,env);
//cosPlyaPlayerServiceImpl.auditGuild("13823774135", queryStr, env);
cosPlyaPlayerServiceImpl.roomList(mobile, env);
//cosPlyaPlayerServiceImpl.roomList(mobile, env);
cosPlyaPlayerServiceImpl.userList(mobile, env);
}
......
......@@ -72,7 +72,7 @@ public class CosPlayerTest extends AbstractTest {
public void testVirtualMoneyModify() {
CosPlayPlayerService cosPlyaPlayerServiceImpl = new CosPlyaPlayerServiceImpl();
//充钻石
JSONObject rsp = cosPlyaPlayerServiceImpl.virtualMoneyModify(BasicData.userMobile, 1, env);
JSONObject rsp = cosPlyaPlayerServiceImpl.virtualMoneyModify(BasicData.userMobile, 1000, env);
Assert.assertEquals(rsp.getIntValue("status"), BasicData.status);
}
......@@ -104,7 +104,54 @@ public class CosPlayerTest extends AbstractTest {
Assert.assertEquals(rsp.getIntValue("status"), BasicData.status);
}
/**
* 送礼物
* @param env
* @param mobile
* @return
*/
@Test(enabled = true, alwaysRun = true, description = "送礼物")
public void testSend() {
CosPlayPlayerService cosPlyaPlayerServiceImpl = new CosPlyaPlayerServiceImpl();
//送礼物 send(String mobile, String roomNo,String productId, String amount, String userIds, String env);
//根据手机号获取用户ID
JSONObject json = cosPlyaPlayerServiceImpl.userList(BasicData.playMobile, env);
String userId = json.getString("id");
JSONObject rsp = cosPlyaPlayerServiceImpl.send(BasicData.userMobile, BasicData.roomNo, "331", "1", userId, env);
//需要补充校验交易流水情况
Assert.assertEquals(rsp.getIntValue("status"), BasicData.status);
}
/**
* 开宝箱
* @param env
* @param mobile
* @return
*/
@Test(enabled = true, alwaysRun = true, description = "开宝箱")
public void testLotteryActivity() {
CosPlayPlayerService cosPlyaPlayerServiceImpl = new CosPlyaPlayerServiceImpl();
//lotteryActivity(String mobile,String roomNo, String activityId, String times, String env);
//activityId需要动态获取
JSONObject rsp = cosPlyaPlayerServiceImpl.lotteryActivity(BasicData.userMobile, BasicData.roomNo, "64", "1", env);
Assert.assertEquals(rsp.getIntValue("status"), BasicData.status);
}
/**
* 申请加入公会及审核
* @param env
* @param mobile
* @return
*/
@Test(enabled = true, alwaysRun = true, 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);
}
@AfterClass(alwaysRun = true)
public void afterClassTest() {
......
{"environment":"pre-test","failed":0,"passed":5,"skipped":0,"suiteDuration":"07秒684毫秒","suiteEnds":"2021-07-06 18:13:06","suiteStarts":"2021-07-06 18:12:59","total":5}
\ No newline at end of file
{"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
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="5" failures="0" timestamp="06 七月 2021 10:13:06 GMT" time="7.672" errors="0">
<testcase name="testActivityList" time="0.517" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testGiftList" time="0.562" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testMoneyDetailsSave" time="0.774" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testRoomList" time="0.583" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testVirtualMoneyModify" time="0.485" classname="com.pipi.invoker.CosPlayerTest"/>
<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> <!-- Default test -->
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="5" time="2.922" ignored="0" failures="0" timestamp="06 七月 2021 10:13:07 GMT" skipped="0" hostname="DESKTOP-U3UHQH3" errors="0">
<testcase name="testRoomList" time="0.583" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testGiftList" time="0.562" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testVirtualMoneyModify" time="0.485" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testActivityList" time="0.518" classname="com.pipi.invoker.CosPlayerTest"/>
<testcase name="testMoneyDetailsSave" time="0.774" classname="com.pipi.invoker.CosPlayerTest"/>
<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> <!-- com.pipi.invoker.CosPlayerTest -->
......@@ -11,12 +11,22 @@
</tr>
<tr>
<td>&nbsp;</td>
<td>testRoomList</td>
<td>t8t-ps-scg </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>testGiftList</td>
<td>t8t-ps-scg </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>testRoomList</td>
<td>testLotteryActivity</td>
<td>t8t-ps-scg </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>testMoneyDetailsSave</td>
<td>t8t-ps-scg </td>
</tr>
<tr>
......@@ -26,7 +36,7 @@
</tr>
<tr>
<td>&nbsp;</td>
<td>testMoneyDetailsSave</td>
<td>testSend</td>
<td>t8t-ps-scg </td>
</tr>
<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.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/></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@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>
</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>5 methods:<br/>
<td>7 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 (5/0/0)</td><td valign='top' align='right'>
<table style='width: 100%'><tr><td valign='top'>Default test (7/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>5</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>7</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>5</td><td>0</td><td>0</td><td><a href='Default suite/testng.xml.html'>Link</a></td></tr></table></body></html>
<td>7</td><td>0</td><td>0</td><td><a href='Default suite/testng.xml.html'>Link</a></td></tr></table></body></html>
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!