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
bcf1020a
Commit
bcf1020a
authored
Sep 27, 2020
by
zhaihuitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
42320cc6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
18 deletions
+30
-18
workspace.xml
.idea/workspace.xml
+0
-0
envcfg.py
config/envcfg.py
+5
-2
params.py
config/prod/params.py
+22
-13
test_register.py
testcase/android_events/test_register.py
+1
-1
test_startup.py
testcase/android_events/test_startup.py
+2
-2
No files found.
.idea/workspace.xml
View file @
bcf1020a
This diff is collapsed.
Click to expand it.
config/envcfg.py
View file @
bcf1020a
...
...
@@ -23,8 +23,11 @@ print(base_path)
prod_click_url
=
'http://uri6.com/tkio/Er6BFna'
prod_event_url
=
'http://log.trackingio.com'
prod_appkey
=
"895c5256a7f47bd2cca88a29da9e978a"
# prod_event_url = 'http://log.trackingio.com'
prod_event_url
=
'http://10.3.20.42:8080'
test_event_url
=
'http://10.3.20.42:8080'
# prod_appkey = "0d401839250deff23daf62fd49a444cb"
prod_appkey
=
"0d401839250deff23daf62fd49a444cb"
event_interface
=
dict
(
install
=
'/receive/tkio/install'
,
loggedin
=
'/receive/tkio/loggedin'
,
pageduration
=
'/receive/tkio/pageduration'
,
payment
=
'/receive/tkio/payment'
,
order
=
'/receive/tkio/order'
,
register
=
'/receive/tkio/register'
,
...
...
config/prod/params.py
View file @
bcf1020a
...
...
@@ -93,31 +93,40 @@ params_install = {
}
params_startup
=
{
#
'what': 'startup',
'what'
:
'startup'
,
'appid'
:
prod_appkey
,
'context'
:
{
'_deviceid'
:
"CFFEF74E-B6BF-BD16-E7F8-DFDBFF5FB6E1"
,
'_imei'
:
"cffef74e-b6bf-bd16-e7f8-dfdbff5fb6e1"
,
'_androidid'
:
"43214532142142"
,
#
'_imei': "cffef74e-b6bf-bd16-e7f8-dfdbff5fb6e1",
#
'_androidid': "43214532142142",
'_ip'
:
"119.57.108.226"
,
'_timestamp'
:
int
(
round
(
time
.
time
()
*
1000
)),
"_lib_version"
:
"1.5.0"
,
#
"_campaignid": 'default',
"_campaignid"
:
'default'
,
# "_deviceid": i,
# "_imei": i,
# # "_idfa": '75463565745634546
',
"_idfa"
:
'CFFEF74E-B6BF-BD16-E7F8-DFDBFF5FB6E1
'
,
# "_androidid": "424653325643",
# # "_imei2":"324323AAAA",
# # "_meid": "CCC324323",
# "_ip": IP,
# # "_ipv6": i,
# '_manufacturer': manufacturer,
# '_ryos': ryos,
# '_rydevicetype': rydevicetype,
# '_network': network,
# '_resolution': resolution,
# '_op': op,
# '_timestamp': current_time_13,
"_ipv6"
:
randomUtil
.
r
.
randip
(),
'_manufacturer'
:
"iphone"
,
'_ryos'
:
"IOS"
,
'_rydevicetype'
:
"iphone11"
,
'_network'
:
"wifi"
,
'_resolution'
:
"1344*750"
,
'_op'
:
"中国移动"
,
'_timestamp'
:
int
(
round
(
time
.
time
()
*
1000
)),
"sysfsize"
:
"128"
,
"_model"
:
"CHZN"
,
"sysram"
:
"6G"
,
"_ryosversion"
:
"iphone11"
,
"sysutime"
:
"2019-12-12"
,
"sysuname"
:
"apple"
,
"_carrier"
:
"中国电信"
,
"syscountryc"
:
"CN"
,
"sysrtime"
:
"2020-09-21"
# '_oaid': '999b6e3e-a274-ed22-cebf-2b6dddfc29b7'
# # '_mac':"565354131606"
...
...
testcase/android_events/test_register.py
View file @
bcf1020a
...
...
@@ -16,7 +16,7 @@ from config.prod.params import params_register
class
registerTestCase
(
unittest
.
TestCase
):
def
testregister
(
self
):
p
=
requests
.
post
(
url
=
prod_event_url
+
'register'
,
data
=
json
.
dumps
(
params_register
),
headers
=
headers
,
timeout
=
10
)
p
=
requests
.
post
(
url
=
prod_event_url
+
event_interface
[
"register"
]
,
data
=
json
.
dumps
(
params_register
),
headers
=
headers
,
timeout
=
10
)
# print("注册时间戳"+current_time_13)
print
(
"注册"
+
p
.
text
)
...
...
testcase/android_events/test_startup.py
View file @
bcf1020a
...
...
@@ -9,13 +9,13 @@
import
unittest
import
json
import
requests
from
config.envcfg
import
prod
,
headers
from
config.envcfg
import
test_event_url
,
headers
,
event_interface
from
config.prod.params
import
params_startup
class
startupTestCase
(
unittest
.
TestCase
):
def
teststartup
(
self
):
r
=
requests
.
post
(
url
=
prod
[
'events'
][
'url'
]
+
'startup'
,
data
=
json
.
dumps
(
params_startup
),
headers
=
headers
,
timeout
=
10
)
r
=
requests
.
post
(
url
=
test_event_url
+
event_interface
[
"startup"
]
,
data
=
json
.
dumps
(
params_startup
),
headers
=
headers
,
timeout
=
10
)
print
(
r
.
text
+
"
\n
"
+
r
.
url
)
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