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
46d95e31
Commit
46d95e31
authored
Sep 08, 2020
by
zhaihuitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
46607fa6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
16 deletions
+6
-16
workspace.xml
.idea/workspace.xml
+0
-0
envcfg.py
config/envcfg.py
+1
-4
click.py
testcase/android_click/click.py
+2
-2
test_click.py
testcase/android_click/test_click.py
+3
-10
No files found.
.idea/workspace.xml
View file @
46d95e31
This diff is collapsed.
Click to expand it.
config/envcfg.py
View file @
46d95e31
...
...
@@ -14,10 +14,7 @@ import time
# 生产环境:
prod
=
{
"click"
:
{
"url"
:
"http://t.uri6.com/tkio/EFbIzya?noredirect=true"
,
"appkey"
:
"9b17c1568c3ce34599c5fd2778483ff9"
},
"click"
:
[
"http://t.uri6.com/tkio/EFbIzya?noredirect=true"
,
"9b17c1568c3ce34599c5fd2778483ff9"
],
"events"
:
{
"url"
:
"http://tlog.trackingio.com/receive/tkio/"
,
# "url": "http://10.3.20.42:8080",
...
...
testcase/android_click/click.py
View file @
46d95e31
...
...
@@ -61,14 +61,14 @@ for _ in range(1):
#timeout可以超时四秒
# verify = False
p
=
requests
.
get
(
url
=
prod
[
'click'
][
'url'
],
params
=
prod_params
,
timeout
=
30
,
verify
=
False
)
p
=
requests
.
get
(
url
=
prod
[
'click'
][
1
],
params
=
prod_params
,
timeout
=
30
,
verify
=
False
)
print
(
'success:'
,
s
)
# print(p.text)
print
(
'imei:'
,
randomUtil
.
r
.
randimei
())
except
requests
.
exceptions
.
RequestException
:
print
(
'wrong:'
,
w
)
print
(
'wrong:'
,
w
)
print
(
'imei:'
,
randomUtil
.
r
.
randimei
())
print
(
'ip'
,
randomUtil
.
r
.
randip
())
w
=
w
+
1
...
...
testcase/android_click/test_click.py
View file @
46d95e31
...
...
@@ -19,18 +19,11 @@ sys.path.append(base_path)
class
clickTestCase
(
unittest
.
TestCase
):
def
click
(
self
):
try
:
p
=
requests
.
get
(
url
=
prod
[
'click'
][
'url'
],
params
=
params_click
,
timeout
=
30
,
verify
=
False
)
# self.assertEqual(p.status_code, 200, msg='接口异常,请检查')
print
(
prod
[
'click'
][
'url'
])
def
testclick
(
self
):
p
=
requests
.
get
(
url
=
prod
[
'click'
][
1
],
params
=
params_click
,
timeout
=
30
,
verify
=
False
)
self
.
assertEqual
(
p
.
status_code
,
300
,
msg
=
'接口异常,请检查'
)
print
(
'执行结果:
\n
================='
)
print
(
p
)
print
(
'imei:'
,
randomUtil
.
r
.
randimei
())
except
requests
.
exceptions
.
RequestException
:
print
(
'imei:'
,
randomUtil
.
r
.
randimei
())
print
(
'ip'
,
randomUtil
.
r
.
randip
())
# time.sleep(7)
# try:
# allEvent().installUpload(randomUtil.r.randimei(), randomUtil.r.randip(), prod['events']['appkey'], prod['cmpaignid'])
...
...
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