Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nwn_Api_auto_test
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
shuai
nwn_Api_auto_test
Commits
84ac91ce
Commit
84ac91ce
authored
Mar 10, 2021
by
Li Yongyu
Browse files
Options
Browse Files
Download
Plain Diff
Conflicts:
parents
749a7281
e60c0438
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
12 additions
and
21 deletions
+12
-21
.gitignore
nwn_Api_auto_test/.gitignore
+1
-0
codeold.java
nwn_Api_auto_test/src/com/offcn/api/nwn/process/codeold.java
+0
-0
logon.java
nwn_Api_auto_test/src/com/offcn/api/nwn/process/logon.java
+0
-0
programLevel.java
...auto_test/src/com/offcn/api/nwn/process/programLevel.java
+0
-0
returnUserInfo.java
...to_test/src/com/offcn/api/nwn/process/returnUserInfo.java
+0
-0
addTask.java
nwn_Api_auto_test/src/com/offcn/api/nwn/service/addTask.java
+0
-0
programLevel.java
...auto_test/src/com/offcn/api/nwn/service/programLevel.java
+0
-0
add.java
nwn_Api_auto_test/src/com/offcn/api/nwn/shop/add.java
+0
-0
NWN.java
nwn_Api_auto_test/src/com/offcn/process/NWN.java
+2
-4
APITest_nwn.java
nwn_Api_auto_test/src/com/offcn/test/APITest_nwn.java
+5
-17
map.txt
nwn_Api_auto_test/src/resources/map.txt
+4
-0
No files found.
nwn_Api_auto_test/.gitignore
View file @
84ac91ce
...
...
@@ -6,3 +6,4 @@ bin/
log/
testoutput/
test-output/
/测试报告详细资料.zip
nwn_Api_auto_test/src/com/offcn/api/nwn/process/codeold.java
View file @
84ac91ce
nwn_Api_auto_test/src/com/offcn/api/nwn/process/logon.java
View file @
84ac91ce
nwn_Api_auto_test/src/com/offcn/api/nwn/process/programLevel.java
View file @
84ac91ce
nwn_Api_auto_test/src/com/offcn/api/nwn/process/returnUserInfo.java
View file @
84ac91ce
nwn_Api_auto_test/src/com/offcn/api/nwn/service/addTask.java
View file @
84ac91ce
nwn_Api_auto_test/src/com/offcn/api/nwn/service/programLevel.java
View file @
84ac91ce
nwn_Api_auto_test/src/com/offcn/api/nwn/shop/add.java
View file @
84ac91ce
nwn_Api_auto_test/src/com/offcn/process/NWN.java
View file @
84ac91ce
...
...
@@ -25,11 +25,9 @@ public class NWN extends BasicsGM{
public
static
String
url
=
""
;
//后台登录得到的nwn登录地址
public
static
String
nwn_url
=
""
;
//后台登录得到的nwn登录地址
public
static
String
PHPSESSID
=
""
;
//后台登录nwn,最终得到的PHPSESSID
public
static
String
go_session_id
=
""
;
//后台登录电商,最终得到的go_session_id
public
static
String
Content_Length
=
""
;
//后台登录电商,最终得到的go_session_id
public
static
String
admin_32_encode
=
""
;
//后台登录nwn,最终得到的admin_32_encode
public
static
String
admin_31_encode
=
""
;
//后台登录nwn,最终得到的PHPSESSID
public
static
String
location
=
""
;
//后台登录nwn,最终得到的PHPSESSID
public
static
String
admin_32_encode
=
""
;
//后台登录电商,最终得到的PHPSESSID
public
static
String
go_session_id
=
""
;
//后台登录电商,最终得到的PHPSESSID
public
static
List
<
String
>
n_package_idList
=
new
ArrayList
<
String
>();
//n_package的id
public
static
List
<
String
>
n_admin_card_no_List
=
new
ArrayList
<
String
>();
//n_admin的card_no
...
...
nwn_Api_auto_test/src/com/offcn/test/APITest_nwn.java
View file @
84ac91ce
package
com
.
offcn
.
test
;
import
io.restassured.response.Response
;
import
java.sql.SQLException
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Set
;
import
net.sf.json.JSONObject
;
import
org.testng.Assert
;
import
org.testng.annotations.AfterClass
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Listeners
;
import
org.testng.annotations.Test
;
import
com.offcn.TestData.offcn_api_testData
;
import
com.offcn.TestUnti.Log
;
import
com.offcn.TestUnti.Mail
;
import
com.offcn.TestUnti.MapUtil
;
import
com.offcn.TestUnti.ReadProperties
;
import
com.offcn.TestUnti.Reflect_api
;
import
com.offcn.TestUnti.SheetUtils
;
import
com.offcn.TestUnti.StringUtils
;
import
com.offcn.TestUnti.XMLread
;
import
com.offcn.api.nwn.md5.nwngetsign
;
import
com.offcn.interfaces.API
;
import
com.offcn.listener.MyTestListener
;
import
com.offcn.listener.ProcessTestng
;
import
com.offcn.listener.ResultTestng
;
import
com.offcn.listener.SkipIInvokedMethodListener
;
import
com.offcn.process.BasicsGM
;
import
com.offcn.process.NWN
;
import
org.testng.annotations.BeforeClass
;
import
org.testng.annotations.Listeners
;
import
org.testng.annotations.Test
;
@Listeners
({
MyTestListener
.
class
,
SkipIInvokedMethodListener
.
class
})
public
class
APITest_nwn
extends
NWN
{
...
...
@@ -79,6 +65,8 @@ public class APITest_nwn extends NWN{
// System.out.println(!data.get("Request").toString().contains("get"));
// System.out.println(data.get("system").toString().equals("nwn_service"));
System
.
out
.
println
(!
data
.
get
(
"Request"
).
toString
().
contains
(
"get"
));
System
.
out
.
println
(
data
.
get
(
"system"
).
toString
().
equals
(
"nwn_service"
));
if
(
data
.
get
(
"system"
).
toString
().
equals
(
"nwn_service"
)
){
//静态和动态参数自动添加
...
...
nwn_Api_auto_test/src/resources/map.txt
View file @
84ac91ce
<font size='4' color='#FF0000'>流程错误列表</font><table border='1'><th>URL</th><th>错误次数</th>
<tr><td>/sso/login/sign/417d2b66db1b65ba0779d28f94fe7f71</td><td>错误了1次。</td></tr>
<tr><td>/admin/package/edu/task/addDocTask/sign/99f6e91b2587b086cb7038f9a48bbbb0</td><td>错误了1次。</td></tr>
</table>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment