Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tiku_APP_APITest
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
tiku_APP_APITest
Commits
6fa1b9df
Commit
6fa1b9df
authored
Nov 25, 2019
by
Thinkpad
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
6f3c727f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
17 deletions
+19
-17
APITest_tk.java
tiku_App/src/com/offcn/test/APITest_tk.java
+16
-15
MakeTestCases.java
tiku_App/src/makeTestCase/MakeTestCases.java
+1
-1
test.properties
tiku_App/src/resources/test.properties
+2
-1
No files found.
tiku_App/src/com/offcn/test/APITest_tk.java
View file @
6fa1b9df
...
@@ -53,6 +53,7 @@ public class APITest_tk extends BasicsGM{
...
@@ -53,6 +53,7 @@ public class APITest_tk extends BasicsGM{
//
//
String
parameter
=
MapUtil
.
getValue
(
"parameter"
,
data
);
String
parameter
=
MapUtil
.
getValue
(
"parameter"
,
data
);
Long
startTime
=
System
.
currentTimeMillis
();
Long
startTime
=
System
.
currentTimeMillis
();
Response
re
=
obj
.
SendRequest
(
data
,
data
.
get
(
"serviceUrl"
).
toString
(),
data
.
get
(
"Request"
).
toString
());
Response
re
=
obj
.
SendRequest
(
data
,
data
.
get
(
"serviceUrl"
).
toString
(),
data
.
get
(
"Request"
).
toString
());
Long
endTime
=
System
.
currentTimeMillis
();
Long
endTime
=
System
.
currentTimeMillis
();
...
@@ -88,21 +89,21 @@ public class APITest_tk extends BasicsGM{
...
@@ -88,21 +89,21 @@ public class APITest_tk extends BasicsGM{
//数据回写
//数据回写
/*
HashMap<String, Object> ExpectResult=MapUtil.Expect(data);
//
HashMap<String, Object> ExpectResult=MapUtil.Expect(data);
SheetUtils sheet = new SheetUtils("DataAll
.xls", "Output");
// SheetUtils sheet = new SheetUtils("DataAllMr
.xls", "Output");
sheet.writeExcel(
//
sheet.writeExcel(
data.get("NO").toString(),
//
data.get("NO").toString(),
data.get("TCNO").toString() + "_Step" + data.get("Step").toString(),
//
data.get("TCNO").toString() + "_Step" + data.get("Step").toString(),
data.get("Description").toString(),
//
data.get("Description").toString(),
parameter.length()>1000?"内容超长。":parameter,
//
parameter.length()>1000?"内容超长。":parameter,
JSONObject.fromObject(ExpectResult).toString(),
//
JSONObject.fromObject(ExpectResult).toString(),
StringUtils.decodeUnicode(re.asString().length()>10000?"内容超长。状态码:"+re.getStatusCode():re.asString()),
//
StringUtils.decodeUnicode(re.asString().length()>10000?"内容超长。状态码:"+re.getStatusCode():re.asString()),
codeORerrcode,
//
codeORerrcode,
msgORerrmsy,
//
msgORerrmsy,
result,
//
result,
time
//
time
);
//
);
*/
if
(
result
.
indexOf
(
"Fail"
)!=-
1
){
if
(
result
.
indexOf
(
"Fail"
)!=-
1
){
String
Expect1
=
data
.
get
(
"code"
)==
null
?
""
:
data
.
get
(
"code"
).
toString
();
String
Expect1
=
data
.
get
(
"code"
)==
null
?
""
:
data
.
get
(
"code"
).
toString
();
...
...
tiku_App/src/makeTestCase/MakeTestCases.java
View file @
6fa1b9df
...
@@ -35,7 +35,7 @@ public class MakeTestCases {
...
@@ -35,7 +35,7 @@ public class MakeTestCases {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
make
(
"TestData/CaseMake.xls"
,
"Sheet1"
,
"post"
,
"tk_3"
);
make
(
"TestData/CaseMake
Mr
.xls"
,
"Sheet1"
,
"post"
,
"tk_3"
);
}
}
...
...
tiku_App/src/resources/test.properties
View file @
6fa1b9df
xls
=
DataAll.xls
xls
=
DataAll
Mr
.xls
sheet
=
TestCase1
sheet
=
TestCase1
mysql_local_Online
=
local
mysql_local_Online
=
local
Percentage
=
60
Percentage
=
60
\ 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