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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
235 additions
and
193 deletions
+235
-193
click.py
android_click/click.py
+25
-16
android_script.py
android_event/android_script.py
+17
-18
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
+0
-0
attributioncaseios.py
microservices/attributioncaseios.py
+0
-0
receiveandroid.py
microservices/receiveandroid.py
+35
-15
receiveios.py
microservices/receiveios.py
+13
-4
redirectandroid.py
microservices/redirectandroid.py
+0
-0
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
...
@@ -14,20 +14,20 @@ import hashlib
# from jiami.md5 import get_str_sha1_secret_str
# from jiami.md5 import get_str_sha1_secret_str
# 向短链发送点击数据
# 向短链发送点击数据
# 广告创意ID
# 广告创意ID
ry_adcreative_id
=
'
333
'
ry_adcreative_id
=
'
767556
'
# 广告组ID
# 广告组ID
ry_adgroup_id
=
'
333
'
ry_adgroup_id
=
'
564534
'
# 广告计划ID
# 广告计划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 人人营销
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid
=
'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
# 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'
# 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'
...
@@ -40,7 +40,12 @@ URL = 'http://10.2.20.42:8083/tkio/faeQZfa?noredirect=true'
# 7e3aa681f68435b3f74de790d6424690
# 7e3aa681f68435b3f74de790d6424690
# 4eab4be709defbfc2cc85826b09caea0
# 4eab4be709defbfc2cc85826b09caea0
# 6ba2b016f280004d10a1a354e426eceb
# 6ba2b016f280004d10a1a354e426eceb
appkey
=
'99624d617e08b7be64a600b56c7af335'
# md5加密
def
computeMD5upper
(
message
):
m
=
hashlib
.
md5
()
m
.
update
(
message
.
encode
(
encoding
=
'utf-8'
))
return
m
.
hexdigest
()
.
upper
()
appkey
=
'8a390227254c03dbcaddbca009cd6e8b'
lst
=
[]
lst
=
[]
nowTime
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
nowTime
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
s
=
0
s
=
0
...
@@ -78,12 +83,13 @@ for index in range(1):
...
@@ -78,12 +83,13 @@ for index in range(1):
# 随机生成ip
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '156.119.456.19
9
'
# ip = '156.119.456.19
0
'
try
:
try
:
parms
=
{
parms
=
{
'click_time'
:
str
(
round
(
time
.
time
()
*
1000
)),
'click_time'
:
str
(
round
(
time
.
time
()
*
1000
)),
# 'androidid': '86ab7f6642bdde717709216e68d0b',
# 'androidid': '86ab7f6642bdde717709216e68d0b',
'imei'
:
i
,
'imei'
:
i
,
'imei_MD5'
:
computeMD5upper
(
i
),
# 'campuuid': '@#¥%……&……%¥#@#¥%&……&*****',
# 'campuuid': '@#¥%……&……%¥#@#¥%&……&*****',
# 'clickid': '测试测试',
# 'clickid': '测试测试',
# "idfa": '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30',
# "idfa": '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30',
...
@@ -103,9 +109,9 @@ for index in range(1):
...
@@ -103,9 +109,9 @@ for index in range(1):
# 'ry_adgroup_name': ry_adgroup_name,
# 'ry_adgroup_name': ry_adgroup_name,
# 'ry_adplan_name': ry_adplan_name,
# 'ry_adplan_name': ry_adplan_name,
# 'ry_adcreative_name': ry_adcreative_name,
# 'ry_adcreative_name': ry_adcreative_name,
"ry_adgroup_id"
:
ry_adgroup_id
,
#
"ry_adgroup_id": ry_adgroup_id,
"ry_adplan_id"
:
ry_adplan_id
,
#
"ry_adplan_id": ry_adplan_id,
"ry_adcreative_id"
:
ry_adcreative_id
,
#
"ry_adcreative_id": ry_adcreative_id,
# 'imei2': 'null',
# 'imei2': 'null',
# 'meid': i
# 'meid': i
# 'bd_vid': i
# 'bd_vid': i
...
@@ -146,6 +152,8 @@ for index in range(1):
...
@@ -146,6 +152,8 @@ for index in range(1):
# verify = False
# verify = False
p
=
requests
.
get
(
url
=
URL
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
p
=
requests
.
get
(
url
=
URL
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
'imei:'
,
i
)
print
(
'imei:'
,
i
)
print
(
'imeimd5:'
,
computeMD5upper
(
i
))
print
(
"ip:"
,
ip
)
print
(
"ip:"
,
ip
)
# print("accountid:", accountid)
# print("accountid:", accountid)
print
(
p
.
text
)
print
(
p
.
text
)
...
@@ -166,7 +174,7 @@ for index in range(1):
...
@@ -166,7 +174,7 @@ for index in range(1):
# print('androidid', a)
# print('androidid', a)
w
=
w
+
1
w
=
w
+
1
# time.sleep(1
3
)
# time.sleep(1
0
)
# try:
# try:
# allEvent().installUpload(i, ip, appkey)
# allEvent().installUpload(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey)
...
@@ -174,14 +182,14 @@ for index in range(1):
...
@@ -174,14 +182,14 @@ for index in range(1):
# except Exception:
# except Exception:
# print('install_wrong:', w)
# print('install_wrong:', w)
# w = w + 1
# w = w + 1
#
#
# time.sleep(5)
# time.sleep(5)
# try:
# try:
# allEvent().registerEvent(i, ip, appkey)
# allEvent().registerEvent(i, ip, appkey)
# except Exception as e:
# except Exception as e:
# print('注册_wrong:', w)
# print('注册_wrong:', w)
#
#
print(e)
# print(e)
# time.sleep(4)
# time.sleep(4)
# try:
# try:
# allEvent().loginEvent(i, ip, appkey)
# allEvent().loginEvent(i, ip, appkey)
...
@@ -198,6 +206,7 @@ for index in range(1):
...
@@ -198,6 +206,7 @@ for index in range(1):
# allEvent().payorder(i, ip, appkey)
# allEvent().payorder(i, ip, appkey)
# except Exception:
# except Exception:
# print('订单_wrong:', w)
# print('订单_wrong:', w)
# time.sleep(10)
# try:
# try:
# allEvent().invoke_test(i, ip, appkey)
# allEvent().invoke_test(i, ip, appkey)
# except Exception:
# except Exception:
...
...
android_event/android_script.py
View file @
39217a44
...
@@ -68,9 +68,7 @@ class allEvent:
...
@@ -68,9 +68,7 @@ class allEvent:
s
=
json
.
dumps
({
s
=
json
.
dumps
({
# "what":'install',
# "what":'install',
"appid"
:
appkey
,
"appid"
:
appkey
,
# "appType": "wap",
"context"
:
{
"context"
:
{
# "_apptype": "wap",
"_carrier"
:
carrier
,
"_carrier"
:
carrier
,
"_networkwhat_type"
:
network_type
,
"_networkwhat_type"
:
network_type
,
"_ryosversion"
:
ryosversion
,
"_ryosversion"
:
ryosversion
,
...
@@ -78,15 +76,15 @@ class allEvent:
...
@@ -78,15 +76,15 @@ class allEvent:
"_pkgname"
:
"com.yanjing.yami"
,
"_pkgname"
:
"com.yanjing.yami"
,
# "_campaignid": 'default',
# "_campaignid": 'default',
"_deviceid"
:
i
,
"_deviceid"
:
i
,
# "_imei": i
,
"_imei"
:
'E83DC0B76BC1691CB9C45E5A63468660'
,
'_oaid'
:
'697134960e9ff8df46f21b4f97db595a1'
,
#
'_oaid': '697134960e9ff8df46f21b4f97db595a1',
"_rdid"
:
'09DA91D0664C33DA7BEE7294CCCCCA07'
,
#
"_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',
# '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",
# "_current_caid": "00_A0FF634AEDF1403205A4A6A1118CDA61_A66338F33BEBB40F5CD65F198AF2F40C",
# "gxid": "876543567543565",
# "gxid": "876543567543565",
# "_idfv": i,
# "_idfv": i,
"_androidid"
:
'86ab7f6642bdde717709216e68d0b'
,
#
"_androidid": '86ab7f6642bdde717709216e68d0b',
# "_imei2":"324323AAAA",
# "_imei2":"324323AAAA",
# "_meid": "CCC324323",
# "_meid": "CCC324323",
"_ip"
:
IP
,
"_ip"
:
IP
,
...
@@ -158,7 +156,7 @@ class allEvent:
...
@@ -158,7 +156,7 @@ class allEvent:
# "_deviceid": "5C70287B-27F5-4AC3-9E9C-2D67B8CF1065"
# "_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()))
# time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time()))
# 'ds': ds,
# 'ds': ds,
'who'
:
'lxx_test'
'who'
:
'lxx_test'
...
@@ -350,7 +348,9 @@ class allEvent:
...
@@ -350,7 +348,9 @@ class allEvent:
def
payorder
(
self
,
i
,
IP
,
appkey
):
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
({
s
=
json
.
dumps
({
'what'
:
'order'
,
'what'
:
'order'
,
'appid'
:
appkey
,
'appid'
:
appkey
,
...
@@ -410,16 +410,16 @@ class allEvent:
...
@@ -410,16 +410,16 @@ class allEvent:
print
(
"自定义"
+
p
.
text
)
print
(
"自定义"
+
p
.
text
)
# 自定义事件
# 自定义事件
def
invoke_test
(
self
,
i
,
IP
,
appkey
):
def
invoke_test
(
self
,
i
,
IP
,
appkey
):
s
=
json
.
dumps
({
s
=
json
.
dumps
({
"what"
:
"invoke"
,
"what"
:
"invoke"
,
"appType"
:
""
,
"appType"
:
""
,
"appid"
:
appkey
,
"appid"
:
appkey
,
"context"
:
{
"context"
:
{
"_campaignid"
:
"_default_"
,
#
"_campaignid": "_default_",
"_rydevicetype"
:
"iPhone"
,
"_rydevicetype"
:
"iPhone"
,
"_ip"
:
IP
,
"_ip"
:
IP
,
# '_oaid':'7c5c102b782c33e',
"_ryosversion"
:
ryosversion
,
"_ryosversion"
:
ryosversion
,
"_manufacturer"
:
"苹果"
,
"_manufacturer"
:
"苹果"
,
"frequency"
:
"0.000"
,
"frequency"
:
"0.000"
,
...
@@ -428,26 +428,25 @@ class allEvent:
...
@@ -428,26 +428,25 @@ class allEvent:
"_deviceid"
:
i
,
"_deviceid"
:
i
,
"_device_gps"
:
"unknown"
,
"_device_gps"
:
"unknown"
,
"_jbk"
:
"0"
,
"_jbk"
:
"0"
,
"_timestamp"
:
"1565941809351"
,
"_timestamp"
:
current_time_13
,
"_imei"
:
i
,
"_imei"
:
i
,
# "_idfa": "DBC43622-E34B-440C-B7A7-FB6641D0D9AB",
# "_idfa": "DBC43622-E34B-440C-B7A7-FB6641D0D9AB",
"_idfv"
:
i
,
#
"_idfv": i,
"_lib_version"
:
lv
,
"_lib_version"
:
lv
,
"_carrier"
:
carrier
,
"_carrier"
:
carrier
,
"_ry_ts"
:
"1565941809416"
,
"_ry_ts"
:
current_time_13
,
"_create_timestamp"
:
"1565941809351"
,
"_create_timestamp"
:
current_time_13
,
"_tz"
:
"+8"
,
"_tz"
:
"+8"
,
"_pkgname"
:
"com.reyun.sdktrackingtest"
,
"_pkgname"
:
"com.reyun.sdktrackingtest"
,
"_ipv6"
:
"fe80::1cf8:ea60:3508:1dc2"
,
"_ipv6"
:
"fe80::1cf8:ea60:3508:1dc2"
,
"modify"
:
"0"
,
"modify"
:
"0"
,
# "_ry_origin_when": "2019-08-16 15:50:09",
# "_ry_origin_when": "2019-08-16 15:50:09",
"_resolution"
:
"736*414"
,
"_resolution"
:
"736*414"
,
"_ryos"
:
"
iOS
"
,
"_ryos"
:
"
android
"
,
"_model"
:
model
,
"_model"
:
model
,
# "_mac": "02:00:00:00:00:00",
# "_mac": "02:00:00:00:00:00",
"_network_type"
:
"WIFI"
,
"_network_type"
:
"WIFI"
,
# "_androidid": "5432453421342654",
# "_androidid": "5432453421342654",
"_lats"
:
"1"
"_lats"
:
"1"
},
},
"where"
:
"event"
,
"where"
:
"event"
,
...
@@ -458,8 +457,8 @@ class allEvent:
...
@@ -458,8 +457,8 @@ class allEvent:
p
=
requests
.
post
(
url
=
URL
+
'event'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
p
=
requests
.
post
(
url
=
URL
+
'event'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
print
(
"自定义"
+
p
.
text
)
print
(
"自定义"
+
p
.
text
)
# 广告展示
# 广告展示
def
adshow
(
self
,
i
,
IP
,
appkey
,
adid
):
def
adshow
(
self
,
i
,
IP
,
appkey
,
adid
):
s
=
json
.
dumps
({
s
=
json
.
dumps
({
"appid"
:
appkey
,
"appid"
:
appkey
,
...
...
android_event_case/android_fenlianjie.py
View file @
39217a44
...
@@ -8,7 +8,7 @@ import hashlib
...
@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活
#安卓常规渠道激活
appkey
=
'
f3f4db967187590e6c0b5cc158106788
'
appkey
=
'
ae6f9fb7e7bc336bffb63de711c7bec0
'
# 线上预约app
# 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953
# 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd
# 16dc0cb882d3dbec4f7f66251a84d6dd
...
@@ -27,6 +27,7 @@ appkey = 'f3f4db967187590e6c0b5cc158106788'
...
@@ -27,6 +27,7 @@ appkey = 'f3f4db967187590e6c0b5cc158106788'
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# allEvent().payEvent(i, ip, appkey)
# allEvent().payEvent(i, ip, appkey)
for
index
in
range
(
1
):
for
index
in
range
(
1
):
# 随机生成12为数组
# 随机生成12为数组
s
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
18
))
s
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
18
))
...
@@ -37,18 +38,18 @@ for index in range(1):
...
@@ -37,18 +38,18 @@ for index in range(1):
# p = '987654321234567'
# p = '987654321234567'
# s = '2321321312h8ro321'
# s = '2321321312h8ro321'
#
i = ''.join(str(random.choice(range(10))) for _ in range(12))
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
i
=
'583D2BB0-B19C-4A9A-A600-2A1EB2FB7E30
'
# i = '885709229829
'
# i = '00000000-0000-0000-0000-000000000000'
# i = '00000000-0000-0000-0000-000000000000'
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '1
2.23.21.2
'
# ip = '1
10.186.108.28
'
# 地域测试ip
# 地域测试ip
# 60.13.148.23 新疆维吾尔自治区吐鲁番市
# 60.13.148.23 新疆维吾尔自治区吐鲁番市
# 61.139.239.255 广西壮族自治区北海市
# 61.139.239.255 广西壮族自治区北海市
# 119.60.0.0 宁夏回族自治区银川市
# 119.60.0.0 宁夏回族自治区银川市
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
#
time.sleep(1)
time
.
sleep
(
1
)
allEvent
()
.
startupEvent
(
i
,
ip
,
appkey
)
allEvent
()
.
startupEvent
(
i
,
ip
,
appkey
)
# # time.sleep(1)
# # time.sleep(1)
# allEvent().loginEvent(i, ip, appkey)
# allEvent().loginEvent(i, ip, appkey)
...
@@ -60,7 +61,7 @@ for index in range(1):
...
@@ -60,7 +61,7 @@ for index in range(1):
# time.sleep(1)
# time.sleep(1)
# num = index + 1
# num = index + 1
# event = 'event_' + str(num)
# event = 'event_' + str(num)
# event = 'event_10'
#
#
event = 'event_10'
# allEvent().ziding_event(i, ip, appkey, event)
# allEvent().ziding_event(i, ip, appkey, event)
# print(s)
# print(s)
# s = int(s) + 1
# s = int(s) + 1
...
@@ -69,7 +70,7 @@ for index in range(1):
...
@@ -69,7 +70,7 @@ for index in range(1):
# allEvent().adclick(i,ip,appkey,adid)
# allEvent().adclick(i,ip,appkey,adid)
# allEvent().pageduration(i,ip,appkey,se,p)
# allEvent().pageduration(i,ip,appkey,se,p)
# allEvent().appduration(i,ip,appkey,s)
# 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().retentionEvent(i, ip, appkey)
#
#
# allEvent().formevent(i,ip,appkey)
# allEvent().formevent(i,ip,appkey)
...
...
fenbao_android_event_case/android_fenlianjie.py
View file @
39217a44
...
@@ -10,24 +10,24 @@ appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
...
@@ -10,24 +10,24 @@ appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
# 4b25b8a4dc584e63e9a7b81c3adedf2f
# 4b25b8a4dc584e63e9a7b81c3adedf2f
# event = 'event_10'
# event = 'event_10'
cmpaignid
=
'
233445
'
cmpaignid
=
'
112233
'
for
index
in
range
(
1
):
for
index
in
range
(
1
):
# 随机生成12为数组
# 随机生成12为数组
#
i = ''.join(str(random.choice(range(10))) for _ in range(12))
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
i
=
'691007221237'
#
i = '691007221237'
# 随机生成ip
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '143.205.125.236'
# ip = '143.205.125.236'
#
allEvent().installUpload(i, ip, appkey, cmpaignid)
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
,
cmpaignid
)
# time.sleep(3)
# time.sleep(3)
# allEvent().loginEvent(i, ip, appkey)
# allEvent().loginEvent(i, ip, appkey)
allEvent
()
.
orderEvent
(
i
,
ip
,
appkey
)
#
allEvent().orderEvent(i, ip, appkey)
time
.
sleep
(
1
)
#
time.sleep(1)
# num = index + 1
# num = index + 1
# event = 'event_' + str(num)
# event = 'event_' + str(num)
# allEvent().ziding_event(i, ip, appkey,event)
# allEvent().ziding_event(i, ip, appkey,event)
allEvent
()
.
payEvent
(
i
,
ip
,
appkey
)
#
allEvent().payEvent(i, ip, appkey)
# allEvent().registerEvent(i, ip, appkey)
# allEvent().registerEvent(i, ip, appkey)
# allEvent().invoke_test(i, ip, appkey,cmpaignid)
# allEvent().invoke_test(i, ip, appkey,cmpaignid)
...
...
ios_click/click.py
View file @
39217a44
...
@@ -8,10 +8,10 @@ import string
...
@@ -8,10 +8,10 @@ import string
#向短链发送点击数据
#向短链发送点击数据
#渠道短链
#渠道短链
URL
=
'http://
10.2.20.42:8083/tkio/zemI32a?
noredirect=true'
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
=
'
f3f4db967187590e6c0b5cc158106788
'
appkey
=
'
3f2706b7afdf89d95ffa7d2e9cc13e2e
'
# URL = 'http://172.31.19.255:8083/tkio/VNNjQra'
# URL = 'http://172.31.19.255:8083/tkio/VNNjQra'
event
=
'
event_1
'
event
=
'
invoke
'
# 广告创意ID
# 广告创意ID
ry_adcreative_id
=
'8886453253'
ry_adcreative_id
=
'8886453253'
# 广告组ID
# 广告组ID
...
@@ -91,14 +91,14 @@ for _ in range(1):
...
@@ -91,14 +91,14 @@ for _ in range(1):
print
(
'idfa:'
,
i
)
print
(
'idfa:'
,
i
)
print
(
'ip'
,
ip
)
print
(
'ip'
,
ip
)
w
=
w
+
1
w
=
w
+
1
time
.
sleep
(
10
)
#
time.sleep(10)
try
:
#
try:
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
#
allEvent().installUpload(i, ip, appkey)
# allEvent().formevent(i, ip, appkey)
#
# allEvent().formevent(i, ip, appkey)
#
except
Exception
:
#
except Exception:
print
(
'install_wrong:'
,
w
)
#
print('install_wrong:', w)
w
=
w
+
1
#
w = w + 1
# time.sleep(3)
# time.sleep(3)
# try:
# try:
# allEvent().adshow(i, ip, appkey,adid)
# allEvent().adshow(i, ip, appkey,adid)
...
@@ -146,12 +146,12 @@ for _ in range(1):
...
@@ -146,12 +146,12 @@ for _ in range(1):
# allEvent().loginEvent(i, ip, appkey)
# allEvent().loginEvent(i, ip, appkey)
# except Exception:
# except Exception:
# print('登录_wrong:', w)
# print('登录_wrong:', w)
# time.sleep(5
)
time
.
sleep
(
10
)
#
try:
try
:
#
allEvent().ziding_event(i, ip, appkey, event)
allEvent
()
.
ziding_event
(
i
,
ip
,
appkey
,
event
)
#
except Exception as err:
except
Exception
as
err
:
#
print(err)
print
(
err
)
#
print('自定义_wrong:', w)
print
(
'自定义_wrong:'
,
w
)
#
#
# time.sleep(10)
# time.sleep(10)
# try:
# try:
...
...
ios_event/ios_script.py
View file @
39217a44
...
@@ -7,8 +7,8 @@ import random
...
@@ -7,8 +7,8 @@ import random
headers
=
{
'Content-Type'
:
'application/json'
}
headers
=
{
'Content-Type'
:
'application/json'
}
URL
=
'http://10.2.20.42:8080/receive/tkio/'
#
URL = 'http://10.2.20.42:8080/receive/tkio/'
#
URL = 'http://log.trackingio.com/receive/tkio/'
URL
=
'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
#时间戳
#时间戳
...
@@ -91,50 +91,50 @@ class allEvent:
...
@@ -91,50 +91,50 @@ class allEvent:
# 3.download + deviceId有归因结果asa_install_type = old_download对应1
# 3.download + deviceId有归因结果asa_install_type = old_download对应1
# 4.download + deviceId无归因结果asa_install_type = new_download对应2
# 4.download + deviceId无归因结果asa_install_type = new_download对应2
# # 转化类型,新增或重装,Download 或 Redownload
# # 转化类型,新增或重装,Download 或 Redownload
#
"iad-conversion-type": "Download",
"iad-conversion-type"
:
"Download"
,
#
#
#
广告活动组ID(campaign group id)
# 广告活动组ID(campaign group id)
# "iad-org-id": "432432432
",
"iad-org-id"
:
"123456789
"
,
#
#
广告活动组名称(campaign group name)
# 广告活动组名称(campaign group name)
#
"iad-org-name": "name",
"iad-org-name"
:
"name"
,
#
#
#
广告活动ID
# 广告活动ID
#
"iad-campaign-id": "111",
"iad-campaign-id"
:
"111"
,
#
#
广告活动名称
# 广告活动名称
#
"iad-campaign-name": "CampaignName",
"iad-campaign-name"
:
"CampaignName"
,
#
#
#
#
广告组ID
# 广告组ID
#
"iad-adgroup-id": "111111",
"iad-adgroup-id"
:
"111111"
,
#
#
广告组名称
# 广告组名称
#
"iad-adgroup-name": "AdGroupName",
"iad-adgroup-name"
:
"AdGroupName"
,
#
#
#
#
关键词 id
# 关键词 id
#
"iad-keyword-id": "111",
"iad-keyword-id"
:
"111"
,
#
#
关键词
# 关键词
#
"iad-keyword": "Keyword",
"iad-keyword"
:
"Keyword"
,
#
#
#
#
素材ID
# 素材ID
#
"iad-creativeset-id": "111",
"iad-creativeset-id"
:
"111"
,
#
#
素材名称
# 素材名称
#
"iad-creativeset-name": "CreativeSetName",
"iad-creativeset-name"
:
"CreativeSetName"
,
#
#
#
点击ASA广告时间
# 点击ASA广告时间
#
"iad-click-date": '2021-06-24T11:32:33Z',
"iad-click-date"
:
'2021-06-24T11:32:33Z'
,
#
#
本次下载完成的时间(仅ASA转化时,该值传且必传)
# 本次下载完成的时间(仅ASA转化时,该值传且必传)
#
"iad-conversion-date": when,
"iad-conversion-date"
:
when
,
#
#
#
Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配
# Broad 广泛匹配 ; Exact 完全匹配;SearchMatch 搜索匹配
#
#
关键词匹配类型
# 关键词匹配类型
#
"iad-keyword-matchtype": "SearchMatch",
"iad-keyword-matchtype"
:
"SearchMatch"
,
#
#
首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间)
#首次下载完成的时间(有可能包括非ASA转化,当为redownload且conversion date有值时,purchase date是第一次下载App的时间)
#
"iad-purchase-date": '2021-06-24T11:32:33Z',
"iad-purchase-date"
:
'2021-06-24T11:32:33Z'
,
#
#
归因结果
# 归因结果
#
"iad-attribution": "true",
"iad-attribution"
:
"true"
,
#
#
国家
# 国家
#
"iad-country-or-region": "US",
"iad-country-or-region"
:
"US"
,
# 'asa_install_time':'2021-06-24T11:32:33Z',
# 'asa_install_time':'2021-06-24T11:32:33Z',
...
@@ -385,7 +385,8 @@ class allEvent:
...
@@ -385,7 +385,8 @@ class allEvent:
'_ryosversion'
:
ryosversion
,
'_ryosversion'
:
ryosversion
,
'__model'
:
'jixing'
,
'__model'
:
'jixing'
,
"_lib_version"
:
lv
,
"_lib_version"
:
lv
,
'_key_action_category'
:
'1'
,
'_key_action_threshold'
:
'15'
,
'_key_action_category'
:
'1'
,
'_key_action_threshold'
:
'15'
,
# 识别是否为自定义事件,默认传1
# 识别是否为自定义事件,默认传1
'_isreyundefaultevent'
:
'1'
'_isreyundefaultevent'
:
'1'
},
},
...
...
ios_event_case/ios_fenlianjie.py
View file @
39217a44
...
@@ -6,10 +6,10 @@ import string
...
@@ -6,10 +6,10 @@ import string
import
time
import
time
#iOS常规渠道激活
#iOS常规渠道激活
appkey
=
'
44b56e7b7369d13643ec8961f6998b
9b'
appkey
=
'
6012db28b7fbdfcb1e3a847756137f
9b'
event
=
'event_1'
event
=
'event_1'
for
index
in
range
(
1
):
for
index
in
range
(
30
):
# 随机生成12为数组
# 随机生成12为数组
a
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
8
))
a
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
8
))
b
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
b
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
...
@@ -17,14 +17,14 @@ for index in range(1):
...
@@ -17,14 +17,14 @@ for index in range(1):
d
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
d
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
4
))
e
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
12
))
e
=
""
.
join
(
random
.
sample
(
string
.
ascii_letters
+
string
.
digits
,
12
))
#
i = (a + "-" + b + "-" + c + "-" + d + "-" + e).upper()
i
=
(
a
+
"-"
+
b
+
"-"
+
c
+
"-"
+
d
+
"-"
+
e
)
.
upper
()
i
=
'583D2BB0-B19C-4A9A-A600-2A1EB2FB7E39'
#
i = '583D2BB0-B19C-4A9A-A600-2A1EB2FB7E39'
print
(
i
)
print
(
i
)
adid
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
adid
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
# 随机生成ip
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# ip = '61.192.125.69'
# ip = '61.192.125.69'
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
#
allEvent().installUpload(i,ip,appkey)
# allEvent().startupEvent(i, ip, appkey)
# allEvent().startupEvent(i, ip, appkey)
# time.sleep(10)
# time.sleep(10)
# allEvent().loginEvent(i, ip, appkey)
# allEvent().loginEvent(i, ip, appkey)
...
@@ -33,9 +33,9 @@ for index in range(1):
...
@@ -33,9 +33,9 @@ for index in range(1):
# time.sleep(1)
# time.sleep(1)
# allEvent().payorder(i, ip, appkey)
# allEvent().payorder(i, ip, appkey)
# time.sleep(3)
# time.sleep(3)
#
num = index + 1
num
=
index
+
1
#
event = 'event_' + str(num)
event
=
'event_'
+
str
(
num
)
#
allEvent().ziding_event(i, ip, appkey, event)
allEvent
()
.
ziding_event
(
i
,
ip
,
appkey
,
event
)
# print(event)
# print(event)
# allEvent().adshow(i,ip,appkey,adid)
# allEvent().adshow(i,ip,appkey,adid)
# allEvent().adclick(i,ip,appkey,adid)
# allEvent().adclick(i,ip,appkey,adid)
...
...
microservices/attributioncase.py
View file @
39217a44
This diff is collapsed.
Click to expand it.
microservices/attributioncaseios.py
View file @
39217a44
This diff is collapsed.
Click to expand it.
microservices/receiveandroid.py
View file @
39217a44
...
@@ -15,7 +15,9 @@ global data
...
@@ -15,7 +15,9 @@ global data
data
=
[
data
=
[
{
{
"application_info"
:
{
"application_info"
:
{
"appkey"
:
"700bdf6f8e628686dc9fffccf6ebe58b"
,
# 线上-a8ed96ae9051499fd98bc46ab9c9495c
# 测试-decbeb4d840b4bcd1a068ca7233e6ac2
"appkey"
:
"a8ed96ae9051499fd98bc46ab9c9495c"
,
"bundleid"
:
"3423232"
,
"bundleid"
:
"3423232"
,
"app_version"
:
"1.9.0"
,
"app_version"
:
"1.9.0"
,
"channel_name"
:
"HUAWEI"
"channel_name"
:
"HUAWEI"
...
@@ -98,6 +100,22 @@ data_temp = json.dumps(data)
...
@@ -98,6 +100,22 @@ data_temp = json.dumps(data)
def
send_request
():
def
send_request
():
global
data
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"
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
))
data
[
0
][
'timestamp_info'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
print
(
data
)
print
(
data
)
...
@@ -113,7 +131,9 @@ def send_request():
...
@@ -113,7 +131,9 @@ def send_request():
def
send_requests2s
():
def
send_requests2s
():
global
data
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
))
response
=
requests
.
request
(
"POST"
,
url
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
print
(
response
.
text
)
print
(
response
.
text
)
# 全局data
# 全局data
...
@@ -1805,11 +1825,11 @@ def test_is_rendered3():
...
@@ -1805,11 +1825,11 @@ def test_is_rendered3():
assert
response
[
"status"
]
==
"158"
assert
response
[
"status"
]
==
"158"
# custom_params为空
# custom_params为空
,已在postman执行
def
test_custom_params
():
#
def test_custom_params():
data
[
0
][
'event_info'
][
'custom_params'
]
=
''
# data[0]['event_info']['custom_params'] = ""
response
=
send_request
()
#
response = send_request()
assert
response
[
"status"
]
==
"0"
#
assert response["status"] == "0"
# custom_params下有特殊字符(key限制数字、大小写字符、下划线)
# custom_params下有特殊字符(key限制数字、大小写字符、下划线)
...
@@ -1867,14 +1887,14 @@ def test_custom_params3():
...
@@ -1867,14 +1887,14 @@ def test_custom_params3():
assert
response
[
"status"
]
==
"0"
assert
response
[
"status"
]
==
"0"
def
test_pl
():
#
def test_pl():
for
index
in
range
(
1000
):
#
for index in range(1000):
newlist
=
[
'install'
,
'startup'
,
'register'
,
'login'
,
'order'
,
'purchase'
,
'adclick'
]
#
newlist = ['install', 'startup', 'register', 'login', 'order', 'purchase', 'adclick']
for
event
in
newlist
:
#
for event in newlist:
data
[
0
][
"event_info"
][
'event_data'
][
'ad_price_currency_type'
]
=
'CNY'
#
data[0]["event_info"]['event_data']['ad_price_currency_type'] = 'CNY'
data
[
0
][
'event_info'
][
'event_name'
]
=
event
#
data[0]['event_info']['event_name'] = event
response
=
send_request
()
#
response = send_request()
assert
response
[
"status"
]
==
"0"
#
assert response["status"] == "0"
...
...
microservices/receiveios.py
View file @
39217a44
...
@@ -3,7 +3,8 @@ import json
...
@@ -3,7 +3,8 @@ import json
import
pytest
import
pytest
import
time
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'
chaochang
=
'543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132543214223221321321312131313133132131232131232132132'
headers
=
{
headers
=
{
...
@@ -14,7 +15,9 @@ global data
...
@@ -14,7 +15,9 @@ global data
data
=
[
data
=
[
{
{
"application_info"
:
{
"application_info"
:
{
"appkey"
:
"22e7d9a67fd54ecb5b298ab7fbb1fb7c"
,
# 线上-55705dbd45dd246751b87bba94b8c73c
# 测试-678ca51be65b91dfdd86293af9cfbe31
"appkey"
:
"55705dbd45dd246751b87bba94b8c73c"
,
"bundleid"
:
"3423232"
,
"bundleid"
:
"3423232"
,
"app_version"
:
"1.9.0"
,
"app_version"
:
"1.9.0"
,
"channel_name"
:
"default"
"channel_name"
:
"default"
...
@@ -84,10 +87,14 @@ data_temp = json.dumps(data)
...
@@ -84,10 +87,14 @@ data_temp = json.dumps(data)
def
send_request
():
def
send_request
():
global
data
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'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
data
[
0
][
'timestamp_info'
][
'current_event_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
))
response
=
requests
.
request
(
"POST"
,
url
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
print
(
response
.
text
)
print
(
response
.
text
)
# 全局data
# 全局data
...
@@ -101,6 +108,8 @@ def send_request():
...
@@ -101,6 +108,8 @@ def send_request():
def
send_request2
():
def
send_request2
():
global
data
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"
data
[
0
][
'timestamp_info'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
data
[
0
][
'timestamp_info'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
data
[
0
][
'timestamp_info'
][
'current_event_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
data
[
0
][
'timestamp_info'
][
'current_event_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
# print(data)
# print(data)
...
...
microservices/redirectandroid.py
View file @
39217a44
This diff is collapsed.
Click to expand it.
microservices/redirectios.py
View file @
39217a44
...
@@ -44,15 +44,15 @@ parms = {
...
@@ -44,15 +44,15 @@ parms = {
# # 广告组名称。限制256字符内。都选传
# # 广告组名称。限制256字符内。都选传
# 'adgroup_name': '',
# 'adgroup_name': '',
# # 广告计划id。限制64字符内。都选传
# # 广告计划id。限制64字符内。都选传
# 'adplan_id': '
',
'adplan_id'
:
'342312312
'
,
# # 广告计划名称。限制256字符内。都选传
# # 广告计划名称。限制256字符内。都选传
# 'adplan_name': '',
# 'adplan_name': '',
# # 广告创意id。限制128字符内。都选传
# # 广告创意id。限制128字符内。都选传
# 'adcreative_id': '
',
'adcreative_id'
:
'1111
'
,
# # 广告创意名称。限制256字符内。都选传
# # 广告创意名称。限制256字符内。都选传
# 'adcreative_name': '',
# 'adcreative_name': '',
# # 创意类型(例如大图、小图、视频等)。限制16字符内。都选传
# # 创意类型(例如大图、小图、视频等)。限制16字符内。都选传
# 'adcreative_type': '
',
'adcreative_type'
:
'大图
'
,
# # 流量媒体id(例如巨量的今日头条、穿山甲、抖音等)。限制32字符内。都选传
# # 流量媒体id(例如巨量的今日头条、穿山甲、抖音等)。限制32字符内。都选传
# 'site_id': '',
# 'site_id': '',
# # 流量媒体名称(例如巨量的今日头条、穿山甲、抖音等)。限制128字符内。都选传
# # 流量媒体名称(例如巨量的今日头条、穿山甲、抖音等)。限制128字符内。都选传
...
@@ -60,19 +60,19 @@ parms = {
...
@@ -60,19 +60,19 @@ parms = {
# # 广告类型(例如开屏、信息流、搜索等)。限制32字符内。都选传。
# # 广告类型(例如开屏、信息流、搜索等)。限制32字符内。都选传。
# 'ad_type': '',
# 'ad_type': '',
# # 广告位id。限制64字符内。都选传
# # 广告位id。限制64字符内。都选传
# 'placement_id': '
',
'placement_id'
:
'222
'
,
# # 转化id。限制64字符内。都选传
# # 转化id。限制64字符内。都选传
# 'conversion_id': '
',
'conversion_id'
:
'333
'
,
# # 广告点击id。限制64字符内。都选传
# # 广告点击id。限制64字符内。都选传
# 'click_id': '
',
'click_id'
:
'765432354634
'
,
# # 广告展示id。限制64字符内。都选传
# # 广告展示id。限制64字符内。都选传
# 'impression_id': '
',
'impression_id'
:
'444
'
,
# # 广告请求id。限制64字符内。都选传
# # 广告请求id。限制64字符内。都选传
# 'request_id': '',
# 'request_id': '',
# # 渠道回调id。限制256字符。都选传
# # 渠道回调id。限制256字符。都选传
#
'callback_id': 'EJiw267wvfQCGKf2g74ZIPD89-vIATAMOAFCIjIwMTkxMTI3MTQxMTEzMDEwMDI2MDc3MjE1MTUwNTczNTBIAQ==',
'callback_id'
:
'EJiw267wvfQCGKf2g74ZIPD89-vIATAMOAFCIjIwMTkxMTI3MTQxMTEzMDEwMDI2MDc3MjE1MTUwNTczNTBIAQ=='
,
# 渠道回调地址。限制256字符。都选传
# 渠道回调地址。限制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': ''
# 'custom_params_1': ''
...
@@ -84,9 +84,11 @@ data_temp = json.dumps(parms)
...
@@ -84,9 +84,11 @@ data_temp = json.dumps(parms)
# print(p.url)
# print(p.url)
# print(p.status_code)
# print(p.status_code)
# print(p.content)
# print(p.content)
def
send_request
(
dl
,
cs
):
def
send_request
(
cs
):
global
parms
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
)
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
print
(
response
.
url
)
parms
=
json
.
loads
(
data_temp
)
parms
=
json
.
loads
(
data_temp
)
...
@@ -95,9 +97,10 @@ def send_request(dl, cs):
...
@@ -95,9 +97,10 @@ def send_request(dl, cs):
def
send_request3
(
dl
,
cs
):
def
send_request3
(
cs
):
global
parms
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
))
parms
[
'ts'
]
=
int
(
round
(
time
.
time
()
*
1000
))
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
print
(
response
.
url
)
...
@@ -111,55 +114,55 @@ def send_request3(dl, cs):
...
@@ -111,55 +114,55 @@ def send_request3(dl, cs):
# idfa为空
# idfa为空
def
test_idfa1
():
def
test_idfa1
():
parms
[
'idfa'
]
=
''
parms
[
'idfa'
]
=
''
re
=
send_request
(
'
QJZfmma'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfa为全0
# idfa为全0
def
test_idfa2
():
def
test_idfa2
():
parms
[
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
parms
[
'idfa'
]
=
'00000000-0000-0000-0000-000000000000'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfa为32字符
# idfa为32字符
def
test_idfa3
():
def
test_idfa3
():
parms
[
'idfa'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEEF'
parms
[
'idfa'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfa非32字符
# idfa非32字符
def
test_idfa4
():
def
test_idfa4
():
parms
[
'idfa'
]
=
zf35
parms
[
'idfa'
]
=
zf35
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
124
assert
re
[
"status"
]
==
124
# idfa_md5为空
# idfa_md5为空
def
test_idfa_md51
():
def
test_idfa_md51
():
parms
[
'idfa_md5'
]
=
''
parms
[
'idfa_md5'
]
=
''
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfa_md5为全0 md5加密
# idfa_md5为全0 md5加密
def
test_idfa_md52
():
def
test_idfa_md52
():
parms
[
'idfa_md5'
]
=
'9f89c84a559f573636a47ff8daed0d33'
parms
[
'idfa_md5'
]
=
'9f89c84a559f573636a47ff8daed0d33'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfa_md5为32字符
# idfa_md5为32字符
def
test_idfa_md53
():
def
test_idfa_md53
():
parms
[
'idfa_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
parms
[
'idfa_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfa_md5非32字符
# idfa_md5非32字符
def
test_idfa_md54
():
def
test_idfa_md54
():
parms
[
'idfa_md5'
]
=
zf35
parms
[
'idfa_md5'
]
=
zf35
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
187
assert
re
[
"status"
]
==
187
...
@@ -168,27 +171,27 @@ def test_idfa_md54():
...
@@ -168,27 +171,27 @@ def test_idfa_md54():
# idfv为空
# idfv为空
def
test_idfv1
():
def
test_idfv1
():
parms
[
'idfv'
]
=
''
parms
[
'idfv'
]
=
''
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfv为全0
# idfv为全0
def
test_idfv2
():
def
test_idfv2
():
parms
[
'idfv'
]
=
'00000000-0000-0000-0000-000000000000'
parms
[
'idfv'
]
=
'00000000-0000-0000-0000-000000000000'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfv为32字符
# idfv为32字符
def
test_idfv3
():
def
test_idfv3
():
parms
[
'idfv'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEEF'
parms
[
'idfv'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEEF'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfv非32字符
# idfv非32字符
def
test_idfv4
():
def
test_idfv4
():
parms
[
'idfv'
]
=
zf35
parms
[
'idfv'
]
=
zf35
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
125
assert
re
[
"status"
]
==
125
...
@@ -196,28 +199,28 @@ def test_idfv4():
...
@@ -196,28 +199,28 @@ def test_idfv4():
# idfv_md5为空
# idfv_md5为空
def
test_idfv_md51
():
def
test_idfv_md51
():
parms
[
'idfv_md5'
]
=
''
parms
[
'idfv_md5'
]
=
''
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfv_md5为全0 md5加密
# idfv_md5为全0 md5加密
def
test_idfv_md52
():
def
test_idfv_md52
():
parms
[
'idfv_md5'
]
=
'9f89c84a559f573636a47ff8daed0d33'
parms
[
'idfv_md5'
]
=
'9f89c84a559f573636a47ff8daed0d33'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfv_md5为32字符
# idfv_md5为32字符
def
test_idfv_md53
():
def
test_idfv_md53
():
parms
[
'idfa_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
parms
[
'idfa_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
0
assert
re
[
"status"
]
==
0
# idfv_md5非32字符
# idfv_md5非32字符
def
test_idfv_md54
():
def
test_idfv_md54
():
parms
[
'idfv_md5'
]
=
zf35
parms
[
'idfv_md5'
]
=
zf35
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
188
assert
re
[
"status"
]
==
188
...
@@ -225,21 +228,21 @@ def test_idfv_md54():
...
@@ -225,21 +228,21 @@ def test_idfv_md54():
# 短链是ios,传oaid
# 短链是ios,传oaid
def
test_oaid
():
def
test_oaid
():
parms
[
'oaid'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEE'
parms
[
'oaid'
]
=
'3DEA635F-B24F-434B-833F-4ED028FEAEE'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
# 短链是ios,传oaid_md5
# 短链是ios,传oaid_md5
def
test_oaid_md5
():
def
test_oaid_md5
():
parms
[
'oaid_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
parms
[
'oaid_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
# 短链是ios,传imei1
# 短链是ios,传imei1
def
test_imei1
():
def
test_imei1
():
parms
[
'imei1'
]
=
'8342732742383'
parms
[
'imei1'
]
=
'8342732742383'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
...
@@ -247,35 +250,35 @@ def test_imei1():
...
@@ -247,35 +250,35 @@ def test_imei1():
# 短链是ios,传imei1_md5
# 短链是ios,传imei1_md5
def
test_imei1_md5
():
def
test_imei1_md5
():
parms
[
'imei1_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
parms
[
'imei1_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
# 短链是ios,传imei2
# 短链是ios,传imei2
def
test_imei2
():
def
test_imei2
():
parms
[
'imei2'
]
=
'8342732742383'
parms
[
'imei2'
]
=
'8342732742383'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
# 短链是ios,传imei2_md5
# 短链是ios,传imei2_md5
def
test_imei2_md5
():
def
test_imei2_md5
():
parms
[
'imei2_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
parms
[
'imei2_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
# 短链是ios,传gaid
# 短链是ios,传gaid
def
test_gaid
():
def
test_gaid
():
parms
[
'gaid'
]
=
'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
parms
[
'gaid'
]
=
'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
# 短链是ios,传gaid_md5
# 短链是ios,传gaid_md5
def
test_gaid_md5
():
def
test_gaid_md5
():
parms
[
'gaid_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
parms
[
'gaid_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
...
@@ -283,7 +286,7 @@ def test_gaid_md5():
...
@@ -283,7 +286,7 @@ def test_gaid_md5():
# 短链是ios,传mac
# 短链是ios,传mac
def
test_mac
():
def
test_mac
():
parms
[
'mac'
]
=
'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
parms
[
'mac'
]
=
'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
...
@@ -291,14 +294,14 @@ def test_mac():
...
@@ -291,14 +294,14 @@ def test_mac():
# 短链是ios,传mac_md5
# 短链是ios,传mac_md5
def
test_mac_md5
():
def
test_mac_md5
():
parms
[
'mac_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
parms
[
'mac_md5'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
# 短链是ios,传android_id
# 短链是ios,传android_id
def
test_android_id
():
def
test_android_id
():
parms
[
'android_id'
]
=
'1a34fc556a43c453'
parms
[
'android_id'
]
=
'1a34fc556a43c453'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
...
@@ -306,7 +309,7 @@ def test_android_id():
...
@@ -306,7 +309,7 @@ def test_android_id():
# 短链是ios,传android_id_md5
# 短链是ios,传android_id_md5
def
test_android_id_md5
():
def
test_android_id_md5
():
parms
[
'android_id'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
parms
[
'android_id'
]
=
'8e488a40a17aed2f6752f51382a4eafc'
re
=
send_request
(
'
nEFnQra'
,
'
'
)
re
=
send_request
(
''
)
assert
re
[
"status"
]
==
115
assert
re
[
"status"
]
==
115
...
...
yanchidp/dp.py
View file @
39217a44
...
@@ -8,9 +8,8 @@ import random
...
@@ -8,9 +8,8 @@ import random
headers
=
{
'Content-Type'
:
'application/json'
}
headers
=
{
'Content-Type'
:
'application/json'
}
current_time_13
=
int
(
round
(
time
.
time
()
*
1000
))
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'
URL_install
=
'http://link.trackingio.com/dpquery'
class
allEvent
:
class
allEvent
:
# 激活
# 激活
...
...
yanchidp/dp_diaoyong.py
View file @
39217a44
...
@@ -3,15 +3,16 @@ import socket
...
@@ -3,15 +3,16 @@ import socket
import
struct
import
struct
import
random
import
random
import
time
import
time
# appkey = '16dc0cb882d3dbec4f7f66251a84d6dd'
appkey
=
'3f2706b7afdf89d95ffa7d2e9cc13e2e'
# for _ in range(1):
for
_
in
range
(
1
):
# # 随机生成12为数组
# 随机生成12为数组
# # i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = ''.join(str(random.choice(range(10))) for _ in range(12))
# i = '352745509625'
i
=
'581386117745'
# # 随机生成ip
# 随机生成ip
# ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
# # ip = '100.120.179.101'
# ip = '100.120.179.101'
# # allEvent().ziding_event(i,ip,appkey,event)
# allEvent().ziding_event(i,ip,appkey,event)
# allEvent().dp_imei(i, appkey)
allEvent
()
.
dp_imei
(
i
,
appkey
)
# # allEvent().dp_ios(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