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
ce8e63a2
Commit
ce8e63a2
authored
Dec 04, 2018
by
shuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug后首次提交
parent
5fd8f9a1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
4 deletions
+38
-4
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
+5
-2
sign.java
nwn_Api_auto_test/src/com/offcn/api/nwn/process/sign.java
+12
-0
NWN.java
nwn_Api_auto_test/src/com/offcn/process/NWN.java
+18
-0
test.properties
nwn_Api_auto_test/src/resources/test.properties
+2
-1
No files found.
nwn_Api_auto_test/TestData/DataAll.xls
View file @
ce8e63a2
No preview for this file type
nwn_Api_auto_test/src/DefectTest.xml
View file @
ce8e63a2
...
...
@@ -6,7 +6,7 @@
<classes>
<class
name=
"com.puhui.test.RenMai_APITest"
>
<methods>
<include
name=
"f"
invocation-numbers=
"
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
"
/>
<include
name=
"f"
invocation-numbers=
""
/>
</methods>
</class>
</classes>
...
...
nwn_Api_auto_test/src/com/offcn/api/nwn/addAccount.java
View file @
ce8e63a2
...
...
@@ -51,13 +51,16 @@ public class addAccount extends NWN implements API {
// 获取parameter对应的内容
parameter
=
MapUtil
.
getValue
(
"parameter"
,
data
);
card_no
=
MapUtil
.
getParameter
(
parameter
,
"card_no"
).
trim
();
// phone = MapUtil.getParameter(parameter, "phon
e").trim();
username
=
MapUtil
.
getParameter
(
parameter
,
"usernam
e"
).
trim
();
if
((!
card_no
.
equals
(
""
))
&&
card_no
.
equals
(
"code"
))
{
card_no
=
"lgd58408"
;
//从sso数据库中查询的已激活账户,作为备用账户使用
parameter
=
parameter
.
replace
(
"\"card_no\":code"
,
"\"card_no\":\""
+
card_no
+
"\""
);
}
if
((!
username
.
equals
(
""
))
&&
username
.
equals
(
"random"
))
{
username
=
"1391"
+(
new
Random
().
nextInt
(
9000000
)+
1000000
);
parameter
=
parameter
.
replace
(
"\"username\":random"
,
"\"username\":\""
+
username
+
"\""
);
}
data
.
put
(
"parameter"
,
parameter
);
return
data
;
...
...
nwn_Api_auto_test/src/com/offcn/api/nwn/process/sign.java
View file @
ce8e63a2
...
...
@@ -37,6 +37,18 @@ public class sign extends NWN implements API {
public
void
initialize
(
HashMap
<
String
,
Object
>
data
)
{
if
(!
isProduct
&&
data
.
get
(
"CleanDB"
).
toString
().
contains
(
"Y"
))
{
NWN
.
PHPSESSID
=
""
;
// nwn_sign="";
// admin_login_ssid="";
// nwn_url="";
// admin_31_encode="";
level_id_List
=
""
;
//
// n_package_idList.clear();
// n_admin_card_no_List.clear();
// n_admin_id_List.clear();
// n_admin_phone_List.clear();
// n_admin_username_List.clear();
// user_id_List.clear();
this
.
cleann_n_admin_card_no_List_FromDB
();
this
.
cleann_n_package_List_FromDB
();
this
.
cleann_user_id_List_FromDB
();
...
...
nwn_Api_auto_test/src/com/offcn/process/NWN.java
View file @
ce8e63a2
...
...
@@ -103,6 +103,24 @@ public class NWN extends BasicsGM{
// System.out.println(user_idList.toString());
}
//清除注册数据根据
// public void cleann_n_admin_card_id_List_FromDB() {
// List<String> user_List = new ArrayList<String>();
// for(int i=0;i<n_admin_card_no_List.size();i++){
// try {
// deleteFromDB("n_admin", "card_no", n_admin_card_no_List.get(i));
// user_List.add(n_admin_card_no_List.get(i));
// } catch (Exception e) {
// e.printStackTrace();
// Log.logInfo("清除数据失败n_admin_card_no_List");
// }
//
// }
// n_admin_card_no_List.removeAll(user_List);
//// System.out.println(user_idList.toString());
// }
//清除注册数据根据n_package_idList
public
void
cleann_n_package_List_FromDB
()
{
List
<
String
>
user_List
=
new
ArrayList
<
String
>();
...
...
nwn_Api_auto_test/src/resources/test.properties
View file @
ce8e63a2
xls
=
DataAll.xls
sheet
=
TestCase
2
sheet
=
TestCase
4
mysql_local_Online
=
local
\ No newline at end of file
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