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
0b638d56
Commit
0b638d56
authored
Dec 21, 2018
by
Li Yongyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增验收码等接口用例
parent
b990f5fe
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
24 additions
and
8 deletions
+24
-8
CaseMake.xls
nwn_Api_auto_test/TestData/CaseMake.xls
+0
-0
DataAll.xls
nwn_Api_auto_test/TestData/DataAll.xls
+0
-0
DefectTest.xml
nwn_Api_auto_test/src/DefectTest.xml
+1
-1
addAccount.java
nwn_Api_auto_test/src/com/offcn/api/nwn/addAccount.java
+1
-1
addChildTier.java
nwn_Api_auto_test/src/com/offcn/api/nwn/addChildTier.java
+0
-0
NWN.java
nwn_Api_auto_test/src/com/offcn/process/NWN.java
+20
-0
APITest_nwn.java
nwn_Api_auto_test/src/com/offcn/test/APITest_nwn.java
+1
-5
MakeTestCases.java
nwn_Api_auto_test/src/makeTestCase/MakeTestCases.java
+1
-1
No files found.
nwn_Api_auto_test/TestData/CaseMake.xls
View file @
0b638d56
No preview for this file type
nwn_Api_auto_test/TestData/DataAll.xls
View file @
0b638d56
No preview for this file type
nwn_Api_auto_test/src/DefectTest.xml
View file @
0b638d56
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<classes>
<classes>
<class
name=
"com.puhui.test.RenMai_APITest"
>
<class
name=
"com.puhui.test.RenMai_APITest"
>
<methods>
<methods>
<include
name=
"f"
invocation-numbers=
""
/>
<include
name=
"f"
invocation-numbers=
"
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
"
/>
</methods>
</methods>
</class>
</class>
</classes>
</classes>
...
...
nwn_Api_auto_test/src/com/offcn/api/nwn/addAccount.java
View file @
0b638d56
...
@@ -99,7 +99,7 @@ public class addAccount extends NWN implements API {
...
@@ -99,7 +99,7 @@ public class addAccount extends NWN implements API {
result
=
result
&&
false
;
result
=
result
&&
false
;
failReason
=
failReason
+
"code is expected "
failReason
=
failReason
+
"code is expected "
+
data
.
get
(
"code"
).
toString
()
+
" but actually "
+
data
.
get
(
"code"
).
toString
()
+
" but actually "
+
jp
.
getString
(
"code"
)
+
"."
;
+
jp
.
getString
(
"
ret
code"
)
+
"."
;
}
}
if
((
data
.
get
(
"msg"
)
!=
null
)
&&
(
msg
!=
null
)
&&
(!
msg
.
equals
(
data
.
get
(
"msg"
).
toString
())))
{
if
((
data
.
get
(
"msg"
)
!=
null
)
&&
(
msg
!=
null
)
&&
(!
msg
.
equals
(
data
.
get
(
"msg"
).
toString
())))
{
...
...
nwn_Api_auto_test/src/com/offcn/api/nwn/addChildTier.java
View file @
0b638d56
nwn_Api_auto_test/src/com/offcn/process/NWN.java
View file @
0b638d56
...
@@ -40,6 +40,8 @@ public class NWN extends BasicsGM{
...
@@ -40,6 +40,8 @@ public class NWN extends BasicsGM{
public
static
List
<
String
>
n_admin_id_List
=
new
ArrayList
<
String
>();
//n_admin的id
public
static
List
<
String
>
n_admin_id_List
=
new
ArrayList
<
String
>();
//n_admin的id
public
static
List
<
String
>
n_admin_phone_List
=
new
ArrayList
<
String
>();
//n_admin的phone
public
static
List
<
String
>
n_admin_phone_List
=
new
ArrayList
<
String
>();
//n_admin的phone
public
static
List
<
String
>
n_admin_username_List
=
new
ArrayList
<
String
>();
//n_admin的username
public
static
List
<
String
>
n_admin_username_List
=
new
ArrayList
<
String
>();
//n_admin的username
public
static
List
<
String
>
getcode_id_List
=
new
ArrayList
<
String
>();
//getcode的id
public
static
List
<
String
>
n_getcode_id_List
=
new
ArrayList
<
String
>();
//getcode的id
public
static
String
level_id_List
=
""
;
//层级的id
public
static
String
level_id_List
=
""
;
//层级的id
public
static
List
<
String
>
user_id_List
=
new
ArrayList
<
String
>();
//user_id
public
static
List
<
String
>
user_id_List
=
new
ArrayList
<
String
>();
//user_id
...
@@ -127,6 +129,8 @@ public class NWN extends BasicsGM{
...
@@ -127,6 +129,8 @@ public class NWN extends BasicsGM{
for
(
int
i
=
0
;
i
<
n_package_idList
.
size
();
i
++){
for
(
int
i
=
0
;
i
<
n_package_idList
.
size
();
i
++){
try
{
try
{
deleteFromDB
(
"n_package"
,
"id"
,
n_package_idList
.
get
(
i
));
deleteFromDB
(
"n_package"
,
"id"
,
n_package_idList
.
get
(
i
));
//deleteFromDB("n_packcode", "package_id", n_package_idList.get(i));
//deleteFromDB("n_packcode_record", "package_id", n_package_idList.get(i));
user_List
.
add
(
n_package_idList
.
get
(
i
));
user_List
.
add
(
n_package_idList
.
get
(
i
));
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -154,7 +158,23 @@ public class NWN extends BasicsGM{
...
@@ -154,7 +158,23 @@ public class NWN extends BasicsGM{
user_id_List
.
removeAll
(
user_List
);
user_id_List
.
removeAll
(
user_List
);
// System.out.println(user_idList.toString());
// System.out.println(user_idList.toString());
}
}
//清除getcode_id_List
public
void
cleann_getcode_id_List_FromDB
()
{
List
<
String
>
user_List
=
new
ArrayList
<
String
>();
for
(
int
i
=
0
;
i
<
getcode_id_List
.
size
();
i
++){
try
{
deleteFromDB
(
"n_packcode"
,
"package_id"
,
getcode_id_List
.
get
(
i
));
deleteFromDB
(
"n_packcode_record"
,
"package_id"
,
getcode_id_List
.
get
(
i
));
user_List
.
add
(
getcode_id_List
.
get
(
i
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
logInfo
(
"清除数据失败getcode_id_List"
);
}
}
getcode_id_List
.
removeAll
(
user_List
);
// System.out.println(user_idList.toString());
}
//
//
//
//
...
...
nwn_Api_auto_test/src/com/offcn/test/APITest_nwn.java
View file @
0b638d56
package
com
.
offcn
.
test
;
package
com
.
offcn
.
test
;
import
io.restassured.response.Response
;
import
io.restassured.response.Response
;
import
java.sql.SQLException
;
import
java.sql.SQLException
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
import
org.testng.Assert
;
import
org.testng.Assert
;
import
org.testng.annotations.AfterClass
;
import
org.testng.annotations.AfterClass
;
import
com.offcn.TestData.offcn_api_testData
;
import
com.offcn.TestData.offcn_api_testData
;
import
com.offcn.TestUnti.Log
;
import
com.offcn.TestUnti.Log
;
import
com.offcn.TestUnti.Mail
;
import
com.offcn.TestUnti.Mail
;
...
@@ -125,6 +120,7 @@ public class APITest_nwn extends NWN{
...
@@ -125,6 +120,7 @@ public class APITest_nwn extends NWN{
this
.
cleann_n_admin_card_no_List_FromDB
();
this
.
cleann_n_admin_card_no_List_FromDB
();
this
.
cleann_n_package_List_FromDB
();
this
.
cleann_n_package_List_FromDB
();
this
.
cleann_user_id_List_FromDB
();
this
.
cleann_user_id_List_FromDB
();
this
.
cleann_getcode_id_List_FromDB
();
try
{
try
{
if
(
stmt
!=
null
){
if
(
stmt
!=
null
){
stmt
.
close
();
stmt
.
close
();
...
...
nwn_Api_auto_test/src/makeTestCase/MakeTestCases.java
View file @
0b638d56
...
@@ -91,7 +91,7 @@ public class MakeTestCases {
...
@@ -91,7 +91,7 @@ public class MakeTestCases {
//数据回写
//数据回写
SheetUtils
sheet
=
new
SheetUtils
(
wenjianming
,
Sheet
);
SheetUtils
sheet
=
new
SheetUtils
(
wenjianming
,
Sheet
);
sheet
.
writeExcel
(
sheet
.
writeExcel
(
// s,
(
i
+
1
)+
""
,
(
i
+
1
)+
""
,
leiming
+
"_"
+
(
i
+
1
),
leiming
+
"_"
+
(
i
+
1
),
(
i
+
1
)+
""
,
(
i
+
1
)+
""
,
...
...
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