Commit f34bda7c by wanggang

添加支付模块逻辑

parent 6b5dcf8b
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/Java">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
/target/
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>mjitechauto</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding/<project>=UTF-8
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
...@@ -578,14 +578,21 @@ public class BaseService { ...@@ -578,14 +578,21 @@ public class BaseService {
return json; return json;
} }
/** /**
* 支付回调服务接口
* @param String url 接口地址
* @param String body body类型参数
* @author gangwang
* *
* */ * */
public String httppostPayCallBack(String url, List<NameValuePair> nvps) throws ClientProtocolException, IOException { public JSONObject httppostPayCall(String url,String body)
throws ClientProtocolException, IOException {
HttpPost hp = new HttpPost(url); HttpPost hp = new HttpPost(url);
hp.setEntity(new UrlEncodedFormEntity(nvps, Consts.UTF_8)); hp.setHeader("Content-Type", "application/json");
hp.setHeader("Content-Type", "X-WWW-FORM-URLENCODED"); hp.setHeader("token","f3Yawfayf234f1opUh5");
hp.setHeader("token","f3Yaw!fay*f234^f1opUh5"); //String body = "{\"type\":\"ST\"}";
hp.setEntity(new StringEntity(body));
hr = hc.execute(hp); hr = hc.execute(hp);
entity = hr.getEntity(); entity = hr.getEntity();
BufferedReader postresult = new BufferedReader(new InputStreamReader(entity.getContent(), "UTF-8")); BufferedReader postresult = new BufferedReader(new InputStreamReader(entity.getContent(), "UTF-8"));
...@@ -596,8 +603,15 @@ public class BaseService { ...@@ -596,8 +603,15 @@ public class BaseService {
strB.append(line); strB.append(line);
} }
hp.abort(); hp.abort();
json.clear();
try {
json = JSONObject.fromObject(strB.toString());
} catch (Exception e) {
json = new JSONObject();
System.out.println("返回不是json数据:" + strB.toString());
}
return strB.toString(); return json;
} }
} }
...@@ -100,13 +100,10 @@ public class AddSkuToCart { ...@@ -100,13 +100,10 @@ public class AddSkuToCart {
* */ * */
@Test(dependsOnMethods = "getPayUrl") @Test(dependsOnMethods = "getPayUrl")
public void wxpay_callback_test() { public void wxpay_callback_test() {
String url="http://test.mjitech.com/web/wxpay_callback_test.action" ; String url="http://test.mjitech.com/web/weixinpay_callback_test.action" ;
json.put("result_code", "SUCCESSTEST"); String body = "{\"return_code\":\"SUCCESSTEST\",\"openid\": \"oj4sH0qtPm0x0-ggPk0AQZGQR9xs\",\"out_trade_no\":\""+orderNumber+"\"}";
json.put("out_trade_no",orderNumber) ;
json.put("openid", "o41Mgvxx0Hzo1uihwTqHmMBRx1K8");
try { try {
String result = service.httppostPayCallBack(url, service.postParameter(json)); JSONObject result = service.httppostPayCall(url, body);
System.out.println("支付结果:"+result); System.out.println("支付结果:"+result);
} catch (ClientProtocolException e) { } catch (ClientProtocolException e) {
// TODO Auto-generated catch block // TODO Auto-generated catch block
...@@ -115,9 +112,9 @@ public class AddSkuToCart { ...@@ -115,9 +112,9 @@ public class AddSkuToCart {
// TODO Auto-generated catch block // TODO Auto-generated catch block
e.printStackTrace(); e.printStackTrace();
} }
}
}
......
...@@ -57,9 +57,9 @@ function toggleAllBoxes() { ...@@ -57,9 +57,9 @@ function toggleAllBoxes() {
<tr> <tr>
<td>Tests passed/Failed/Skipped:</td><td>4/0/0</td> <td>Tests passed/Failed/Skipped:</td><td>4/0/0</td>
</tr><tr> </tr><tr>
<td>Started on:</td><td>Mon Jun 25 19:28:29 CST 2018</td> <td>Started on:</td><td>Wed Jun 27 17:56:32 CST 2018</td>
</tr> </tr>
<tr><td>Total time:</td><td>2 seconds (2182 ms)</td> <tr><td>Total time:</td><td>0 seconds (742 ms)</td>
</tr><tr> </tr><tr>
<td>Included groups:</td><td></td> <td>Included groups:</td><td></td>
</tr><tr> </tr><tr>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitXMLReporter --> <!-- Generated by org.testng.reporters.JUnitXMLReporter -->
<testsuite hostname="YLMF-1711181457" name="Default test" tests="4" failures="0" timestamp="25 Jun 2018 11:28:32 GMT" time="2.182" errors="0"> <testsuite hostname="YLMF-1711181457" name="Default test" tests="4" failures="0" timestamp="27 Jun 2018 09:56:33 GMT" time="0.742" errors="0">
<testcase name="add_sku_to_cart" time="0.684" classname="com.mjitech.qa.test.AddSkuToCart"/> <testcase name="add_sku_to_cart" time="0.482" classname="com.mjitech.qa.test.AddSkuToCart"/>
<testcase name="submitCart" time="0.575" classname="com.mjitech.qa.test.AddSkuToCart"/> <testcase name="submitCart" time="0.125" classname="com.mjitech.qa.test.AddSkuToCart"/>
<testcase name="getPayUrl" time="0.091" classname="com.mjitech.qa.test.AddSkuToCart"/> <testcase name="getPayUrl" time="0.053" classname="com.mjitech.qa.test.AddSkuToCart"/>
<testcase name="wxpay_callback_test" time="0.806" classname="com.mjitech.qa.test.AddSkuToCart"/> <testcase name="wxpay_callback_test" time="0.055" classname="com.mjitech.qa.test.AddSkuToCart"/>
</testsuite> <!-- Default test --> </testsuite> <!-- Default test -->
...@@ -3,13 +3,14 @@ ...@@ -3,13 +3,14 @@
<suite name="Failed suite [Default suite]"> <suite name="Failed suite [Default suite]">
<test name="Default test(failed)"> <test name="Default test(failed)">
<classes> <classes>
<class name="com.mjitech.qa.test.TestTypeList"> <class name="com.mjitech.qa.test.AddSkuToCart">
<methods> <methods>
<include name="beforeMethod"/> <include name="submitCart"/>
<include name="login"/> <include name="wxpay_callback_test"/>
<include name="test002"/> <include name="getPayUrl"/>
<include name="add_sku_to_cart"/>
</methods> </methods>
</class> <!-- com.mjitech.qa.test.TestTypeList --> </class> <!-- com.mjitech.qa.test.AddSkuToCart -->
</classes> </classes>
</test> <!-- Default test(failed) --> </test> <!-- Default test(failed) -->
</suite> <!-- Failed suite [Default suite] --> </suite> <!-- Failed suite [Default suite] -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>TestNG Report</title><style type="text/css">table {margin-bottom:10px;border-collapse:collapse;empty-cells:show}th,td {border:1px solid #009;padding:.25em .5em}th {vertical-align:bottom}td {vertical-align:top}table a {font-weight:bold}.stripe td {background-color: #E6EBF9}.num {text-align:right}.passedodd td {background-color: #3F3}.passedeven td {background-color: #0A0}.skippedodd td {background-color: #DDD}.skippedeven td {background-color: #CCC}.failedodd td,.attn {background-color: #F33}.failedeven td,.stripe .attn {background-color: #D00}.stacktrace {white-space:pre;font-family:monospace}.totop {font-size:85%;text-align:center;border-bottom:2px solid #000}</style></head><body><table><tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr><tr><th colspan="7">Default suite</th></tr><tr><td><a href="#t0">Default test</a></td><td class="num">4</td><td class="num">0</td><td class="num">0</td><td class="num">2,182</td><td></td><td></td></tr></table><table><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">Default suite</th></tr></tbody><tbody id="t0"><tr><th colspan="4">Default test &#8212; passed</th></tr><tr class="passedeven"><td rowspan="4">com.mjitech.qa.test.AddSkuToCart</td><td><a href="#m0">add_sku_to_cart</a></td><td rowspan="1">1529926109957</td><td rowspan="1">684</td></tr><tr class="passedeven"><td><a href="#m1">getPayUrl</a></td><td rowspan="1">1529926111226</td><td rowspan="1">91</td></tr><tr class="passedeven"><td><a href="#m2">submitCart</a></td><td rowspan="1">1529926110649</td><td rowspan="1">575</td></tr><tr class="passedeven"><td><a href="#m3">wxpay_callback_test</a></td><td rowspan="1">1529926111318</td><td rowspan="1">806</td></tr></tbody></table><h2>Default test</h2><h3 id="m0">com.mjitech.qa.test.AddSkuToCart#add_sku_to_cart</h3><table class="result"></table><p class="totop"><a href="#summary">back to summary</a></p><h3 id="m1">com.mjitech.qa.test.AddSkuToCart#getPayUrl</h3><table class="result"></table><p class="totop"><a href="#summary">back to summary</a></p><h3 id="m2">com.mjitech.qa.test.AddSkuToCart#submitCart</h3><table class="result"></table><p class="totop"><a href="#summary">back to summary</a></p><h3 id="m3">com.mjitech.qa.test.AddSkuToCart#wxpay_callback_test</h3><table class="result"></table><p class="totop"><a href="#summary">back to summary</a></p></body></html> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>TestNG Report</title><style type="text/css">table {margin-bottom:10px;border-collapse:collapse;empty-cells:show}th,td {border:1px solid #009;padding:.25em .5em}th {vertical-align:bottom}td {vertical-align:top}table a {font-weight:bold}.stripe td {background-color: #E6EBF9}.num {text-align:right}.passedodd td {background-color: #3F3}.passedeven td {background-color: #0A0}.skippedodd td {background-color: #DDD}.skippedeven td {background-color: #CCC}.failedodd td,.attn {background-color: #F33}.failedeven td,.stripe .attn {background-color: #D00}.stacktrace {white-space:pre;font-family:monospace}.totop {font-size:85%;text-align:center;border-bottom:2px solid #000}</style></head><body><table><tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr><tr><th colspan="7">Default suite</th></tr><tr><td><a href="#t0">Default test</a></td><td class="num">4</td><td class="num">0</td><td class="num">0</td><td class="num">742</td><td></td><td></td></tr></table><table><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">Default suite</th></tr></tbody><tbody id="t0"><tr><th colspan="4">Default test &#8212; passed</th></tr><tr class="passedeven"><td rowspan="4">com.mjitech.qa.test.AddSkuToCart</td><td><a href="#m0">add_sku_to_cart</a></td><td rowspan="1">1530093392582</td><td rowspan="1">482</td></tr><tr class="passedeven"><td><a href="#m1">getPayUrl</a></td><td rowspan="1">1530093393201</td><td rowspan="1">53</td></tr><tr class="passedeven"><td><a href="#m2">submitCart</a></td><td rowspan="1">1530093393070</td><td rowspan="1">125</td></tr><tr class="passedeven"><td><a href="#m3">wxpay_callback_test</a></td><td rowspan="1">1530093393256</td><td rowspan="1">55</td></tr></tbody></table><h2>Default test</h2><h3 id="m0">com.mjitech.qa.test.AddSkuToCart#add_sku_to_cart</h3><table class="result"></table><p class="totop"><a href="#summary">back to summary</a></p><h3 id="m1">com.mjitech.qa.test.AddSkuToCart#getPayUrl</h3><table class="result"></table><p class="totop"><a href="#summary">back to summary</a></p><h3 id="m2">com.mjitech.qa.test.AddSkuToCart#submitCart</h3><table class="result"></table><p class="totop"><a href="#summary">back to summary</a></p><h3 id="m3">com.mjitech.qa.test.AddSkuToCart#wxpay_callback_test</h3><table class="result"></table><p class="totop"><a href="#summary">back to summary</a></p></body></html>
\ No newline at end of file \ No newline at end of file
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<ul> <ul>
<li> <li>
<a href="#" class="navigator-link " panel-name="test-xml-Default_suite"> <a href="#" class="navigator-link " panel-name="test-xml-Default_suite">
<span>C:\Users\Administrator\AppData\Local\Temp\testng-eclipse-980402552\testng-customsuite.xml</span> <span>C:\Users\Administrator\AppData\Local\Temp\testng-eclipse--614860695\testng-customsuite.xml</span>
</a> <!-- navigator-link --> </a> <!-- navigator-link -->
</li> </li>
<li> <li>
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
</div> <!-- panel Default_suite --> </div> <!-- panel Default_suite -->
<div panel-name="test-xml-Default_suite" class="panel"> <div panel-name="test-xml-Default_suite" class="panel">
<div class="main-panel-header rounded-window-top"> <div class="main-panel-header rounded-window-top">
<span class="header-content">C:\Users\Administrator\AppData\Local\Temp\testng-eclipse-980402552\testng-customsuite.xml</span> <span class="header-content">C:\Users\Administrator\AppData\Local\Temp\testng-eclipse--614860695\testng-customsuite.xml</span>
</div> <!-- main-panel-header rounded-window-top --> </div> <!-- main-panel-header rounded-window-top -->
<div class="main-panel-content rounded-window-bottom"> <div class="main-panel-content rounded-window-bottom">
<pre> <pre>
...@@ -221,26 +221,26 @@ data.addColumn('string', 'Class'); ...@@ -221,26 +221,26 @@ data.addColumn('string', 'Class');
data.addColumn('number', 'Time (ms)'); data.addColumn('number', 'Time (ms)');
data.addRows(4); data.addRows(4);
data.setCell(0, 0, 0) data.setCell(0, 0, 0)
data.setCell(0, 1, 'wxpay_callback_test') data.setCell(0, 1, 'add_sku_to_cart')
data.setCell(0, 2, 'com.mjitech.qa.test.AddSkuToCart') data.setCell(0, 2, 'com.mjitech.qa.test.AddSkuToCart')
data.setCell(0, 3, 806); data.setCell(0, 3, 482);
data.setCell(1, 0, 1) data.setCell(1, 0, 1)
data.setCell(1, 1, 'add_sku_to_cart') data.setCell(1, 1, 'submitCart')
data.setCell(1, 2, 'com.mjitech.qa.test.AddSkuToCart') data.setCell(1, 2, 'com.mjitech.qa.test.AddSkuToCart')
data.setCell(1, 3, 684); data.setCell(1, 3, 125);
data.setCell(2, 0, 2) data.setCell(2, 0, 2)
data.setCell(2, 1, 'submitCart') data.setCell(2, 1, 'wxpay_callback_test')
data.setCell(2, 2, 'com.mjitech.qa.test.AddSkuToCart') data.setCell(2, 2, 'com.mjitech.qa.test.AddSkuToCart')
data.setCell(2, 3, 575); data.setCell(2, 3, 55);
data.setCell(3, 0, 3) data.setCell(3, 0, 3)
data.setCell(3, 1, 'getPayUrl') data.setCell(3, 1, 'getPayUrl')
data.setCell(3, 2, 'com.mjitech.qa.test.AddSkuToCart') data.setCell(3, 2, 'com.mjitech.qa.test.AddSkuToCart')
data.setCell(3, 3, 91); data.setCell(3, 3, 53);
window.suiteTableData['Default_suite']= { tableData: data, tableDiv: 'times-div-Default_suite'} window.suiteTableData['Default_suite']= { tableData: data, tableDiv: 'times-div-Default_suite'}
return data; return data;
} }
</script> </script>
<span class="suite-total-time">Total running time: 2 seconds</span> <span class="suite-total-time">Total running time: 715 ms</span>
<div id="times-div-Default_suite"> <div id="times-div-Default_suite">
</div> <!-- times-div-Default_suite --> </div> <!-- times-div-Default_suite -->
</div> <!-- times-div --> </div> <!-- times-div -->
...@@ -273,15 +273,15 @@ return data; ...@@ -273,15 +273,15 @@ return data;
</div> <!-- test-method --> </div> <!-- test-method -->
<div class="test-method"> <div class="test-method">
<span class="method-name">submitCart</span> <span class="method-name">submitCart</span>
<span class="method-start">692 ms</span> <span class="method-start">488 ms</span>
</div> <!-- test-method --> </div> <!-- test-method -->
<div class="test-method"> <div class="test-method">
<span class="method-name">getPayUrl</span> <span class="method-name">getPayUrl</span>
<span class="method-start">1269 ms</span> <span class="method-start">619 ms</span>
</div> <!-- test-method --> </div> <!-- test-method -->
<div class="test-method"> <div class="test-method">
<span class="method-name">wxpay_callback_test</span> <span class="method-name">wxpay_callback_test</span>
<span class="method-start">1361 ms</span> <span class="method-start">674 ms</span>
</div> <!-- test-method --> </div> <!-- test-method -->
</div> <!-- main-panel-content rounded-window-bottom --> </div> <!-- main-panel-content rounded-window-bottom -->
</div> <!-- panel --> </div> <!-- panel -->
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitReportReporter --> <!-- Generated by org.testng.reporters.JUnitReportReporter -->
<testsuite hostname="YLMF-1711181457" name="com.mjitech.qa.test.AddSkuToCart" tests="4" failures="0" timestamp="25 Jun 2018 11:28:32 GMT" time="2.156" errors="0"> <testsuite hostname="YLMF-1711181457" name="com.mjitech.qa.test.AddSkuToCart" tests="4" failures="0" timestamp="27 Jun 2018 09:56:33 GMT" time="0.715" errors="0">
<testcase name="add_sku_to_cart" time="0.684" classname="com.mjitech.qa.test.AddSkuToCart"/> <testcase name="add_sku_to_cart" time="0.482" classname="com.mjitech.qa.test.AddSkuToCart"/>
<testcase name="submitCart" time="0.575" classname="com.mjitech.qa.test.AddSkuToCart"/> <testcase name="submitCart" time="0.125" classname="com.mjitech.qa.test.AddSkuToCart"/>
<testcase name="wxpay_callback_test" time="0.806" classname="com.mjitech.qa.test.AddSkuToCart"/> <testcase name="wxpay_callback_test" time="0.055" classname="com.mjitech.qa.test.AddSkuToCart"/>
<testcase name="getPayUrl" time="0.091" classname="com.mjitech.qa.test.AddSkuToCart"/> <testcase name="getPayUrl" time="0.053" classname="com.mjitech.qa.test.AddSkuToCart"/>
</testsuite> <!-- com.mjitech.qa.test.AddSkuToCart --> </testsuite> <!-- com.mjitech.qa.test.AddSkuToCart -->
<h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Default suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/> <h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Default suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
<table border="1"> <table border="1">
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr> <tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
<tr bgcolor="c7c2a6"> <td>18/06/25 19:28:29</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.add_sku_to_cart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">add_sku_to_cart</td> <tr bgcolor="c7c2a6"> <td>18/06/27 17:56:32</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.add_sku_to_cart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">add_sku_to_cart</td>
<td>main@2024542466</td> <td></td> </tr> <td>main@2024542466</td> <td></td> </tr>
<tr bgcolor="c7c2a6"> <td>18/06/25 19:28:31</td> <td>1269</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.getPayUrl()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">getPayUrl</td> <tr bgcolor="c7c2a6"> <td>18/06/27 17:56:33</td> <td>618</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.getPayUrl()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">getPayUrl</td>
<td>main@2024542466</td> <td></td> </tr> <td>main@2024542466</td> <td></td> </tr>
<tr bgcolor="c7c2a6"> <td>18/06/25 19:28:30</td> <td>692</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.submitCart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">submitCart</td> <tr bgcolor="c7c2a6"> <td>18/06/27 17:56:33</td> <td>487</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.submitCart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">submitCart</td>
<td>main@2024542466</td> <td></td> </tr> <td>main@2024542466</td> <td></td> </tr>
<tr bgcolor="c7c2a6"> <td>18/06/25 19:28:31</td> <td>1362</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.wxpay_callback_test()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">wxpay_callback_test</td> <tr bgcolor="c7c2a6"> <td>18/06/27 17:56:33</td> <td>673</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.wxpay_callback_test()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">wxpay_callback_test</td>
<td>main@2024542466</td> <td></td> </tr> <td>main@2024542466</td> <td></td> </tr>
</table> </table>
<h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Default suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/> <h2>Methods run, sorted chronologically</h2><h3>&gt;&gt; means before, &lt;&lt; means after</h3><p/><br/><em>Default suite</em><p/><small><i>(Hover the method name to see the test class name)</i></small><p/>
<table border="1"> <table border="1">
<tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr> <tr><th>Time</th><th>Delta (ms)</th><th>Suite<br>configuration</th><th>Test<br>configuration</th><th>Class<br>configuration</th><th>Groups<br>configuration</th><th>Method<br>configuration</th><th>Test<br>method</th><th>Thread</th><th>Instances</th></tr>
<tr bgcolor="c7c2a6"> <td>18/06/25 19:28:29</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.add_sku_to_cart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">add_sku_to_cart</td> <tr bgcolor="c7c2a6"> <td>18/06/27 17:56:32</td> <td>0</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.add_sku_to_cart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">add_sku_to_cart</td>
<td>main@2024542466</td> <td></td> </tr> <td>main@2024542466</td> <td></td> </tr>
<tr bgcolor="c7c2a6"> <td>18/06/25 19:28:30</td> <td>692</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.submitCart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">submitCart</td> <tr bgcolor="c7c2a6"> <td>18/06/27 17:56:33</td> <td>487</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.submitCart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">submitCart</td>
<td>main@2024542466</td> <td></td> </tr> <td>main@2024542466</td> <td></td> </tr>
<tr bgcolor="c7c2a6"> <td>18/06/25 19:28:31</td> <td>1269</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.getPayUrl()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">getPayUrl</td> <tr bgcolor="c7c2a6"> <td>18/06/27 17:56:33</td> <td>618</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.getPayUrl()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">getPayUrl</td>
<td>main@2024542466</td> <td></td> </tr> <td>main@2024542466</td> <td></td> </tr>
<tr bgcolor="c7c2a6"> <td>18/06/25 19:28:31</td> <td>1362</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.wxpay_callback_test()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">wxpay_callback_test</td> <tr bgcolor="c7c2a6"> <td>18/06/27 17:56:33</td> <td>673</td> <td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td title="AddSkuToCart.wxpay_callback_test()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]">wxpay_callback_test</td>
<td>main@2024542466</td> <td></td> </tr> <td>main@2024542466</td> <td></td> </tr>
</table> </table>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"> <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Failed suite [Suite]"> <suite name="Failed suite [Default suite]">
<listeners> <test name="Default test(failed)">
<listener class-name="org.uncommons.reportng.HTMLReporter"/>
<listener class-name="org.uncommons.reportng.JUnitXMLReporter"/>
</listeners>
<test name="手机端-小程序-账户登录(failed)">
<classes> <classes>
<class name="com.mjitech.qa.test.VaildateLoginName"> <class name="com.mjitech.qa.test.AddSkuToCart">
<methods> <methods>
<include name="beforeMethod"/> <include name="submitCart"/>
<include name="VaildateLoginNameByDabao"/> <include name="wxpay_callback_test"/>
<include name="getPayUrl"/>
<include name="add_sku_to_cart"/>
</methods> </methods>
</class> <!-- com.mjitech.qa.test.VaildateLoginName --> </class> <!-- com.mjitech.qa.test.AddSkuToCart -->
</classes> </classes>
</test> <!-- 手机端-小程序-账户登录(failed) --> </test> <!-- Default test(failed) -->
</suite> <!-- Failed suite [Suite] --> </suite> <!-- Failed suite [Default suite] -->
...@@ -2,24 +2,24 @@ ...@@ -2,24 +2,24 @@
<testng-results skipped="0" failed="0" total="4" passed="4"> <testng-results skipped="0" failed="0" total="4" passed="4">
<reporter-output> <reporter-output>
</reporter-output> </reporter-output>
<suite name="Default suite" duration-ms="2182" started-at="2018-06-25T11:28:29Z" finished-at="2018-06-25T11:28:32Z"> <suite name="Default suite" duration-ms="742" started-at="2018-06-27T09:56:32Z" finished-at="2018-06-27T09:56:33Z">
<groups> <groups>
</groups> </groups>
<test name="Default test" duration-ms="2182" started-at="2018-06-25T11:28:29Z" finished-at="2018-06-25T11:28:32Z"> <test name="Default test" duration-ms="742" started-at="2018-06-27T09:56:32Z" finished-at="2018-06-27T09:56:33Z">
<class name="com.mjitech.qa.test.AddSkuToCart"> <class name="com.mjitech.qa.test.AddSkuToCart">
<test-method status="PASS" signature="add_sku_to_cart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]" name="add_sku_to_cart" duration-ms="684" started-at="2018-06-25T19:28:29Z" finished-at="2018-06-25T19:28:30Z"> <test-method status="PASS" signature="add_sku_to_cart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]" name="add_sku_to_cart" duration-ms="482" started-at="2018-06-27T17:56:32Z" finished-at="2018-06-27T17:56:33Z">
<reporter-output> <reporter-output>
</reporter-output> </reporter-output>
</test-method> <!-- add_sku_to_cart --> </test-method> <!-- add_sku_to_cart -->
<test-method status="PASS" signature="submitCart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]" name="submitCart" duration-ms="575" started-at="2018-06-25T19:28:30Z" depends-on-methods="com.mjitech.qa.test.AddSkuToCart.add_sku_to_cart" finished-at="2018-06-25T19:28:31Z"> <test-method status="PASS" signature="submitCart()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]" name="submitCart" duration-ms="125" started-at="2018-06-27T17:56:33Z" depends-on-methods="com.mjitech.qa.test.AddSkuToCart.add_sku_to_cart" finished-at="2018-06-27T17:56:33Z">
<reporter-output> <reporter-output>
</reporter-output> </reporter-output>
</test-method> <!-- submitCart --> </test-method> <!-- submitCart -->
<test-method status="PASS" signature="getPayUrl()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]" name="getPayUrl" duration-ms="91" started-at="2018-06-25T19:28:31Z" depends-on-methods="com.mjitech.qa.test.AddSkuToCart.submitCart" finished-at="2018-06-25T19:28:31Z"> <test-method status="PASS" signature="getPayUrl()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]" name="getPayUrl" duration-ms="53" started-at="2018-06-27T17:56:33Z" depends-on-methods="com.mjitech.qa.test.AddSkuToCart.submitCart" finished-at="2018-06-27T17:56:33Z">
<reporter-output> <reporter-output>
</reporter-output> </reporter-output>
</test-method> <!-- getPayUrl --> </test-method> <!-- getPayUrl -->
<test-method status="PASS" signature="wxpay_callback_test()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]" name="wxpay_callback_test" duration-ms="806" started-at="2018-06-25T19:28:31Z" depends-on-methods="com.mjitech.qa.test.AddSkuToCart.getPayUrl" finished-at="2018-06-25T19:28:32Z"> <test-method status="PASS" signature="wxpay_callback_test()[pri:0, instance:com.mjitech.qa.test.AddSkuToCart@4abdb505]" name="wxpay_callback_test" duration-ms="55" started-at="2018-06-27T17:56:33Z" depends-on-methods="com.mjitech.qa.test.AddSkuToCart.getPayUrl" finished-at="2018-06-27T17:56:33Z">
<reporter-output> <reporter-output>
</reporter-output> </reporter-output>
</test-method> <!-- wxpay_callback_test --> </test-method> <!-- wxpay_callback_test -->
......
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