Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
interfaceTest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
zhaihuitao
interfaceTest
Commits
59025f02
Commit
59025f02
authored
Jan 15, 2021
by
zhaihuitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
ccfb5114
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
workspace.xml
.idea/workspace.xml
+2
-1
run_all_cases.py
testcase/run_all_cases.py
+3
-8
No files found.
.idea/workspace.xml
View file @
59025f02
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
<component
name=
"ChangeListManager"
>
<component
name=
"ChangeListManager"
>
<list
default=
"true"
id=
"d0064643-2990-4ed3-bfb0-875849b30f4e"
name=
"Default"
comment=
"update"
>
<list
default=
"true"
id=
"d0064643-2990-4ed3-bfb0-875849b30f4e"
name=
"Default"
comment=
"update"
>
<change
beforePath=
"$PROJECT_DIR$/testcase/game/game_event.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/testcase/game/game_event.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/testcase/game/game_event.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/testcase/game/game_event.py"
afterDir=
"false"
/>
<change
beforePath=
"$PROJECT_DIR$/testcase/run_all_cases.py"
beforeDir=
"false"
afterPath=
"$PROJECT_DIR$/testcase/run_all_cases.py"
afterDir=
"false"
/>
</list>
</list>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"SHOW_DIALOG"
value=
"false"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
<option
name=
"HIGHLIGHT_CONFLICTS"
value=
"true"
/>
...
@@ -414,11 +415,11 @@
...
@@ -414,11 +415,11 @@
<method
v=
"2"
/>
<method
v=
"2"
/>
</configuration>
</configuration>
<list>
<list>
<item
itemvalue=
"Python.game_event"
/>
<item
itemvalue=
"Python.params"
/>
<item
itemvalue=
"Python.params"
/>
<item
itemvalue=
"Python.run_all_cases"
/>
<item
itemvalue=
"Python.run_all_cases"
/>
<item
itemvalue=
"Python tests.Nosetests for testcase.android_events._adclick.adclickTestCase.testadclick"
/>
<item
itemvalue=
"Python tests.Nosetests for testcase.android_events._adclick.adclickTestCase.testadclick"
/>
<item
itemvalue=
"Python tests.Nosetests for testcase.android_events._adshow.adshowTestCase.testadshow"
/>
<item
itemvalue=
"Python tests.Nosetests for testcase.android_events._adshow.adshowTestCase.testadshow"
/>
<item
itemvalue=
"Python.game_event"
/>
</list>
</list>
<recent_temporary>
<recent_temporary>
<list>
<list>
...
...
testcase/run_all_cases.py
View file @
59025f02
...
@@ -15,12 +15,6 @@ importlib.reload(sys)
...
@@ -15,12 +15,6 @@ importlib.reload(sys)
import
json
import
json
IMEI
=
json
.
load
(
open
(
'imei.json'
,
'r+'
))[
'imei'
]
+
1
json
.
dump
({
"imei"
:
IMEI
},
open
(
'imei.json'
,
'w+'
),
sort_keys
=
True
,
indent
=
4
)
print
(
IMEI
)
"""解决在Jenkins控制台无法打印中文的问题"""
"""解决在Jenkins控制台无法打印中文的问题"""
os
.
environ
[
'NLS_LANG'
]
=
'Simplified Chinese_CHINA.ZHS16GBK'
os
.
environ
[
'NLS_LANG'
]
=
'Simplified Chinese_CHINA.ZHS16GBK'
...
@@ -36,11 +30,12 @@ case_path = os.path.join(os.getcwd())
...
@@ -36,11 +30,12 @@ case_path = os.path.join(os.getcwd())
report_path
=
r"/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/report/result.html"
report_path
=
r"/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/report/result.html"
'''
def all_case():
def
all_case
():
discover
=
unittest
.
defaultTestLoader
.
discover
(
case_path
,
"test*.py"
)
discover
=
unittest
.
defaultTestLoader
.
discover
(
case_path
,
"test*.py"
)
print
(
discover
)
print
(
discover
)
return
discover
return
discover
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
fp
=
open
(
report_path
,
'wb'
)
fp
=
open
(
report_path
,
'wb'
)
runner
=
HTMLTestReportCN
.
HTMLTestRunner
(
runner
=
HTMLTestReportCN
.
HTMLTestRunner
(
...
@@ -52,7 +47,7 @@ if __name__ == "__main__":
...
@@ -52,7 +47,7 @@ if __name__ == "__main__":
runner
.
run
(
all_case
())
runner
.
run
(
all_case
())
"""在控制台打印日志"""
"""在控制台打印日志"""
unittest
.
TextTestRunner
(
verbosity
=
0
)
.
run
(
all_case
())
unittest
.
TextTestRunner
(
verbosity
=
0
)
.
run
(
all_case
())
fp.close()
'''
fp
.
close
()
'''if __name__ == "__main__":
'''if __name__ == "__main__":
...
...
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