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
fd547080
Commit
fd547080
authored
Jan 04, 2019
by
Li Yongyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
package 不能为空和长度限制判断的bug修改
parent
f8c75656
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
1 deletions
+39
-1
DataAll.xls
nwn_Api_auto_test/TestData/DataAll.xls
+0
-0
addAccount.java
nwn_Api_auto_test/src/com/offcn/api/nwn/addAccount.java
+1
-0
sign.java
nwn_Api_auto_test/src/com/offcn/api/nwn/process/sign.java
+1
-0
NWN.java
nwn_Api_auto_test/src/com/offcn/process/NWN.java
+15
-1
APITest_nwn.java
nwn_Api_auto_test/src/com/offcn/test/APITest_nwn.java
+22
-0
No files found.
nwn_Api_auto_test/TestData/DataAll.xls
View file @
fd547080
No preview for this file type
nwn_Api_auto_test/src/com/offcn/api/nwn/addAccount.java
View file @
fd547080
...
...
@@ -43,6 +43,7 @@ public class addAccount extends NWN implements API {
public
void
initialize
(
HashMap
<
String
,
Object
>
data
)
{
if
(!
isProduct
&&
data
.
get
(
"CleanDB"
).
toString
().
contains
(
"Y"
))
{
this
.
cleann_n_admin_card_no_List_FromDB
();
this
.
cleann_n_admin_card_no_List_FromDB_beforeTest
();
}
}
...
...
nwn_Api_auto_test/src/com/offcn/api/nwn/process/sign.java
View file @
fd547080
...
...
@@ -50,6 +50,7 @@ public class sign extends NWN implements API {
// n_admin_username_List.clear();
// user_id_List.clear();
this
.
cleann_n_admin_card_no_List_FromDB
();
this
.
cleann_n_admin_card_no_List_FromDB_beforeTest
();
this
.
cleann_n_package_List_FromDB
();
this
.
cleann_user_id_List_FromDB
();
}
...
...
nwn_Api_auto_test/src/com/offcn/process/NWN.java
View file @
fd547080
...
...
@@ -86,7 +86,21 @@ public class NWN extends BasicsGM{
}
}
public
void
cleann_n_admin_card_no_List_FromDB_beforeTest
()
{
try
{
deleteFromDB
(
"n_admin"
,
"card_no"
,
"qty50636"
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
Log
.
logInfo
(
"清除数据失败n_admin_card_no_List"
);
}
// System.out.println(user_idList.toString());
}
//清除注册数据根据n_admin_card_no_List
public
void
cleann_n_admin_card_no_List_FromDB
()
{
...
...
nwn_Api_auto_test/src/com/offcn/test/APITest_nwn.java
View file @
fd547080
...
...
@@ -29,6 +29,28 @@ import org.testng.annotations.Test;
@Listeners
({
ProcessTestng
.
class
,
ResultTestng
.
class
})
public
class
APITest_nwn
extends
NWN
{
@AfterClass
public
void
beforeClass
()
{
//测试结束删除测试所用的数据
if
(!
isClearMysql
)
{
this
.
cleann_n_admin_card_no_List_FromDB_beforeTest
();
this
.
cleann_n_package_List_FromDB
();
this
.
cleann_user_id_List_FromDB
();
this
.
cleann_getcode_id_List_FromDB
();
try
{
if
(
stmt
!=
null
){
stmt
.
close
();
}
if
(
conn
!=
null
){
conn
.
close
();
}
}
catch
(
SQLException
e
)
{
e
.
printStackTrace
();
}
}
Log
.
logInfo
(
"========测试结束========"
);
}
@Test
(
dataProvider
=
"renmai"
,
dataProviderClass
=
offcn_api_testData
.
class
)
public
void
f
(
HashMap
<
String
,
Object
>
data
)
{
...
...
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