Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tkio-test-case
Project
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
liuxiaoxing
tkio-test-case
Commits
39217a44
Commit
39217a44
authored
Apr 28, 2022
by
liuxiaoxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微服务测试用例
parent
6211af47
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
523 additions
and
405 deletions
+523
-405
click.py
android_click/click.py
+25
-16
android_script.py
android_event/android_script.py
+18
-19
android_fenlianjie.py
android_event_case/android_fenlianjie.py
+8
-7
android_fenlianjie.py
fenbao_android_event_case/android_fenlianjie.py
+7
-7
click.py
ios_click/click.py
+17
-17
ios_script.py
ios_event/ios_script.py
+48
-47
ios_fenlianjie.py
ios_event_case/ios_fenlianjie.py
+8
-8
attributioncase.py
microservices/attributioncase.py
+51
-51
attributioncaseios.py
microservices/attributioncaseios.py
+101
-48
receiveandroid.py
microservices/receiveandroid.py
+35
-15
receiveios.py
microservices/receiveios.py
+13
-4
redirectandroid.py
microservices/redirectandroid.py
+135
-112
redirectios.py
microservices/redirectios.py
+44
-41
dp.py
yanchidp/dp.py
+1
-2
dp_diaoyong.py
yanchidp/dp_diaoyong.py
+12
-11
No files found.
android_click/click.py
View file @
39217a44
...
...
@@ -14,20 +14,20 @@ import hashlib
# from jiami.md5 import get_str_sha1_secret_str
# 向短链发送点击数据
# 广告创意ID
ry_adcreative_id
=
'
333
'
ry_adcreative_id
=
'
767556
'
# 广告组ID
ry_adgroup_id
=
'
333
'
ry_adgroup_id
=
'
564534
'
# 广告计划ID
ry_adplan_id
=
'3
33
'
ry_adplan_id
=
'3
453534
'
# 广告组名称
ry_adgroup_name
=
'
新版测试-广告组
'
ry_adgroup_name
=
'
snktt-cz
'
# 广告计划名称
ry_adplan_name
=
'
新版测试-计划
'
ry_adplan_name
=
'
snktt-czx-pt-s
'
# 广告创意名称
ry_adcreative_name
=
'
新版测试创意
'
ry_adcreative_name
=
'
snktt-czx-p
'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid
=
'rryingxiao_int'
URL
=
'http://
10.2.20.42:8083/tkio/faeQZf
a?noredirect=true'
URL
=
'http://
uri6.com/tkio/NJVNja
a?noredirect=true'
# 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
# URL = 'http://uri6.com/adapt/encryp/love.match.set-bytedance?noredirect=true&pid=rryingxiao_int&callback=D8311DBF28D751F327B83F7CEE5B8850B88CC74C8C3FF628EB3A48CAE2212EE260EE347E1771382C5F1B2C0FC9E8921CB5245576D7E5C1EF680315AAA98DCFB189F66FBA49CC7BCB8E4B4726D6D363B816BB2133CADC80B1C12D9FE464A05ED974A70A646BAB1D4D78E2A75361676D5A0D3D4E52B7E7C6B72E9388C17FE9384BE1A47503AABEFB9423727DBAC7B7275AAD237E0E2774D2A8C3D0FDC895CE10C0CCE38F8FEDBC24AF2E23B2B5E742B50C07744361334E148979087917DFFFC445A74B9F939412DEF8D060474E1D353ED7E2EB636B32CADF29842BB90E2131BD3ED05D1A0438EA0EA8577613780B3D64377D85E758A2B20507A034A2C8A96077C7E200C410188C78F76B9B5E7F3E5E4AC3'
...
...
@@ -40,7 +40,12 @@ URL = 'http://10.2.20.42:8083/tkio/faeQZfa?noredirect=true'
# 7e3aa681f68435b3f74de790d6424690
# 4eab4be709defbfc2cc85826b09caea0
# 6ba2b016f280004d10a1a354e426eceb
appkey
=
'99624d617e08b7be64a600b56c7af335'
# md5加密
def
computeMD5upper
(
message
):
m
=
hashlib
.
md5
()
m
.
update
(
message
.
encode
(
encoding
=
'utf-8'
))
return
m
.
hexdigest
()
.
upper
()
appkey
=
'8a390227254c03dbcaddbca009cd6e8b'
lst
=
[]
nowTime
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
s
=
0
...
...
@@ -78,12 +83,13 @@ for index in range(1):
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '156.119.456.19
9
'
# ip = '156.119.456.19
0
'
try
:
parms
=
{
'click_time'
:
str
(
round
(
time
.
time
()
*
1000
)),
# 'androidid': '86ab7f6642bdde717709216e68d0b',
'imei'
:
i
,
'imei_MD5'
:
computeMD5upper
(
i
),
# 'campuuid': '@#¥%……&……%¥#@#¥%&……&*****',
# 'clickid': '测试测试',
# "idfa": '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30',
...
...
@@ -103,9 +109,9 @@ for index in range(1):
# 'ry_adgroup_name': ry_adgroup_name,
# 'ry_adplan_name': ry_adplan_name,
# 'ry_adcreative_name': ry_adcreative_name,
"ry_adgroup_id"
:
ry_adgroup_id
,
"ry_adplan_id"
:
ry_adplan_id
,
"ry_adcreative_id"
:
ry_adcreative_id
,
#
"ry_adgroup_id": ry_adgroup_id,
#
"ry_adplan_id": ry_adplan_id,
#
"ry_adcreative_id": ry_adcreative_id,
# 'imei2': 'null',
# 'meid': i
# 'bd_vid': i
...
...
@@ -146,6 +152,8 @@ for index in range(1):
# verify = False
p
=
requests
.
get
(
url
=
URL
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
'imei:'
,
i
)
print
(
'imeimd5:'
,
computeMD5upper
(
i
))
print
(
"ip:"
,
ip
)
# print("accountid:", accountid)
print
(
p
.
text
)
...
...
@@ -166,7 +174,7 @@ for index in range(1):
# print('androidid', a)
w
=
w
+
1
# time.sleep(1
3
)
# time.sleep(1
0
)
# try:
# allEvent().installUpload(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey)
...
...
@@ -174,14 +182,14 @@ for index in range(1):
# except Exception:
# print('install_wrong:', w)
# w = w + 1
#
#
# time.sleep(5)
# try:
# allEvent().registerEvent(i, ip, appkey)
# except Exception as e:
# print('注册_wrong:', w)
#
#
print(e)
# print(e)
# time.sleep(4)
# try:
# allEvent().loginEvent(i, ip, appkey)
...
...
@@ -198,6 +206,7 @@ for index in range(1):
# allEvent().payorder(i, ip, appkey)
# except Exception:
# print('订单_wrong:', w)
# time.sleep(10)
# try:
# allEvent().invoke_test(i, ip, appkey)
# except Exception:
...
...
android_event/android_script.py
View file @
39217a44
...
...
@@ -68,9 +68,7 @@ class allEvent:
s
=
json
.
dumps
({
# "what":'install',
"appid"
:
appkey
,
# "appType": "wap",
"context"
:
{
# "_apptype": "wap",
"_carrier"
:
carrier
,
"_networkwhat_type"
:
network_type
,
"_ryosversion"
:
ryosversion
,
...
...
@@ -78,15 +76,15 @@ class allEvent:
"_pkgname"
:
"com.yanjing.yami"
,
# "_campaignid": 'default',
"_deviceid"
:
i
,
# "_imei": i
,
'_oaid'
:
'697134960e9ff8df46f21b4f97db595a1'
,
"_rdid"
:
'09DA91D0664C33DA7BEE7294CCCCCA07'
,
"_imei"
:
'E83DC0B76BC1691CB9C45E5A63468660'
,
#
'_oaid': '697134960e9ff8df46f21b4f97db595a1',
#
"_rdid": '09DA91D0664C33DA7BEE7294CCCCCA07',
# 'ua': 'Mozilla/5.0 (Linux; U; Android 7.0; zh-CN; Nexus 5X Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/40.0.2214.89 UCBrowser/11.4.5.937 Mobile Safari/537.36',
"idfa"
:
i
,
#
"idfa": i,
# "_current_caid": "00_A0FF634AEDF1403205A4A6A1118CDA61_A66338F33BEBB40F5CD65F198AF2F40C",
# "gxid": "876543567543565",
# "_idfv": i,
"_androidid"
:
'86ab7f6642bdde717709216e68d0b'
,
#
"_androidid": '86ab7f6642bdde717709216e68d0b',
# "_imei2":"324323AAAA",
# "_meid": "CCC324323",
"_ip"
:
IP
,
...
...
@@ -158,7 +156,7 @@ class allEvent:
# "_deviceid": "5C70287B-27F5-4AC3-9E9C-2D67B8CF1065"
},
'when'
:
'2021-01-17 23:59:36'
,
'when'
:
time
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
,
time
.
localtime
(
time
.
time
()))
,
# time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))
# 'ds': ds,
'who'
:
'lxx_test'
...
...
@@ -350,7 +348,9 @@ class allEvent:
def
payorder
(
self
,
i
,
IP
,
appkey
):
# 订单号
transactionid
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
19
))
# transactionid = ''.join(str(random.choice(range(10))) for _ in range(19))
transactionid
=
'765432454364342'
s
=
json
.
dumps
({
'what'
:
'order'
,
'appid'
:
appkey
,
...
...
@@ -409,17 +409,17 @@ class allEvent:
p
=
requests
.
post
(
url
=
URL
+
'event'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
print
(
"自定义"
+
p
.
text
)
# 自定义事件
# 自定义事件
def
invoke_test
(
self
,
i
,
IP
,
appkey
):
s
=
json
.
dumps
({
"what"
:
"invoke"
,
"appType"
:
""
,
"appid"
:
appkey
,
"context"
:
{
"_campaignid"
:
"_default_"
,
#
"_campaignid": "_default_",
"_rydevicetype"
:
"iPhone"
,
"_ip"
:
IP
,
# '_oaid':'7c5c102b782c33e',
"_ryosversion"
:
ryosversion
,
"_manufacturer"
:
"苹果"
,
"frequency"
:
"0.000"
,
...
...
@@ -428,26 +428,25 @@ class allEvent:
"_deviceid"
:
i
,
"_device_gps"
:
"unknown"
,
"_jbk"
:
"0"
,
"_timestamp"
:
"1565941809351"
,
"_timestamp"
:
current_time_13
,
"_imei"
:
i
,
# "_idfa": "DBC43622-E34B-440C-B7A7-FB6641D0D9AB",
"_idfv"
:
i
,
#
"_idfv": i,
"_lib_version"
:
lv
,
"_carrier"
:
carrier
,
"_ry_ts"
:
"1565941809416"
,
"_create_timestamp"
:
"1565941809351"
,
"_ry_ts"
:
current_time_13
,
"_create_timestamp"
:
current_time_13
,
"_tz"
:
"+8"
,
"_pkgname"
:
"com.reyun.sdktrackingtest"
,
"_ipv6"
:
"fe80::1cf8:ea60:3508:1dc2"
,
"modify"
:
"0"
,
# "_ry_origin_when": "2019-08-16 15:50:09",
"_resolution"
:
"736*414"
,
"_ryos"
:
"
iOS
"
,
"_ryos"
:
"
android
"
,
"_model"
:
model
,
# "_mac": "02:00:00:00:00:00",
"_network_type"
:
"WIFI"
,
# "_androidid": "5432453421342654",
"_lats"
:
"1"
},
"where"
:
"event"
,
...
...
@@ -458,8 +457,8 @@ class allEvent:
p
=
requests
.
post
(
url
=
URL
+
'event'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
print
(
"自定义"
+
p
.
text
)
# 广告展示
# 广告展示
def
adshow
(
self
,
i
,
IP
,
appkey
,
adid
):
s
=
json
.
dumps
({
"appid"
:
appkey
,
...
...
android_event_case/android_fenlianjie.py
View file @
39217a44
...
...
@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活
appkey
=
'
f3f4db967187590e6c0b5cc158106788
'
appkey
=
'
ae6f9fb7e7bc336bffb63de711c7bec0
'
# 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd
...
...
@@ -27,6 +27,7 @@ appkey = 'f3f4db967187590e6c0b5cc158106788'
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# allEvent().payEvent(i, ip, appkey)
for
index
in
range
(
1
):
# 随机生成12为数组
s
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
18
))
...
...
@@ -37,18 +38,18 @@ for index in range(1):
# p = '987654321234567'
# s = '2321321312h8ro321'
#
i = ''.join(str(random.choice(range(10))) for _ in range(12))
i
=
'583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30
'
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
# i = '885709229829
'
# i = '00000000-0000-0000-0000-000000000000'
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '1
2.23.21.2
'
# ip = '1
10.186.108.28
'
# 地域测试ip
# 60.13.148.23 新疆维吾尔自治区吐鲁番市
# 61.139.239.255 广西壮族自治区北海市
# 119.60.0.0 宁夏回族自治区银川市
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
#
time.sleep(1)
time
.
sleep
(
1
)
allEvent
()
.
startupEvent
(
i
,
ip
,
appkey
)
# # time.sleep(1)
# allEvent().loginEvent(i, ip, appkey)
...
...
@@ -60,7 +61,7 @@ for index in range(1):
# time.sleep(1)
# num = index + 1
# event = 'event_' + str(num)
# event = 'event_10'
#
#
event = 'event_10'
# allEvent().ziding_event(i, ip, appkey, event)
# print(s)
# s = int(s) + 1
...
...
@@ -69,7 +70,7 @@ for index in range(1):
# allEvent().adclick(i,ip,appkey,adid)
# allEvent().pageduration(i,ip,appkey,se,p)
# allEvent().appduration(i,ip,appkey,s)
# allEvent().invoke_te
w
st(i,ip,appkey)
# allEvent().invoke_test(i,ip,appkey)
# allEvent().retentionEvent(i, ip, appkey)
#
# allEvent().formevent(i,ip,appkey)
...
...
fenbao_android_event_case/android_fenlianjie.py
View file @
39217a44
...
...
@@ -10,24 +10,24 @@ appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
# 4b25b8a4dc584e63e9a7b81c3adedf2f
# event = 'event_10'
cmpaignid
=
'
233445
'
cmpaignid
=
'
112233
'
for
index
in
range
(
1
):
# 随机生成12为数组
#
i = ''.join(str(random.choice(range(10))) for _ in range(12))
i
=
'691007221237'
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
#
i = '691007221237'
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '143.205.125.236'
#
allEvent().installUpload(i, ip, appkey, cmpaignid)
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
,
cmpaignid
)
# time.sleep(3)
# allEvent().loginEvent(i, ip, appkey)
allEvent
()
.
orderEvent
(
i
,
ip
,
appkey
)
time
.
sleep
(
1
)
#
allEvent().orderEvent(i, ip, appkey)
#
time.sleep(1)
# num = index + 1
# event = 'event_' + str(num)
# allEvent().ziding_event(i, ip, appkey,event)
allEvent
()
.
payEvent
(
i
,
ip
,
appkey
)
#
allEvent().payEvent(i, ip, appkey)
# allEvent().registerEvent(i, ip, appkey)
# allEvent().invoke_test(i, ip, appkey,cmpaignid)
...
...
ios_click/click.py
View file @
39217a44
...
...
@@ -8,10 +8,10 @@ import string
#向短链发送点击数据
#渠道短链
URL
=
'http://
10.2.20.42:8083/tkio/zemI32a?
noredirect=true'
appkey
=
'
f3f4db967187590e6c0b5cc158106788
'
URL
=
'http://
uri6.com/tkio/vMn2eea?callback_param=CL7A6NrdsYkDEJvwi8jjsYkDGIuiwN6i9QQgwtWF84UCKIPAq-za2ogDMAw4wbgCQiIyMDIyMDQxNjIzMzM1MjAxMDEzMzEyNjE0NzBEM0VCRkMySMG4AlAAiAECkAECmAEAcallback=http
%3
A
%2
F
%2
Fad.toutiao.com
%2
Ftrack
%2
Factivate
%2
F
%3
Fcallback
%3
DCL7A6NrdsYkDEJvwi8jjsYkDGIuiwN6i9QQgwtWF84UCKIPAq-za2ogDMAw4wbgCQiIyMDIyMDQxNjIzMzM1MjAxMDEzMzEyNjE0NzBEM0VCRkMySMG4AlAAiAECkAECmAEA
%26
os
%3
D1
%26
muid
%3
DA76A313F-A1D6-4BED-8C21-C16B2EEFC618&noredirect=true&ry_dp=true&rydp_path=null&rydp_url=https
%3
A
%2
F
%2
F123&
noredirect=true'
appkey
=
'
3f2706b7afdf89d95ffa7d2e9cc13e2e
'
# URL = 'http://172.31.19.255:8083/tkio/VNNjQra'
event
=
'
event_1
'
event
=
'
invoke
'
# 广告创意ID
ry_adcreative_id
=
'8886453253'
# 广告组ID
...
...
@@ -91,14 +91,14 @@ for _ in range(1):
print
(
'idfa:'
,
i
)
print
(
'ip'
,
ip
)
w
=
w
+
1
time
.
sleep
(
10
)
try
:
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
# allEvent().formevent(i, ip, appkey)
except
Exception
:
print
(
'install_wrong:'
,
w
)
w
=
w
+
1
#
time.sleep(10)
#
try:
#
allEvent().installUpload(i, ip, appkey)
#
# allEvent().formevent(i, ip, appkey)
#
#
except Exception:
#
print('install_wrong:', w)
#
w = w + 1
# time.sleep(3)
# try:
# allEvent().adshow(i, ip, appkey,adid)
...
...
@@ -146,12 +146,12 @@ for _ in range(1):
# allEvent().loginEvent(i, ip, appkey)
# except Exception:
# print('登录_wrong:', w)
# time.sleep(5
)
#
try:
#
allEvent().ziding_event(i, ip, appkey, event)
#
except Exception as err:
#
print(err)
#
print('自定义_wrong:', w)
time
.
sleep
(
10
)
try
:
allEvent
()
.
ziding_event
(
i
,
ip
,
appkey
,
event
)
except
Exception
as
err
:
print
(
err
)
print
(
'自定义_wrong:'
,
w
)
#
# time.sleep(10)
# try:
...
...
ios_event/ios_script.py
View file @
39217a44
...
...
@@ -7,8 +7,8 @@ import random
headers
=
{
'Content-Type'
:
'application/json'
}
URL
=
'http://10.2.20.42:8080/receive/tkio/'
#
URL = 'http://log.trackingio.com/receive/tkio/'
#
URL = 'http://10.2.20.42:8080/receive/tkio/'
URL
=
'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
#时间戳
...
...
@@ -91,50 +91,50 @@ class allEvent:
# 3.download + deviceId有归因结果asa_install_type = old_download对应1
# 4.download + deviceId无归因结果asa_install_type = new_download对应2
# # 转化类型,新增或重装,Download 或 Redownload
#
"iad-conversion-type": "Download",
#
#
#
广告活动组ID(campaign group id)
# "iad-org-id": "432432432
",
#
#
广告活动组名称(campaign group name)
#
"iad-org-name": "name",
#
#
#
广告活动ID
#
"iad-campaign-id": "111",
#
#
广告活动名称
#
"iad-campaign-name": "CampaignName",
#
#
#
#
广告组ID
#
"iad-adgroup-id": "111111",
#
#
广告组名称
#
"iad-adgroup-name": "AdGroupName",
#
#
#
#
关键词 id
#
"iad-keyword-id": "111",
#
#
关键词
#
"iad-keyword": "Keyword",
#
#
#
#
素材ID
#
"iad-creativeset-id": "111",
#
#
素材名称
#
"iad-creativeset-name": "CreativeSetName",
#
#
#
点击ASA广告时间
#
"iad-click-date": '2021-06-24T11:32:33Z',
#
#
本次下载完成的时间(仅ASA转化时,该值传且必传)
#
"iad-conversion-date": when,
#
#
#
Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配
#
#
关键词匹配类型
#
"iad-keyword-matchtype": "SearchMatch",
#
#
首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间)
#
"iad-purchase-date": '2021-06-24T11:32:33Z',
#
#
归因结果
#
"iad-attribution": "true",
#
#
国家
#
"iad-country-or-region": "US",
"iad-conversion-type"
:
"Download"
,
# 广告活动组ID(campaign group id)
"iad-org-id"
:
"123456789
"
,
# 广告活动组名称(campaign group name)
"iad-org-name"
:
"name"
,
# 广告活动ID
"iad-campaign-id"
:
"111"
,
# 广告活动名称
"iad-campaign-name"
:
"CampaignName"
,
# 广告组ID
"iad-adgroup-id"
:
"111111"
,
# 广告组名称
"iad-adgroup-name"
:
"AdGroupName"
,
# 关键词 id
"iad-keyword-id"
:
"111"
,
# 关键词
"iad-keyword"
:
"Keyword"
,
# 素材ID
"iad-creativeset-id"
:
"111"
,
# 素材名称
"iad-creativeset-name"
:
"CreativeSetName"
,
# 点击ASA广告时间
"iad-click-date"
:
'2021-06-24T11:32:33Z'
,
# 本次下载完成的时间(仅ASA转化时,该值传且必传)
"iad-conversion-date"
:
when
,
# Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配
# 关键词匹配类型
"iad-keyword-matchtype"
:
"SearchMatch"
,
#首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间)
"iad-purchase-date"
:
'2021-06-24T11:32:33Z'
,
# 归因结果
"iad-attribution"
:
"true"
,
# 国家
"iad-country-or-region"
:
"US"
,
# 'asa_install_time':'2021-06-24T11:32:33Z',
...
...
@@ -385,7 +385,8 @@ class allEvent:
'_ryosversion'
:
ryosversion
,
'__model'
:
'jixing'
,
"_lib_version"
:
lv
,
'_key_action_category'
:
'1'
,
'_key_action_threshold'
:
'15'
,
'_key_action_category'
:
'1'
,
'_key_action_threshold'
:
'15'
,
# 识别是否为自定义事件,默认传1
'_isreyundefaultevent'
:
'1'
},
...
...
ios_event_case/ios_fenlianjie.py
View file @
39217a44
...
...
@@ -6,10 +6,10 @@ import string
import
time
#iOS常规渠道激活
appkey
=
'
44b56e7b7369d13643ec8961f6998b
9b'
appkey
=
'
6012db28b7fbdfcb1e3a847756137f
9b'
event
=
'event_1'
for
index
in
range
(
1
):
for
index
in
range
(
30
):
# 随机生成12为数组
a
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
8
))
b
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
...
...
@@ -17,14 +17,14 @@ for index in range(1):
d
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
e
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
12
))
#
i = (a + "-" + b + "-" + c + "-" + d + "-" + e).upper()
i
=
'583D2BB0-B19C-4A9A-A600-2A1EB2FB7E39'
i
=
(
a
+
"-"
+
b
+
"-"
+
c
+
"-"
+
d
+
"-"
+
e
)
.
upper
()
#
i = '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E39'
print
(
i
)
adid
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '61.192.125.69'
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
#
allEvent().installUpload(i,ip,appkey)
# allEvent().startupEvent(i, ip, appkey)
# time.sleep(10)
# allEvent().loginEvent(i, ip, appkey)
...
...
@@ -33,9 +33,9 @@ for index in range(1):
# time.sleep(1)
# allEvent().payorder(i, ip, appkey)
# time.sleep(3)
#
num = index + 1
#
event = 'event_' + str(num)
#
allEvent().ziding_event(i, ip, appkey, event)
num
=
index
+
1
event
=
'event_'
+
str
(
num
)
allEvent
()
.
ziding_event
(
i
,
ip
,
appkey
,
event
)
# print(event)
# allEvent().adshow(i,ip,appkey,adid)
# allEvent().adclick(i,ip,appkey,adid)
...
...
microservices/attributioncase.py
View file @
39217a44
...
...
@@ -62,7 +62,7 @@ def code_Nums(n=6):
# device_id取值顺序-oaid不为空,取oaid
def
test_qz1
():
redirectandroid
.
parms
[
'oaid'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
print
(
i
)
...
...
@@ -72,7 +72,7 @@ def test_qz2():
redirectandroid
.
parms
[
'imei2'
]
=
o
redirectandroid
.
parms
[
'mac'
]
=
m
redirectandroid
.
parms
[
'android_id'
]
=
q
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
print
(
i
)
...
...
@@ -81,7 +81,7 @@ def test_qz3():
redirectandroid
.
parms
[
'imei2'
]
=
i
redirectandroid
.
parms
[
'mac'
]
=
m
redirectandroid
.
parms
[
'android_id'
]
=
q
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
print
(
i
)
...
...
@@ -89,21 +89,21 @@ def test_qz3():
def
test_qz4
():
redirectandroid
.
parms
[
'mac'
]
=
m
redirectandroid
.
parms
[
'android_id'
]
=
q
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
print
(
m
)
# device_id取值顺序-oaid,imei1,imei2,mac为空,android_id,ipv4不为空,取android_id
def
test_qz5
():
redirectandroid
.
parms
[
'android_id'
]
=
q
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
print
(
q
)
# device_id取值顺序-oaid,imei1,imei2,mac,android_id为空,ipv4不为空,取ipv4
def
test_qz6
():
redirectandroid
.
parms
[
'ipv4'
]
=
ip
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
print
(
ip
)
...
...
@@ -118,7 +118,7 @@ def test_qz7():
redirectandroid
.
parms
[
'gaid_md5'
]
=
computeMD5
(
g
)
redirectandroid
.
parms
[
'mac_md5'
]
=
computeMD5
(
m
)
redirectandroid
.
parms
[
'android_id_md5'
]
=
computeMD5
(
a
)
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
print
(
i
)
print
(
computeMD5
(
i
))
...
...
@@ -131,7 +131,7 @@ def test_qz8():
redirectandroid
.
parms
[
'gaid_md5'
]
=
computeMD5
(
g
)
redirectandroid
.
parms
[
'mac_md5'
]
=
computeMD5
(
m
)
redirectandroid
.
parms
[
'android_id_md5'
]
=
computeMD5
(
a
)
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
print
(
i
)
print
(
computeMD5
(
i
))
...
...
@@ -142,7 +142,7 @@ def test_qz9():
redirectandroid
.
parms
[
'gaid_md5'
]
=
computeMD5
(
g
)
redirectandroid
.
parms
[
'mac_md5'
]
=
computeMD5
(
m
)
redirectandroid
.
parms
[
'android_id_md5'
]
=
computeMD5
(
a
)
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
print
(
computeMD5
(
i2
))
...
...
@@ -152,7 +152,7 @@ def test_qz10():
redirectandroid
.
parms
[
'mac_md5'
]
=
computeMD5
(
m
)
redirectandroid
.
parms
[
'gaid_md5'
]
=
computeMD5
(
g
)
redirectandroid
.
parms
[
'android_id_md5'
]
=
computeMD5
(
a
)
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
print
(
m
)
print
(
computeMD5
(
m
))
...
...
@@ -162,7 +162,7 @@ def test_qz10():
def
test_qz11
():
redirectandroid
.
parms
[
'gaid_md5'
]
=
computeMD5
(
g
)
redirectandroid
.
parms
[
'android_id_md5'
]
=
computeMD5
(
a
)
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
print
(
a
)
print
(
computeMD5
(
a
))
...
...
@@ -172,8 +172,8 @@ def test_qz11():
def
test_atb1
():
i
=
code_nums
(
12
)
redirectandroid
.
parms
[
'oaid'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
time
.
sleep
(
10
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
5
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'oaid'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'oaid'
...
...
@@ -186,7 +186,7 @@ def test_atb1():
def
test_atb2
():
i
=
code_nums
(
12
)
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1'
]
=
i
...
...
@@ -199,7 +199,7 @@ def test_atb2():
def
test_atb3
():
i
=
code_nums
(
12
)
redirectandroid
.
parms
[
'imei2'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'imei2'
]
=
i
...
...
@@ -212,7 +212,7 @@ def test_atb3():
def
test_atb4
():
m
=
code_nums
(
17
)
redirectandroid
.
parms
[
'mac'
]
=
m
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
m
receiveandroid
.
data
[
0
][
'device_info'
][
'mac'
]
=
m
...
...
@@ -226,7 +226,7 @@ def test_atb5():
g
=
code_nums
(
36
)
redirectandroid
.
parms
[
'gaid'
]
=
g
redirectandroid
.
parms
[
'imei1'
]
=
q
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'gaid'
]
=
g
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
...
...
@@ -241,7 +241,7 @@ def test_atb5():
def
test_atb6
():
redirectandroid
.
parms
[
'imei1_md5'
]
=
md
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1_md5'
]
=
md
...
...
@@ -258,7 +258,7 @@ def test_atb6():
def
test_atb7
():
redirectandroid
.
parms
[
'imei2_md5'
]
=
md
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'imei2_md5'
]
=
md
...
...
@@ -266,18 +266,17 @@ def test_atb7():
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'imei1'
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id_md5_type'
]
=
'imei2_md5'
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id_md5'
]
=
md
receiveandroid
.
send_request
()
print
(
o
)
# 安卓精准归因-oaid_md5归因
def
test_atb8
():
redirectandroid
.
parms
[
'oaid_md5'
]
=
md
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
time
.
sleep
(
10
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
5
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'oaid_md5'
]
=
md
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1'
]
=
o
...
...
@@ -294,8 +293,8 @@ def test_atb8():
def
test_atb44
():
redirectandroid
.
parms
[
'mac_md5'
]
=
md
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
time
.
sleep
(
10
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
5
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'mac_md5'
]
=
md
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1'
]
=
o
...
...
@@ -308,12 +307,13 @@ def test_atb44():
# 安卓精准归因-gaid_md5归因
def
test_atb9
():
redirectandroid
.
parms
[
'gaid_md5'
]
=
md
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
time
.
sleep
(
10
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
5
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'gaid_md5'
]
=
md
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1'
]
=
o
...
...
@@ -331,8 +331,8 @@ def test_atb9():
def
test_atb10
():
imei1
=
code_nums
(
12
)
redirectandroid
.
parms
[
'imei1'
]
=
imei1
.
upper
()
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
time
.
sleep
(
10
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
5
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
imei1
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1'
]
=
imei1
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'imei1'
...
...
@@ -345,7 +345,7 @@ def test_atb10():
def
test_atb14
():
imei2
=
code_nums
(
12
)
redirectandroid
.
parms
[
'imei2'
]
=
imei2
.
upper
()
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1'
]
=
i
...
...
@@ -374,7 +374,7 @@ def test_atb11():
def
test_atb12
():
m
=
code_nums
(
17
)
redirectandroid
.
parms
[
'mac'
]
=
m
.
upper
()
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
m
receiveandroid
.
data
[
0
][
'device_info'
][
'mac'
]
=
m
...
...
@@ -388,7 +388,7 @@ def test_atb13():
g
=
code_nums
(
36
)
redirectandroid
.
parms
[
'gaid'
]
=
g
.
upper
()
redirectandroid
.
parms
[
'imei1'
]
=
q
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'gaid'
]
=
g
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
...
...
@@ -403,7 +403,7 @@ def test_atb13():
def
test_atb15
():
imei1
=
code_nums
(
12
)
redirectandroid
.
parms
[
'imei1'
]
=
imei1
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
imei1
.
upper
()
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1'
]
=
imei1
.
upper
()
...
...
@@ -417,7 +417,7 @@ def test_atb15():
def
test_atb16
():
imei2
=
code_nums
(
12
)
redirectandroid
.
parms
[
'imei2'
]
=
imei2
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1'
]
=
i
...
...
@@ -433,7 +433,7 @@ def test_atb16():
def
test_atb17
():
i
=
code_nums
(
12
)
redirectandroid
.
parms
[
'oaid'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
.
upper
()
receiveandroid
.
data
[
0
][
'device_info'
][
'oaid'
]
=
i
.
upper
()
...
...
@@ -449,7 +449,7 @@ def test_atb17():
def
test_atb18
():
m
=
code_nums
(
17
)
redirectandroid
.
parms
[
'mac'
]
=
m
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
m
.
upper
()
receiveandroid
.
data
[
0
][
'device_info'
][
'mac'
]
=
m
.
upper
()
...
...
@@ -464,7 +464,7 @@ def test_atb19():
g
=
code_nums
(
36
)
redirectandroid
.
parms
[
'gaid'
]
=
g
redirectandroid
.
parms
[
'imei1'
]
=
q
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'gaid'
]
=
g
.
upper
()
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
...
...
@@ -480,7 +480,7 @@ def test_atb20():
md
=
code_nums
(
32
)
redirectandroid
.
parms
[
'imei1_md5'
]
=
md
.
upper
()
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1_md5'
]
=
md
...
...
@@ -496,7 +496,7 @@ def test_atb21():
md
=
code_nums
(
32
)
redirectandroid
.
parms
[
'imei2_md5'
]
=
md
.
upper
()
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'imei2_md5'
]
=
md
...
...
@@ -512,7 +512,7 @@ def test_atb22():
md
=
code_nums
(
32
)
redirectandroid
.
parms
[
'oaid_md5'
]
=
md
.
upper
()
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'oaid_md5'
]
=
md
...
...
@@ -529,7 +529,7 @@ def test_atb23():
md
=
code_nums
(
32
)
redirectandroid
.
parms
[
'mac_md5'
]
=
md
.
upper
()
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'mac_md5'
]
=
md
...
...
@@ -545,7 +545,7 @@ def test_atb24():
md
=
code_nums
(
32
)
redirectandroid
.
parms
[
'gaid_md5'
]
=
md
.
upper
()
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'gaid_md5'
]
=
md
...
...
@@ -561,7 +561,7 @@ def test_atb25():
md
=
code_nums
(
32
)
redirectandroid
.
parms
[
'imei1_md5'
]
=
md
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1_md5'
]
=
md
.
upper
()
...
...
@@ -577,7 +577,7 @@ def test_atb26():
md
=
code_nums
(
32
)
redirectandroid
.
parms
[
'imei2_md5'
]
=
md
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'imei2_md5'
]
=
md
.
upper
()
...
...
@@ -594,7 +594,7 @@ def test_atb27():
md
=
code_nums
(
32
)
redirectandroid
.
parms
[
'oaid_md5'
]
=
md
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'oaid_md5'
]
=
md
.
upper
()
...
...
@@ -611,7 +611,7 @@ def test_atb28():
md
=
code_nums
(
32
)
redirectandroid
.
parms
[
'mac_md5'
]
=
md
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'mac_md5'
]
=
md
.
upper
()
...
...
@@ -627,7 +627,7 @@ def test_atb29():
md
=
code_nums
(
32
)
redirectandroid
.
parms
[
'gaid_md5'
]
=
md
redirectandroid
.
parms
[
'imei1'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
o
receiveandroid
.
data
[
0
][
'device_info'
][
'gaid_md5'
]
=
md
.
upper
()
...
...
@@ -644,7 +644,7 @@ def test_atb29():
def
test_atb30
():
i
=
code_nums
(
16
)
redirectandroid
.
parms
[
'android_id'
]
=
i
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
''
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
''
...
...
@@ -932,8 +932,8 @@ def test_atb40():
o
=
'5284047f4ffb4e04824a2fd1d1f0cd62'
redirectandroid
.
parms
[
'oaid_md5'
]
=
o
redirectandroid
.
parms
[
'ipv4'
]
=
ip
redirectandroid
.
send_request3
(
"73iIZ3a"
,
''
)
time
.
sleep
(
10
)
redirectandroid
.
send_request3
(
''
)
time
.
sleep
(
3
)
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id'
]
=
a
receiveandroid
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'imei1'
receiveandroid
.
data
[
0
][
'device_info'
][
'oaid'
]
=
''
...
...
@@ -944,7 +944,7 @@ def test_atb40():
receiveandroid
.
data
[
0
][
'device_info'
][
'imei2_md5'
]
=
''
receiveandroid
.
data
[
0
][
'device_info'
][
'mac'
]
=
''
receiveandroid
.
data
[
0
][
'device_info'
][
'mac_md5'
]
=
''
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1'
]
=
''
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1'
]
=
a
receiveandroid
.
data
[
0
][
'device_info'
][
'imei1_md5'
]
=
''
receiveandroid
.
data
[
0
][
'device_info'
][
'gaid'
]
=
''
receiveandroid
.
data
[
0
][
'device_info'
][
'gaid_md5'
]
=
''
...
...
microservices/attributioncaseios.py
View file @
39217a44
...
...
@@ -60,7 +60,7 @@ def test_atb1():
redirectios
.
parms
[
'ipv4'
]
=
ip
redirectios
.
parms
[
'ua'
]
=
'iOS / Chrome 34: Mozilla/5.0 (iPad; CPU OS 7_0_4 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) CriOS/34.0.1847.18 Mobile/11B554a Safari/9537.53'
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
print
(
i
)
...
...
@@ -74,7 +74,7 @@ def test_atb2():
redirectios
.
parms
[
'idfv'
]
=
v
redirectios
.
parms
[
'idfv_md5'
]
=
computeMD5
(
v
)
redirectios
.
parms
[
'ipv4'
]
=
ip
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
print
(
i
)
...
...
@@ -85,7 +85,7 @@ def test_atb3():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -105,7 +105,7 @@ def test_atb4():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
.
lower
()
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -125,7 +125,7 @@ def test_atb5():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
.
lower
()
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -145,7 +145,7 @@ def test_atb6():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -165,7 +165,7 @@ def test_atb7():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5upper
(
i
)
...
...
@@ -185,7 +185,7 @@ def test_atb8():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5upper
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
''
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -206,7 +206,7 @@ def test_atb9():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
.
lower
()
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -220,7 +220,7 @@ def test_atb9():
print
(
i
)
# idfa
点击为小写,iafa激活为大写,idfa_md5点击有值,激活无值,实时侧添加md5加密值,归因方式为md5
# idfa
_md5激活无值,实时侧添idfa_md5加密值
def
test_atb31
():
i
=
idfacode
()
v
=
idfvcode
()
...
...
@@ -249,7 +249,7 @@ def test_atb10():
redirectios
.
parms
[
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
parms
[
'ipv4'
]
=
ip1
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -273,7 +273,7 @@ def test_atb11():
redirectios
.
parms
[
'idfa'
]
=
''
redirectios
.
parms
[
'idfa_md5'
]
=
'9f89c84a559f573636a47ff8daed0d33'
redirectios
.
parms
[
'ipv4'
]
=
ip1
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
'9f89c84a559f573636a47ff8daed0d33'
...
...
@@ -297,7 +297,7 @@ def test_atb12():
redirectios
.
parms
[
'idfa'
]
=
''
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
parms
[
'ipv4'
]
=
ip1
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -330,7 +330,7 @@ def test_atb13():
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
parms
[
'ipv4'
]
=
ip
redirectios
.
parms
[
'ua'
]
=
ua
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -361,7 +361,7 @@ def test_atb14():
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
parms
[
'ipv4'
]
=
ip
redirectios
.
parms
[
'ua'
]
=
ua1
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -389,7 +389,7 @@ def test_atb15():
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
parms
[
'ipv4'
]
=
ip
redirectios
.
parms
[
'ua'
]
=
ua1
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -417,7 +417,7 @@ def test_atb16():
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
parms
[
'ipv4'
]
=
ip
redirectios
.
parms
[
'ua'
]
=
ua2
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -446,7 +446,7 @@ def test_atb17():
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
parms
[
'ipv4'
]
=
ip1
redirectios
.
parms
[
'ua'
]
=
ua2
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -469,7 +469,7 @@ def test_atb18():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
300
)
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -525,13 +525,13 @@ def test_atb20():
# ---------------------------激活有效期逻辑---------------------------
# 在激活有效期(104秒)之外:归因上之后,
20
0秒后再次发送点击激活数据,查询归因接口,可再次归因
# 在激活有效期(104秒)之外:归因上之后,
11
0秒后再次发送点击激活数据,查询归因接口,可再次归因
def
test_atb21
():
i
=
idfacode
()
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -542,10 +542,10 @@ def test_atb21():
receiveios
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'idfa'
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5_type'
]
=
'idfa_md5'
receiveios
.
send_request
()
time
.
sleep
(
20
0
)
time
.
sleep
(
11
0
)
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -565,7 +565,7 @@ def test_atb22():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -595,7 +595,7 @@ def test_atb23():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -627,7 +627,7 @@ def test_atb24():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
60
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -648,7 +648,7 @@ def test_atb25():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
180
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -673,7 +673,7 @@ def test_atb26():
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
parms
[
'ipv4'
]
=
ip
redirectios
.
parms
[
'ua'
]
=
ua
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
20
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -699,7 +699,7 @@ def test_atb27():
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
parms
[
'ipv4'
]
=
ip
redirectios
.
parms
[
'ua'
]
=
ua
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
35
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -727,7 +727,7 @@ def test_atb28():
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
parms
[
'ipv4'
]
=
ip
redirectios
.
parms
[
'ua'
]
=
ua1
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
3
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -754,7 +754,7 @@ def test_atb29():
redirectios
.
parms
[
'idfa_md5'
]
=
''
redirectios
.
parms
[
'ipv4'
]
=
ip
redirectios
.
parms
[
'ua'
]
=
ua1
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
10
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
''
...
...
@@ -779,7 +779,7 @@ def test_atb30():
redirectios
.
parms
[
'account_id'
]
=
'456'
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -809,12 +809,12 @@ def test_atb30():
# 归因到渠道的startup
def
test_atb
31
():
def
test_atb
45
():
i
=
idfacode
()
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -846,7 +846,7 @@ def test_atb32():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -878,7 +878,7 @@ def test_atb33():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -910,7 +910,7 @@ def test_atb34():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -942,8 +942,8 @@ def test_atb35():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
time
.
sleep
(
8
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
5
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
receiveios
.
data
[
0
][
'device_info'
][
'idfv'
]
=
v
...
...
@@ -974,7 +974,7 @@ def test_atb36():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -1006,7 +1006,7 @@ def test_atb37():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -1040,7 +1040,7 @@ def test_atb38():
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mUfU7va'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'application_info'
][
'appkey'
]
=
'b3beb14b8de6cb5b64650ff8e5983c44'
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
...
...
@@ -1078,7 +1078,7 @@ def test_atb39():
redirectios
.
parms
[
'callback_url'
]
=
''
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -1105,12 +1105,13 @@ def test_atb39():
# 归因到渠道的startup,点击中的callback_url为空
def
test_atb
39
():
def
test_atb
40
():
i
=
idfacode
()
v
=
idfvcode
()
redirectios
.
parms
[
'callback_url'
]
=
'https
%3
A
%2
F
%2
Fwww.baidu.com
%2
F
%3
Ftn
%3
D98010089_dg
%26
ch
%3
D16
%2
F'
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -1137,12 +1138,12 @@ def test_atb39():
# 归因到渠道的自定义事件
def
test_atb4
0
():
def
test_atb4
2
():
i
=
idfacode
()
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
'
mURv22a'
,
'
'
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
...
...
@@ -1162,7 +1163,58 @@ def test_atb40():
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5'
]
=
computeMD5
(
i
)
receiveios
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'idfa'
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5_type'
]
=
'idfa_md5'
receiveios
.
data
[
0
][
"event_info"
][
'event_name'
]
=
'custom_event_1
01
'
receiveios
.
data
[
0
][
"event_info"
][
'event_name'
]
=
'custom_event_1'
receiveios
.
data
[
0
][
"event_info"
][
'event_type'
]
=
'custom'
receiveios
.
send_request
()
print
(
i
)
# 第一次点击的idfa与激活相同,第二次点击ip与激活相同,归因到第一次点击
def
test_atb43
():
ip1
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
ip2
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
i2
=
idfacode
()
i
=
idfacode
()
v
=
idfvcode
()
redirectios
.
parms
[
'ipv4'
]
=
ip1
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
100
)
redirectios
.
parms
[
'ipv4'
]
=
ip2
redirectios
.
parms
[
'idfa'
]
=
i2
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i2
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
3
)
receiveios
.
data
[
0
][
'device_info'
][
'ipv4'
]
=
ip2
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
receiveios
.
data
[
0
][
'device_info'
][
'idfv'
]
=
v
receiveios
.
data
[
0
][
'device_info'
][
'idfv_md5'
]
=
computeMD5
(
v
)
receiveios
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5'
]
=
computeMD5
(
i
)
receiveios
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'idfa'
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5_type'
]
=
'idfa_md5'
receiveios
.
send_request
()
print
(
i
)
#归因到渠道的激活
def
test_atb44
():
i
=
idfacode
()
v
=
idfvcode
()
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
3
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
receiveios
.
data
[
0
][
'device_info'
][
'idfv'
]
=
v
receiveios
.
data
[
0
][
'device_info'
][
'idfv_md5'
]
=
computeMD5
(
v
)
receiveios
.
data
[
0
][
'device_info'
][
'device_id'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5'
]
=
computeMD5
(
i
)
receiveios
.
data
[
0
][
'device_info'
][
'device_id_type'
]
=
'idfa'
receiveios
.
data
[
0
][
'device_info'
][
'device_id_md5_type'
]
=
'idfa_md5'
receiveios
.
send_request
()
print
(
i
)
\ No newline at end of file
microservices/receiveandroid.py
View file @
39217a44
...
...
@@ -15,7 +15,9 @@ global data
data
=
[
{
"application_info"
:
{
"appkey"
:
"700bdf6f8e628686dc9fffccf6ebe58b"
,
# 线上-a8ed96ae9051499fd98bc46ab9c9495c
# 测试-decbeb4d840b4bcd1a068ca7233e6ac2
"appkey"
:
"a8ed96ae9051499fd98bc46ab9c9495c"
,
"bundleid"
:
"3423232"
,
"app_version"
:
"1.9.0"
,
"channel_name"
:
"HUAWEI"
...
...
@@ -98,6 +100,22 @@ data_temp = json.dumps(data)
def
send_request
():
global
data
# url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
url
=
"http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
# data[0]['timestamp_info']['install_time'] = int(round(time.time() * 1000))
print
(
data
)
response
=
requests
.
request
(
"POST"
,
url
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
print
(
response
.
text
)
# 全局data
data
=
json
.
loads
(
data_temp
)
response
=
json
.
loads
(
response
.
text
)
s
=
str
(
response
[
"status"
])
response
[
"status"
]
=
s
return
response
def
send_request2
():
global
data
url
=
"http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
data
[
0
][
'timestamp_info'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
print
(
data
)
...
...
@@ -113,7 +131,9 @@ def send_request():
def
send_requests2s
():
global
data
url
=
"http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/s2s"
# url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/s2s"
url
=
"http://tkio-receive.solar-engine.com/receive/tkiov2/s2s"
response
=
requests
.
request
(
"POST"
,
url
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
print
(
response
.
text
)
# 全局data
...
...
@@ -1805,11 +1825,11 @@ def test_is_rendered3():
assert
response
[
"status"
]
==
"158"
# custom_params为空
def
test_custom_params
():
data
[
0
][
'event_info'
][
'custom_params'
]
=
''
response
=
send_request
()
assert
response
[
"status"
]
==
"0"
# custom_params为空
,已在postman执行
#
def test_custom_params():
# data[0]['event_info']['custom_params'] = ""
#
response = send_request()
#
assert response["status"] == "0"
# custom_params下有特殊字符(key限制数字、大小写字符、下划线)
...
...
@@ -1867,14 +1887,14 @@ def test_custom_params3():
assert
response
[
"status"
]
==
"0"
def
test_pl
():
for
index
in
range
(
1000
):
newlist
=
[
'install'
,
'startup'
,
'register'
,
'login'
,
'order'
,
'purchase'
,
'adclick'
]
for
event
in
newlist
:
data
[
0
][
"event_info"
][
'event_data'
][
'ad_price_currency_type'
]
=
'CNY'
data
[
0
][
'event_info'
][
'event_name'
]
=
event
response
=
send_request
()
assert
response
[
"status"
]
==
"0"
#
def test_pl():
#
for index in range(1000):
#
newlist = ['install', 'startup', 'register', 'login', 'order', 'purchase', 'adclick']
#
for event in newlist:
#
data[0]["event_info"]['event_data']['ad_price_currency_type'] = 'CNY'
#
data[0]['event_info']['event_name'] = event
#
response = send_request()
#
assert response["status"] == "0"
...
...
microservices/receiveios.py
View file @
39217a44
...
...
@@ -3,7 +3,8 @@ import json
import
pytest
import
time
url
=
"http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
# url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
chaochang
=
'543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132'
headers
=
{
...
...
@@ -14,7 +15,9 @@ global data
data
=
[
{
"application_info"
:
{
"appkey"
:
"22e7d9a67fd54ecb5b298ab7fbb1fb7c"
,
# 线上-55705dbd45dd246751b87bba94b8c73c
# 测试-678ca51be65b91dfdd86293af9cfbe31
"appkey"
:
"55705dbd45dd246751b87bba94b8c73c"
,
"bundleid"
:
"3423232"
,
"app_version"
:
"1.9.0"
,
"channel_name"
:
"default"
...
...
@@ -84,10 +87,14 @@ data_temp = json.dumps(data)
def
send_request
():
global
data
url
=
"http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
# 测试
# url = "http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/sdk"
# 线上
url
=
"http://tkio-receive.solar-engine.com/receive/tkiov2/sdk"
data
[
0
][
'timestamp_info'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
data
[
0
][
'timestamp_info'
][
'current_event_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
#
print(data)
print
(
data
)
response
=
requests
.
request
(
"POST"
,
url
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
print
(
response
.
text
)
# 全局data
...
...
@@ -101,6 +108,8 @@ def send_request():
def
send_request2
():
global
data
url
=
"http://tkiomicro-receive-788931749.cn-north-1.elb.amazonaws.com.cn/receive/tkiov2/s2s"
# 线上
url
=
"http://tkio-receive.solar-engine.com/receive/tkiov2/s2s"
data
[
0
][
'timestamp_info'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
data
[
0
][
'timestamp_info'
][
'current_event_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
# print(data)
...
...
microservices/redirectandroid.py
View file @
39217a44
...
...
@@ -104,7 +104,7 @@ parms = {
}
data_temp
=
json
.
dumps
(
parms
)
# 有短链及参数要求的用该方法
def
send_request
(
dl
,
cs
):
global
parms
url1
=
'http://tmtest.trackingio.com/receive/turl/'
+
dl
+
cs
...
...
@@ -115,18 +115,19 @@ def send_request(dl, cs):
response
=
json
.
loads
(
response
.
text
)
return
response
def
send_request2
(
dl
,
cs
):
url1
=
'http://tmtest.trackingio.com/receive/turl/
'
+
dl
+
cs
parms
[
'ts'
]
=
int
(
round
(
time
.
time
()
*
1000
))
# 302跳转时用该方法
def
send_request2
():
url1
=
'http://tmtest.trackingio.com/receive/turl/
Nja2aaa'
#
parms['ts'] = int(round(time.time() * 1000))
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
# response = json.loads(response.text)
return
response
def
send_request3
(
dl
,
cs
):
# 测试归因用的方法,与其他方法区别在于ts为当前时间
def
send_request3
(
cs
):
global
parms
url1
=
'http://tmtest.trackingio.com/receive/turl/
'
+
dl
+
cs
url1
=
'http://tmtest.trackingio.com/receive/turl/
fQvuUba'
+
cs
parms
[
'ts'
]
=
int
(
round
(
time
.
time
()
*
1000
))
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
...
...
@@ -135,6 +136,21 @@ def send_request3(dl, cs):
response
=
json
.
loads
(
response
.
text
)
return
response
# 没有短链及参数要求的用该方法,测试环境默认参数为2586渠道短链
# appeky:0dd83bd5079ab3b20d9e66ebb195f6c4
def
send_request4
():
global
parms
url1
=
'http://tmtest.trackingio.com/receive/turl/zMFjQva'
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
print
(
response
.
text
)
parms
=
json
.
loads
(
data_temp
)
response
=
json
.
loads
(
response
.
text
)
return
response
# 短链错误
def
test_dl
():
re
=
send_request
(
'33322'
,
''
)
...
...
@@ -144,137 +160,142 @@ def test_dl():
# 触点传参时间为正常
def
test_ts9
():
parms
[
'ts'
]
=
current_time_13
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 触点传参时间超过13字符
def
test_ts8
():
parms
[
'ts'
]
=
'16462909436611321'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
167
# 触点传参时间等于13字符,但是包含特殊字符
def
test_ts7
():
parms
[
'ts'
]
=
'1@46290943661'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
167
# 触点传参时间等于13字符,但是包含汉子
def
test_ts0
():
parms
[
'ts'
]
=
'1测4690943661'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
167
# iss2s=1,ts为空
def
test_ts6
():
parms
[
'ts'
]
=
""
parms
[
'is_s2s'
]
=
"1"
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
167
# iss2s=0,ts为空,跳转至监测链接的landing_page_url地址
# 短链有地址时跳转至短链地址,短链无地址时,跳转至app地址
def
test_ts5
():
parms
[
'ts'
]
=
""
parms
[
'is_s2s'
]
=
"0"
send_request2
(
'Yzuiuma'
,
''
)
send_request2
()
# is_s2s为空,默认为0状态,跳转至监测链接的landing_page_url地址
def
test_is_s2s1
():
parms
[
'is_s2s'
]
=
""
send_request2
(
'Yzuiuma'
,
''
)
send_request2
()
# is_s2s非0或者1
def
test_is_s2s
1
():
def
test_is_s2s
2
():
parms
[
'is_s2s'
]
=
"2"
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
165
# 触点类型不为click
def
test_touchpoint_type1
():
parms
[
'touchpoint_type'
]
=
'aaa'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
163
# 触点类型为空
def
test_touchpoint_type2
():
parms
[
'touchpoint_type'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
163
# 归因类型为空
def
test_attribution_type1
():
parms
[
'attribution_type'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
164
# 归因类型为非ua
def
test_attribution_type2
():
parms
[
'attribution_type'
]
=
'test'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
164
# 操作系统为空
def
test_os1
():
parms
[
'os'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 操作系统超过16个字符
def
test_os
1
():
def
test_os
2
():
parms
[
'os'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
115
# 操作系统正常
def
test_os
1
():
def
test_os
3
():
parms
[
'os'
]
=
'iOS'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 操作系统包含特殊字符
def
test_os
2
():
def
test_os
4
():
parms
[
'os'
]
=
'iOS#¥'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 操作系统正常
def
test_os
3
():
def
test_os
5
():
parms
[
'os'
]
=
'android'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 设备型号为空
def
test_model1
():
parms
[
'model'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 设备型号超过64字符
def
test_model2
():
parms
[
'model'
]
=
zf130
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
118
# 设备型号=64字符
def
test_model3
():
parms
[
'model'
]
=
zf64
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
...
...
@@ -282,7 +303,7 @@ def test_model3():
def
test_ipv41
():
parms
[
'model'
]
=
zf64
parms
[
'is_s2s'
]
=
'1'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
...
...
@@ -290,14 +311,14 @@ def test_ipv41():
def
test_ipv42
():
parms
[
'ipv4'
]
=
""
parms
[
'is_s2s'
]
=
'1'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
119
# 用户公网IP v4版本超过15字符
def
test_ipv43
():
parms
[
'ipv4'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
119
...
...
@@ -305,33 +326,35 @@ def test_ipv43():
def
test_ipv44
():
parms
[
'ipv4'
]
=
""
parms
[
'is_s2s'
]
=
'0'
send_request2
(
'Yzuiuma'
,
''
)
send_request2
()
# 用户公网IP v4版本不为空,is_s2s为0,取传的ip值
def
test_ipv45
():
parms
[
'ipv4'
]
=
"2.34.34.34"
parms
[
'is_s2s'
]
=
'0'
send_request2
(
'Yzuiuma'
,
''
)
send_request2
()
# 用户公网ipv6版本超过128字符
def
test_ipv61
():
parms
[
'ipv6'
]
=
zf468
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
120
# 用户公网ipv6版本为空
def
test_ipv62
():
parms
[
'ipv6'
]
=
""
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 用户公网ipv6版本为空
def
test_ipv6
2
():
def
test_ipv6
3
():
parms
[
'ipv6'
]
=
""
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
...
...
@@ -339,7 +362,7 @@ def test_ipv62():
def
test_ua1
():
parms
[
'ua'
]
=
""
parms
[
'is_s2s'
]
=
'1'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
121
...
...
@@ -347,303 +370,303 @@ def test_ua1():
def
test_ua2
():
parms
[
'ua'
]
=
zf668
parms
[
'is_s2s'
]
=
'1'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
121
# 用户代理信息为空,is_s2s=0
def
test_ua
2
():
def
test_ua
3
():
parms
[
'ua'
]
=
''
parms
[
'is_s2s'
]
=
'0'
send_request2
(
'Yzuiuma'
,
''
)
send_request2
()
# OAID超过512字符
def
test_oaid1
():
parms
[
'oaid'
]
=
zf668
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
126
# OAID为空
def
test_oaid2
():
parms
[
'oaid'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# OAID小于512
def
test_oaid3
():
parms
[
'oaid'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# oaid_md5超过32字符
def
test_oaid_md51
():
parms
[
'oaid_md5'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
127
# oaid_md5为空
def
test_oaid_md52
():
parms
[
'oaid_md5'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# oaid_md5为32字符
def
test_oaid_md53
():
parms
[
'oaid_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 各个设备的md5为32字符,大写
def
test_oaid_md5
3
():
def
test_oaid_md5
4
():
newlist
=
[
'oaid_md5'
,
'imei1_md5'
,
'imei2_md5'
,
'gaid_md5'
,
'mac_md5'
,
'android_id_md5'
]
for
shebei_md5
in
newlist
:
parms
[
shebei_md5
]
=
'8E488A40A17AED2F6752F51382A4EAFC'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# imei1超过32字符
def
test_imei11
():
parms
[
'imei1'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
128
# imei1为空
def
test_imei12
():
parms
[
'imei1'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# imei1为正常
def
test_imei13
():
parms
[
'imei1'
]
=
'8342732742383'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# imei1_md5非32字符
def
test_imei1_md51
():
parms
[
'imei1_md5'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
129
# imei1_md5为32字符
def
test_imei1_md53
():
parms
[
'imei1_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# imei1_md5为空
def
test_imei1_md52
():
parms
[
'imei1_md5'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# imei2超过32字符
def
test_imei21
():
parms
[
'imei2'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
130
# imei2为空
def
test_imei22
():
parms
[
'imei2'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# imei2为32字符内
def
test_imei23
():
parms
[
'imei2'
]
=
'8342732742383'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# imei2_md5非32字符
def
test_imei2_md51
():
parms
[
'imei2_md5'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
131
# imei2_md5为空
def
test_imei2_md52
():
parms
[
'imei2_md5'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# imei2_md5为32字符
def
test_imei2_md53
():
parms
[
'imei2_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# gaid非36字符
def
test_gaid1
():
parms
[
'gaid'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
132
# gaid为空
def
test_gaid2
():
parms
[
'gaid'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# gaid为36字符
def
test_gaid3
():
parms
[
'gaid'
]
=
'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# gaid_md5非32字符
def
test_gaid_md51
():
parms
[
'gaid_md5'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
133
# gaid_md5为空
def
test_gaid_md52
():
parms
[
'gaid_md5'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# gaid_md5为32 字符
def
test_gaid_md53
():
parms
[
'gaid_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# mac非17个字符
def
test_mac1
():
parms
[
'mac'
]
=
"111111"
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
134
# mac为空
def
test_mac2
():
parms
[
'mac'
]
=
""
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# mac为17字符
def
test_mac3
():
parms
[
'mac'
]
=
"08:00:20:0A:8C:6D"
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# mac_md5非32字符
def
test_mac_md51
():
parms
[
'mac_md5'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
135
# mac_md5为空
def
test_mac_md52
():
parms
[
'gaid_md5'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# mac_md5 32字符
def
test_mac_md53
():
parms
[
'gaid_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# android_id非16字符
def
test_android_id1
():
parms
[
'android_id'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
136
# android_id为空
def
test_android_id2
():
parms
[
'android_id'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# android_id为16字符
def
test_android_id3
():
parms
[
'android_id'
]
=
'1a34fc556a43c453'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# android_id_md5非32字符
def
test_android_id_md51
():
parms
[
'android_id_md5'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
189
# android_id_md5为空
def
test_android_id_md52
():
parms
[
'android_id_md5'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# android_id_md5为32字符
def
test_android_id_md53
():
parms
[
'android_id_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 短链是安卓,传idfa
def
test_idfa1
():
parms
[
'idfa'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
115
# 短链是安卓,传idfa_md5
def
test_idfa_md51
():
parms
[
'idfa_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
115
# 短链是安卓,传idfv
def
test_idfv1
():
parms
[
'idfv'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
115
# 短链是安卓,传idfv_md5
def
test_idfv_md51
():
parms
[
'idfv_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
115
...
...
@@ -661,7 +684,7 @@ def test_empty():
parms
[
'mac1_md5'
]
=
''
parms
[
'gaid_md5'
]
=
''
parms
[
'gaid'
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
...
...
@@ -672,7 +695,7 @@ def test_ads_data1():
'click_id'
,
'impression_id'
,
'request_id'
,
'callback_id'
,
'callback_url'
]
for
ads_data
in
newlist
:
parms
[
ads_data
]
=
''
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
...
...
@@ -683,12 +706,12 @@ def test_ads_data2():
'click_id'
,
'impression_id'
,
'request_id'
]
for
ads_data
in
newlist
:
parms
[
ads_data
]
=
zf64
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 广告账户id,广告组id,广告计划id,广告位id,转化id,广告点击id,广告展示id,广告请求id超过64字符
def
test_ads_data
2
():
def
test_ads_data
3
():
newlist
=
[{
'name'
:
'account_id'
,
'status'
:
168
},
{
'name'
:
'adgroup_id'
,
'status'
:
169
},
{
'name'
:
'adplan_id'
,
'status'
:
171
},
...
...
@@ -700,12 +723,12 @@ def test_ads_data2():
]
for
ads_data
in
newlist
:
parms
[
ads_data
[
'name'
]]
=
zf130
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
ads_data
[
'status'
]
# 广告组名称,广告计划名称,广告创意名称,渠道回调id,渠道回调地址超过256字符
def
test_ads_data
3
():
def
test_ads_data
4
():
newlist
=
[{
'name'
:
'adgroup_name'
,
'status'
:
170
},
{
'name'
:
'adplan_name'
,
'status'
:
172
},
{
'name'
:
'adcreative_name'
,
'status'
:
174
},
...
...
@@ -714,12 +737,12 @@ def test_ads_data3():
]
for
ads_data
in
newlist
:
parms
[
ads_data
[
'name'
]]
=
zf468
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
ads_data
[
'status'
]
# 广告组名称,广告计划名称,广告创意名称,渠道回调id,渠道回调地址等于256字符
def
test_ads_data
4
():
def
test_ads_data
5
():
newlist
=
[{
'name'
:
'adgroup_name'
,
'status'
:
0
},
{
'name'
:
'adplan_name'
,
'status'
:
0
},
{
'name'
:
'adcreative_name'
,
'status'
:
0
},
...
...
@@ -728,12 +751,12 @@ def test_ads_data4():
]
for
ads_data
in
newlist
:
parms
[
ads_data
[
'name'
]]
=
zf256
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
ads_data
[
'status'
]
# 广告组名称,广告计划名称,广告创意名称,渠道回调id,渠道回调地址小于256字符且包含特殊字符
def
test_ads_data
5
():
def
test_ads_data
6
():
newlist
=
[{
'name'
:
'adgroup_name'
,
'status'
:
0
},
{
'name'
:
'adplan_name'
,
'status'
:
0
},
{
'name'
:
'adcreative_name'
,
'status'
:
0
},
...
...
@@ -742,62 +765,62 @@ def test_ads_data5():
]
for
ads_data
in
newlist
:
parms
[
ads_data
[
'name'
]]
=
'测试*test'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
ads_data
[
'status'
]
# 广告创意id,流量媒体名称超过128字符
def
test_ads_data
6
():
def
test_ads_data
7
():
newlist
=
[{
'name'
:
'adcreative_id'
,
'status'
:
0
},
{
'name'
:
'site_name'
,
'status'
:
0
},
]
for
ads_data
in
newlist
:
parms
[
ads_data
[
'name'
]]
=
zf130
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
ads_data
[
'status'
]
# 广告创意id,流量媒体名称等于128字符
def
test_ads_data
7
():
def
test_ads_data
8
():
newlist
=
[{
'name'
:
'adcreative_id'
,
'status'
:
0
},
{
'name'
:
'site_name'
,
'status'
:
0
},
]
for
ads_data
in
newlist
:
parms
[
ads_data
[
'name'
]]
=
zf128
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
ads_data
[
'status'
]
# 创意类型,广告类型,流量媒体id超过32字符
def
test_ads_data
8
():
def
test_ads_data
9
():
newlist
=
[{
'name'
:
'adcreative_type'
,
'status'
:
175
},
{
'name'
:
'site_id'
,
'status'
:
176
},
{
'name'
:
'ad_type'
,
'status'
:
178
},
]
for
ads_data
in
newlist
:
parms
[
ads_data
[
'name'
]]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
ads_data
[
'status'
]
# 创意类型为16字符
def
test_ads_data
9
():
def
test_ads_data
10
():
parms
[
'adcreative_type'
]
=
'大图大图大图大图'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 流量媒体id为32字符字符
def
test_ads_data1
0
():
def
test_ads_data1
1
():
parms
[
'site_id'
]
=
'巨量的今日头条、穿山甲、抖音抖音'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 广告类型为32字符字符
def
test_ads_data1
0
():
def
test_ads_data1
2
():
parms
[
'ad_type'
]
=
'巨量的今日头条、穿山甲、抖音抖音'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
...
...
@@ -814,14 +837,14 @@ def test_custom_params1():
parms
[
'custom_params_9'
]
=
'_自定义'
parms
[
'custom_params_10'
]
=
'test@#'
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
0
# 自定义触点参数,超过32字符
def
test_custom_params2
():
parms
[
'custom_params_1'
]
=
zf35
re
=
send_request
(
'Yzuiuma'
,
''
)
re
=
send_request
4
(
)
assert
re
[
"status"
]
==
186
...
...
microservices/redirectios.py
View file @
39217a44
...
...
@@ -44,15 +44,15 @@ parms = {
# # 广告组名称。限制256字符内。都选传
# 'adgroup_name': '',
# # 广告计划id。限制64字符内。都选传
# 'adplan_id': '
',
'adplan_id'
:
'342312312
'
,
# # 广告计划名称。限制256字符内。都选传
# 'adplan_name': '',
# # 广告创意id。限制128字符内。都选传
# 'adcreative_id': '
',
'adcreative_id'
:
'1111
'
,
# # 广告创意名称。限制256字符内。都选传
# 'adcreative_name': '',
# # 创意类型(例如大图、小图、视频等)。限制16字符内。都选传
# 'adcreative_type': '
',
'adcreative_type'
:
'大图
'
,
# # 流量媒体id(例如巨量的今日头条、穿山甲、抖音等)。限制32字符内。都选传
# 'site_id': '',
# # 流量媒体名称(例如巨量的今日头条、穿山甲、抖音等)。限制128字符内。都选传
...
...
@@ -60,19 +60,19 @@ parms = {
# # 广告类型(例如开屏、信息流、搜索等)。限制32字符内。都选传。
# 'ad_type': '',
# # 广告位id。限制64字符内。都选传
# 'placement_id': '
',
'placement_id'
:
'222
'
,
# # 转化id。限制64字符内。都选传
# 'conversion_id': '
',
'conversion_id'
:
'333
'
,
# # 广告点击id。限制64字符内。都选传
# 'click_id': '
',
'click_id'
:
'765432354634
'
,
# # 广告展示id。限制64字符内。都选传
# 'impression_id': '
',
'impression_id'
:
'444
'
,
# # 广告请求id。限制64字符内。都选传
# 'request_id': '',
# # 渠道回调id。限制256字符。都选传
#
'callback_id': 'EJiw267wvfQCGKf2g74ZIPD89-vIATAMOAFCIjIwMTkxMTI3MTQxMTEzMDEwMDI2MDc3MjE1MTUwNTczNTBIAQ==',
'callback_id'
:
'EJiw267wvfQCGKf2g74ZIPD89-vIATAMOAFCIjIwMTkxMTI3MTQxMTEzMDEwMDI2MDc3MjE1MTUwNTczNTBIAQ=='
,
# 渠道回调地址。限制256字符。都选传
'callback_url'
:
'https
://www.baidu.com/?tn=98010089_dg&ch=16/
'
,
'callback_url'
:
'https
%3
A
%2
F
%2
Furi6.com
%2
Ftkio
%2
Fa6ZVNba
%3
Fnoredirect
%3
Dtrue
'
,
# 自定触点参数集合。都选传。
# 'custom_params_1': ''
...
...
@@ -84,9 +84,11 @@ data_temp = json.dumps(parms)
# print(p.url)
# print(p.status_code)
# print(p.content)
def
send_request
(
dl
,
cs
):
def
send_request
(
cs
):
global
parms
url1
=
'http://tmtest.trackingio.com/receive/turl/'
+
dl
+
cs
# url1 = 'http://tmtest.trackingio.com/receive/turl/aimmeya' + cs
url1
=
'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia'
+
cs
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
parms
=
json
.
loads
(
data_temp
)
...
...
@@ -95,9 +97,10 @@ def send_request(dl, cs):
def
send_request3
(
dl
,
cs
):
def
send_request3
(
cs
):
global
parms
url1
=
'http://tmtest.trackingio.com/receive/turl/'
+
dl
+
cs
# url1 = 'http://tmtest.trackingio.com/receive/turl/VVvEz2a' + cs
url1
=
'http://tkio-redirect.solar-engine.com/receive/turl/f6F7zia'
+
cs
parms
[
'ts'
]
=
int
(
round
(
time
.
time
()
*
1000
))
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
...
...
@@ -111,55 +114,55 @@ def send_request3(dl, cs):
# idfa为空
def
test_idfa1
():
parms
[
'idfa'
]
=
''
re
=
send_request
(
'
QJZfmma'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfa为全0
def
test_idfa2
():
parms
[
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfa为32字符
def
test_idfa3
():
parms
[
'idfa'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfa非32字符
def
test_idfa4
():
parms
[
'idfa'
]
=
zf35
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
124
# idfa_md5为空
def
test_idfa_md51
():
parms
[
'idfa_md5'
]
=
''
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfa_md5为全0 md5加密
def
test_idfa_md52
():
parms
[
'idfa_md5'
]
=
'9f89c84a559f573636a47ff8daed0d33'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfa_md5为32字符
def
test_idfa_md53
():
parms
[
'idfa_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfa_md5非32字符
def
test_idfa_md54
():
parms
[
'idfa_md5'
]
=
zf35
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
187
...
...
@@ -168,27 +171,27 @@ def test_idfa_md54():
# idfv为空
def
test_idfv1
():
parms
[
'idfv'
]
=
''
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfv为全0
def
test_idfv2
():
parms
[
'idfv'
]
=
'00000000-0000-0000-0000-000000000000'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfv为32字符
def
test_idfv3
():
parms
[
'idfv'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfv非32字符
def
test_idfv4
():
parms
[
'idfv'
]
=
zf35
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
125
...
...
@@ -196,28 +199,28 @@ def test_idfv4():
# idfv_md5为空
def
test_idfv_md51
():
parms
[
'idfv_md5'
]
=
''
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfv_md5为全0 md5加密
def
test_idfv_md52
():
parms
[
'idfv_md5'
]
=
'9f89c84a559f573636a47ff8daed0d33'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfv_md5为32字符
def
test_idfv_md53
():
parms
[
'idfa_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
# idfv_md5非32字符
def
test_idfv_md54
():
parms
[
'idfv_md5'
]
=
zf35
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
188
...
...
@@ -225,21 +228,21 @@ def test_idfv_md54():
# 短链是ios,传oaid
def
test_oaid
():
parms
[
'oaid'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEE'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
# 短链是ios,传oaid_md5
def
test_oaid_md5
():
parms
[
'oaid_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
# 短链是ios,传imei1
def
test_imei1
():
parms
[
'imei1'
]
=
'8342732742383'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
...
...
@@ -247,35 +250,35 @@ def test_imei1():
# 短链是ios,传imei1_md5
def
test_imei1_md5
():
parms
[
'imei1_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
# 短链是ios,传imei2
def
test_imei2
():
parms
[
'imei2'
]
=
'8342732742383'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
# 短链是ios,传imei2_md5
def
test_imei2_md5
():
parms
[
'imei2_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
# 短链是ios,传gaid
def
test_gaid
():
parms
[
'gaid'
]
=
'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
# 短链是ios,传gaid_md5
def
test_gaid_md5
():
parms
[
'gaid_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
...
...
@@ -283,7 +286,7 @@ def test_gaid_md5():
# 短链是ios,传mac
def
test_mac
():
parms
[
'mac'
]
=
'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
...
...
@@ -291,14 +294,14 @@ def test_mac():
# 短链是ios,传mac_md5
def
test_mac_md5
():
parms
[
'mac_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
# 短链是ios,传android_id
def
test_android_id
():
parms
[
'android_id'
]
=
'1a34fc556a43c453'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
...
...
@@ -306,7 +309,7 @@ def test_android_id():
# 短链是ios,传android_id_md5
def
test_android_id_md5
():
parms
[
'android_id'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
...
...
yanchidp/dp.py
View file @
39217a44
...
...
@@ -8,9 +8,8 @@ import random
headers
=
{
'Content-Type'
:
'application/json'
}
current_time_13
=
int
(
round
(
time
.
time
()
*
1000
))
#测试环境
# URL_install = 'http://10.
3.20.39:10202
/dpquery'
# URL_install = 'http://10.
2.20.42:8083
/dpquery'
URL_install
=
'http://link.trackingio.com/dpquery'
class
allEvent
:
# 激活
...
...
yanchidp/dp_diaoyong.py
View file @
39217a44
...
...
@@ -3,15 +3,16 @@ import socket
import
struct
import
random
import
time
# appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
# for _ in range(1):
# # 随机生成12为数组
# # i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = '352745509625'
# # 随机生成ip
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# # ip = '100.120.179.101'
# # allEvent().ziding_event(i,ip,appkey,event)
# allEvent().dp_imei(i, appkey)
# # allEvent().dp_ios(i, appkey)
appkey
=
'3f2706b7afdf89d95ffa7d2e9cc13e2e'
for
_
in
range
(
1
):
# 随机生成12为数组
# i = ''.join(str(random.choice(range(10))) for _ in range(12))
i
=
'581386117745'
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '100.120.179.101'
# allEvent().ziding_event(i,ip,appkey,event)
allEvent
()
.
dp_imei
(
i
,
appkey
)
# allEvent().dp_ios(i, appkey)
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