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
42320cc6
Commit
42320cc6
authored
Sep 22, 2020
by
zhaihuitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
fff0b935
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
7 deletions
+8
-7
workspace.xml
.idea/workspace.xml
+0
-0
envcfg.py
config/envcfg.py
+2
-1
test_adclick.py
testcase/android_events/test_adclick.py
+2
-2
test_adshow.py
testcase/android_events/test_adshow.py
+2
-2
test_appduration.py
testcase/android_events/test_appduration.py
+2
-2
No files found.
.idea/workspace.xml
View file @
42320cc6
This diff is collapsed.
Click to expand it.
config/envcfg.py
View file @
42320cc6
...
@@ -28,7 +28,8 @@ prod_appkey = "895c5256a7f47bd2cca88a29da9e978a"
...
@@ -28,7 +28,8 @@ prod_appkey = "895c5256a7f47bd2cca88a29da9e978a"
event_interface
=
dict
(
install
=
'/receive/tkio/install'
,
loggedin
=
'/receive/tkio/loggedin'
,
event_interface
=
dict
(
install
=
'/receive/tkio/install'
,
loggedin
=
'/receive/tkio/loggedin'
,
pageduration
=
'/receive/tkio/pageduration'
,
payment
=
'/receive/tkio/payment'
,
pageduration
=
'/receive/tkio/pageduration'
,
payment
=
'/receive/tkio/payment'
,
order
=
'/receive/tkio/order'
,
register
=
'/receive/tkio/register'
,
order
=
'/receive/tkio/order'
,
register
=
'/receive/tkio/register'
,
startup
=
'/receive/tkio/startup'
,
event
=
'/receive/tkio/event'
)
startup
=
'/receive/tkio/startup'
,
event
=
'/receive/tkio/event'
,
appduration
=
'/receive/tkio/appduration'
,
adshow
=
'/receive/tkio/adshow'
,
adclick
=
'/receive/tkio/adclick'
)
prod
=
{
prod
=
{
...
...
testcase/android_events/test_adclick.py
View file @
42320cc6
...
@@ -9,13 +9,13 @@
...
@@ -9,13 +9,13 @@
import
unittest
import
unittest
import
json
import
json
import
requests
import
requests
from
config.envcfg
import
prod
,
headers
from
config.envcfg
import
prod
_event_url
,
headers
,
event_interface
from
config.prod.params
import
params_adclick
from
config.prod.params
import
params_adclick
class
adclickTestCase
(
unittest
.
TestCase
):
class
adclickTestCase
(
unittest
.
TestCase
):
def
testadclick
(
self
):
def
testadclick
(
self
):
r
=
requests
.
post
(
url
=
prod
[
'events'
][
'url'
]
+
prod
[
'events'
][
'adclick'
],
data
=
json
.
dumps
(
params_adclick
),
headers
=
headers
,
timeout
=
5
)
r
=
requests
.
post
(
url
=
prod
_event_url
+
event_interface
[
"adclick"
],
data
=
json
.
dumps
(
params_adclick
),
headers
=
headers
,
timeout
=
5
)
print
(
"广告点击:"
+
r
.
text
)
print
(
"广告点击:"
+
r
.
text
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
testcase/android_events/test_adshow.py
View file @
42320cc6
...
@@ -9,13 +9,13 @@
...
@@ -9,13 +9,13 @@
import
unittest
import
unittest
import
json
import
json
import
requests
import
requests
from
config.envcfg
import
prod
,
headers
from
config.envcfg
import
prod
_event_url
,
headers
,
event_interface
from
config.prod.params
import
params_adshow
from
config.prod.params
import
params_adshow
class
adshowTestCase
(
unittest
.
TestCase
):
class
adshowTestCase
(
unittest
.
TestCase
):
def
testadshow
(
self
):
def
testadshow
(
self
):
r
=
requests
.
post
(
url
=
prod
[
'events'
][
'url'
]
+
'adshow'
,
data
=
json
.
dumps
(
params_adshow
),
headers
=
headers
,
timeout
=
5
)
r
=
requests
.
post
(
url
=
prod
_event_url
+
event_interface
[
"adshow"
]
,
data
=
json
.
dumps
(
params_adshow
),
headers
=
headers
,
timeout
=
5
)
print
(
"
\n
广告展示:"
+
r
.
text
)
print
(
"
\n
广告展示:"
+
r
.
text
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
...
...
testcase/android_events/test_appduration.py
View file @
42320cc6
...
@@ -9,13 +9,13 @@
...
@@ -9,13 +9,13 @@
import
unittest
import
unittest
import
json
import
json
import
requests
import
requests
from
config.envcfg
import
prod
,
headers
from
config.envcfg
import
prod
_event_url
,
headers
,
event_interface
from
config.prod.params
import
params_appduration
from
config.prod.params
import
params_appduration
class
appdurationTestCase
(
unittest
.
TestCase
):
class
appdurationTestCase
(
unittest
.
TestCase
):
def
testappduration
(
self
):
def
testappduration
(
self
):
r
=
requests
.
post
(
url
=
prod
[
'events'
][
'url'
]
+
'appduration'
,
data
=
json
.
dumps
(
params_appduration
),
headers
=
headers
,
timeout
=
5
)
r
=
requests
.
post
(
url
=
prod
_event_url
+
event_interface
[
"appduration"
]
,
data
=
json
.
dumps
(
params_appduration
),
headers
=
headers
,
timeout
=
5
)
print
(
"App使用时长:"
+
r
.
text
)
print
(
"App使用时长:"
+
r
.
text
)
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