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
76ac8f9e
Commit
76ac8f9e
authored
Jul 18, 2022
by
liuxiaoxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
f5dc8483
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
242 additions
and
327 deletions
+242
-327
click.py
android_click/click.py
+22
-19
android_script.py
android_event/android_script.py
+3
-2
android_fenlianjie.py
android_event_case/android_fenlianjie.py
+4
-4
click.py
fenbao_android_click/click.py
+11
-10
android_script.py
fenbao_android_event/android_script.py
+116
-120
android_fenlianjie.py
fenbao_android_event_case/android_fenlianjie.py
+2
-4
attributioncaseios.py
microservices/attributioncaseios.py
+32
-16
receiveandroid.py
microservices/receiveandroid.py
+2
-2
receiveios.py
microservices/receiveios.py
+11
-133
redirectios.py
microservices/redirectios.py
+2
-2
attributioncaseios.py
tkio/attributioncaseios.py
+20
-0
clickios.py
tkio/clickios.py
+2
-2
tkioreceive.py
tkio/tkioreceive.py
+4
-3
x_launch.py
xiaochengxu/x_launch.py
+6
-6
xiaochenxu_script.py
xiaochengxu/xiaochenxu_script.py
+5
-4
No files found.
android_click/click.py
View file @
76ac8f9e
...
...
@@ -38,8 +38,8 @@ ry_adplan_name = 'c测试1'
ry_adcreative_name
=
'c测试1'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid
=
'rryingxiao_int'
# URL = 'http://52.80.137.106:8083/tkio/euAVfua?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/tkio/a6ZVNb
a?noredirect=true'
URL
=
'http://uri6.com/tkio/q6VFJva?noredirect=true
'
# URL = 'http://52.80.137.106:8083/tkio/rQVVRn
a?noredirect=true'
# 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
...
...
@@ -60,7 +60,7 @@ def computeMD5upper(message):
return
m
.
hexdigest
()
.
upper
()
appkey
=
'
16dc0cb882d3dbec4f7f66251a84d6dd
'
appkey
=
'
8a390227254c03dbcaddbca009cd6e8b
'
lst
=
[]
nowTime
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
s
=
0
...
...
@@ -134,11 +134,14 @@ for index in range(1):
# 'oaid': "9f80c84a559f573636a47ff8daed0d32",
# 'muid': "4C63905D9694B9BF8D3EE38E64809A73",
# 'mac': "5432453241421",
# 'subchannel': '333',
# 'aid': '111',
# 'siteid': '222',
# 子渠道
'subchannel'
:
'2000'
,
# 计划
'aid'
:
'888'
,
# 广告位
'siteid'
:
'777'
,
# 流量来源
# 'csite': '4000
6',
'csite'
:
'66
6'
,
# "timestamp": "1569141628027",
# "creative": "31096865315",
# "deviceid": 'null',
...
...
@@ -162,7 +165,7 @@ for index in range(1):
# '_carrier': '1',
# 'syscountryc': '1',
# 'sysrtime': '1',
"accountid"
:
accountid
#
"accountid": accountid
}
# timeout可以超时四秒
# verify = False
...
...
@@ -190,7 +193,7 @@ for index in range(1):
# print('androidid', a)
w
=
w
+
1
time
.
sleep
(
10
)
time
.
sleep
(
8
)
try
:
allEvent
()
.
installUpload
(
i
,
ip
,
appkey
)
# allEvent().formevent(i, ip, appkey)
...
...
@@ -198,8 +201,8 @@ for index in range(1):
except
Exception
:
print
(
'install_wrong:'
,
w
)
w
=
w
+
1
# #
# #
# #
#
# #
#
# time.sleep(5)
# try:
# allEvent().registerEvent(i, ip, appkey)
...
...
@@ -274,14 +277,14 @@ for index in range(1):
# num = index + 1
# event = 'event_' + str(num)
event
=
'event_30'
time
.
sleep
(
3
)
try
:
allEvent
()
.
ziding_event
(
i
,
ip
,
appkey
,
event
)
print
(
event
)
except
Exception
as
err
:
print
(
err
)
print
(
'自定义_wrong:'
,
w
)
#
event = 'event_30'
#
time.sleep(3)
#
try:
#
allEvent().ziding_event(i, ip, appkey, event)
#
print(event)
#
except Exception as err:
#
print(err)
#
print('自定义_wrong:', w)
# time.sleep(6)
# try:
...
...
android_event/android_script.py
View file @
76ac8f9e
...
...
@@ -7,8 +7,8 @@ headers = {'Content-Type': 'application/json', 'X-RY-Access-Token': 'test_access
# 测试环境
URL_batch
=
'http://10.3.20.42:8080/receive/batch'
URL
=
'http://52.80.137.106:8080/receive/tkio/'
#
URL = 'http://log.trackingio.com/receive/tkio/'
#
URL = 'http://52.80.137.106:8080/receive/tkio/'
URL
=
'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
# URL = 'http://172.31.21.207:8080/receive/tkio/'
# URL = 'http://120.53.212.71/receive/tkio/'
...
...
@@ -77,6 +77,7 @@ class allEvent:
# "_campaignid": 'default',
"_deviceid"
:
i
,
"_imei"
:
i
,
"mobdna_info"
:
"{
\"
mobdna_oid
\"
:
\"
95820f88217ec8cbdf621919bb81c0a5
\"
,
\"
mobdna_appkey
\"
:
\"
16dc0cb882d3dbec4f7f66251a84d6dd
\"
,
\"
mobdna_rdid
\"
:
\"
28B781FA18D703ECC2348EDD58B921F5
\"
,
\"
mobdna_requestid
\"
:
\"
463cfd5564d24d30a607a18a1e8ae2d8
\"
}"
,
# '_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',
...
...
android_event_case/android_fenlianjie.py
View file @
76ac8f9e
...
...
@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活
appkey
=
'
65a61151b2af3ee371ada521a1f9efef
'
appkey
=
'
c48648ecb068a70408e93702e718cc49
'
# 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd
...
...
@@ -38,8 +38,8 @@ for index in range(1):
# p = '987654321234567'
# s = '2321321312h8ro321'
#
i = ''.join(str(random.choice(range(10))) for _ in range(12))
i
=
'686032665843'
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
#
i = '686032665843'
# i = '00000000-0000-0000-0000-000000000000'
# 随机生成ipXXXX XXCB489741-0029-4A35-8E38-D142F836B623
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
...
...
@@ -52,7 +52,7 @@ for index in range(1):
# time.sleep(1)
allEvent
()
.
startupEvent
(
i
,
ip
,
appkey
)
# # time.sleep(1)
allEvent
()
.
loginEvent
(
i
,
ip
,
appkey
)
#
allEvent().loginEvent(i, ip, appkey)
# time.sleep(1)
# allEvent().registerEvent(i, ip, appkey)
# allEvent().payEvent(i, ip, appkey)
...
...
fenbao_android_click/click.py
View file @
76ac8f9e
...
...
@@ -8,11 +8,12 @@ import time
#向短链发送点击数据
#!!!!分包需要删掉https的s
URL
=
'http://uri6.com/tkio/eeQfQza?noredirect=true&callback= http
%3
A
%2
F
%2
Fad.toutiao.com
%2
Ftrack
%2
Factivate
%2
F
%3
Fcallback
%3
DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA
%26
os
%3
D0
%26
muid
%3
D'
# URL = 'http://uri6.com/tkio/eeQfQza?noredirect=true&callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D'
URL
=
'http://52.80.137.106:8083/tkio/rQrYJza?noredirect=true'
appkey
=
'
8a390227254c03dbcaddbca009cd6e8b
'
appkey
=
'
ee977614c940fc833f474d0696b852a0
'
# event = 'invoke'
cmpaignid
=
'11
22
'
cmpaignid
=
'11
11
'
# 广告创意ID
ry_adcreative_id
=
'9876543'
# 广告组ID
...
...
@@ -52,13 +53,13 @@ for index in range(1):
# 'creativeId':'21321321312123',
# 'requestId':'312321321312',
# 'adId': long('21231'),
'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
,
"accountid"
:
accountid
#
'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,
#
"accountid": accountid
}
...
...
fenbao_android_event/android_script.py
View file @
76ac8f9e
...
...
@@ -3,40 +3,38 @@ import json
import
time
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://52.80.137.106
:8080/receive/tkio/'
#
URL = 'http://log.trackingio.com/receive/tkio/'
# URL = 'http://120.53.212.71/receive/tkio/'
# URL = 'http://tlog.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
#时间戳
#
时间戳
current_time_13
=
int
(
round
(
time
.
time
()
*
1000
))
#时间和日期
#
时间和日期
when
=
time
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
,
time
.
localtime
(
time
.
time
()))
#日期
#
日期
ds
=
time
.
strftime
(
'
%
Y-
%
m-
%
d'
,
time
.
localtime
(
time
.
time
()))
#设备品牌
#
设备品牌
manufacturer
=
'vivo'
#设备系统
#
设备系统
ryos
=
'android'
#设备类型
#
设备类型
rydevicetype
=
'vivox9'
#网络类型
network
=
'wifi'
#分辨率
resolution
=
'1344*750'
#运行商
op
=
'中国移动'
#
网络类型
network
=
'wifi'
#
分辨率
resolution
=
'1344*750'
#
运行商
op
=
'中国移动'
# 支付类型 支付宝(alipay),银联(unionpay),微信支付(weixinpay),易宝支付(yeepay)
paymenttype
=
'alipay'
#货币类型
#
货币类型
currencytype
=
'CNY'
#支付的货币金额
#
支付的货币金额
currencyamount
=
'45'
when1
=
'2020-06-04 10:00:00'
# (设备型号)
...
...
@@ -45,30 +43,33 @@ model = ''
ryosversion
=
''
carrier
=
'中国联通'
lv
=
'1.5.0'
class
allEvent
:
# 激活
def
installUpload
(
self
,
i
,
IP
,
appkey
,
cmpaignid
):
def
installUpload
(
self
,
i
,
IP
,
appkey
,
cmpaignid
):
s
=
json
.
dumps
({
# "what":'install',
"appid"
:
appkey
,
"context"
:{
"appid"
:
appkey
,
"context"
:
{
'_category'
:
'APPMARKET'
,
"_campaignid"
:
cmpaignid
,
# "_channelid": cmpaignid,
"_deviceid"
:
i
,
"_imei"
:
i
,
"_androidid"
:
i
,
"_ip"
:
IP
,
"_deviceid"
:
i
,
"_imei"
:
i
,
"_androidid"
:
i
,
"_ip"
:
IP
,
'_manufacturer'
:
manufacturer
,
'_ryos'
:
ryos
,
'_rydevicetype'
:
rydevicetype
,
'_network'
:
network
,
'_resolution'
:
resolution
,
'_op'
:
op
,
'_timestamp'
:
current_time_13
,
'_op'
:
op
,
'_timestamp'
:
current_time_13
,
'uniqueName'
:
'2221'
,
"_model"
:
model
,
"_ryosversion"
:
ryosversion
,
"mobdna_info"
:
"{
\"
mobdna_oid
\"
:
\"
95820f88217ec8cbdf621919bb81c0a5
\"
,
\"
mobdna_appkey
\"
:
\"
16dc0cb882d3dbec4f7f66251a84d6dd
\"
,
\"
mobdna_rdid
\"
:
\"
60AF84954A2AF80A07249708703519CB
\"
,
\"
mobdna_requestid
\"
:
\"
463cfd5564d24d30a607a18a1e8ae2d8
\"
}"
,
# 'adgroupId': '324322'
...
...
@@ -109,39 +110,37 @@ class allEvent:
},
'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
,
'who'
:
'lxx_test'
})
p
=
requests
.
post
(
url
=
URL
+
'install'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
p
=
requests
.
post
(
url
=
URL
+
'install'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
print
(
p
.
text
)
print
(
when
)
#注册
def
registerEvent
(
self
,
i
,
IP
,
appkey
):
# 注册
def
registerEvent
(
self
,
i
,
IP
,
appkey
):
s
=
json
.
dumps
({
'what'
:
'register'
,
'appid'
:
appkey
,
'context'
:{
'_deviceid'
:
i
,
'_imei'
:
i
,
'_androidid'
:
i
,
'_ip'
:
IP
,
'what'
:
'register'
,
'appid'
:
appkey
,
'context'
:
{
'_deviceid'
:
i
,
'_imei'
:
i
,
'_androidid'
:
i
,
'_ip'
:
IP
,
'_timestamp'
:
current_time_13
},
'when'
:
when
,
'ds'
:
ds
,
'who'
:
'lxx_test'
'when'
:
when
,
'ds'
:
ds
,
'who'
:
'lxx_test'
})
p
=
requests
.
post
(
url
=
URL
+
'register'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
p
=
requests
.
post
(
url
=
URL
+
'register'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
print
(
p
.
text
)
#登陆
def
loginEvent
(
self
,
i
,
IP
,
appkey
):
# 登陆
def
loginEvent
(
self
,
i
,
IP
,
appkey
):
s
=
json
.
dumps
({
'what'
:
'loggedin'
,
'appid'
:
appkey
,
...
...
@@ -157,14 +156,13 @@ class allEvent:
'ds'
:
ds
,
'who'
:
'lxx_test'
})
p
=
requests
.
post
(
url
=
URL
+
'loggedin'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
p
=
requests
.
post
(
url
=
URL
+
'loggedin'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
print
(
p
.
text
)
# 付费
#付费
def
payEvent
(
self
,
i
,
IP
,
appkey
):
#订单号
def
payEvent
(
self
,
i
,
IP
,
appkey
):
# 订单号
transactionid
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
19
))
s
=
json
.
dumps
({
'what'
:
'payment'
,
...
...
@@ -175,7 +173,7 @@ class allEvent:
'_androidid'
:
i
,
'_ip'
:
IP
,
'_timestamp'
:
current_time_13
,
'_transactionid'
:
transactionid
,
'_transactionid'
:
transactionid
,
'_paymenttype'
:
paymenttype
,
'_currencytype'
:
currencytype
,
'_currencyamount'
:
currencyamount
,
...
...
@@ -185,39 +183,38 @@ class allEvent:
'ds'
:
ds
,
'who'
:
'lxx_test'
})
p
=
requests
.
post
(
url
=
URL
+
'payment'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
p
=
requests
.
post
(
url
=
URL
+
'payment'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
print
(
p
.
text
)
# 订单
def
orderEvent
(
self
,
i
,
IP
,
appkey
):
# 订单号
# 订单号
transactionid
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
19
))
s
=
json
.
dumps
({
'what'
:
'order'
,
'appid'
:
appkey
,
'context'
:
{
'_deviceid'
:
i
,
'_imei'
:
i
,
'_androidid'
:
i
,
'_ip'
:
IP
,
'_timestamp'
:
current_time_13
,
'_transactionid'
:
transactionid
,
'_paymenttype'
:
paymenttype
,
'_currencytype'
:
currencytype
,
'_currencyamount'
:
currencyamount
,
'what'
:
'order'
,
'appid'
:
appkey
,
'context'
:
{
'_deviceid'
:
i
,
'_imei'
:
i
,
'_androidid'
:
i
,
'_ip'
:
IP
,
'_timestamp'
:
current_time_13
,
'_transactionid'
:
transactionid
,
'_paymenttype'
:
paymenttype
,
'_currencytype'
:
currencytype
,
'_currencyamount'
:
currencyamount
,
},
'when'
:
when
,
'ds'
:
ds
,
'who'
:
'lxx_test'
'when'
:
when
,
'ds'
:
ds
,
'who'
:
'lxx_test'
})
p
=
requests
.
post
(
url
=
URL
+
'order'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
p
=
requests
.
post
(
url
=
URL
+
'order'
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
print
(
p
.
text
)
#自定义事件
def
ziding_event
(
self
,
i
,
IP
,
appkey
,
event
):
# 自定义事件
def
ziding_event
(
self
,
i
,
IP
,
appkey
,
event
):
s
=
json
.
dumps
({
'what'
:
event
,
'appid'
:
appkey
,
...
...
@@ -226,60 +223,59 @@ class allEvent:
'_imei'
:
i
,
'_androidid'
:
i
,
'_ip'
:
IP
,
#识别是否为自定义事件,默认传1
'_isreyundefaultevent'
:
'1'
# 识别是否为自定义事件,默认传1
'_isreyundefaultevent'
:
'1'
},
'when'
:
time
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
,
time
.
localtime
(
time
.
time
())),
'ds'
:
ds
,
'who'
:
'lxx_test'
})
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
)
# 自定义事件
def
invoke_test
(
self
,
i
,
IP
,
appkey
,
cmpaignid
):
# 自定义事件
def
invoke_test
(
self
,
i
,
IP
,
appkey
,
cmpaignid
):
s
=
json
.
dumps
({
"what"
:
"invoke"
,
"appType"
:
""
,
"appid"
:
appkey
,
"context"
:
{
"_campaignid"
:
cmpaignid
,
"_rydevicetype"
:
"iPhone"
,
"_ip"
:
IP
,
"_ryosversion"
:
ryosversion
,
"_manufacturer"
:
"苹果"
,
"frequency"
:
"0.000"
,
"_app_version"
:
"2.0"
,
"_isreyundefaultevent"
:
"1"
,
"_deviceid"
:
i
,
"_device_gps"
:
"unknown"
,
"_jbk"
:
"0"
,
"_timestamp"
:
"1565941809351"
,
"_imei"
:
i
,
# "_idfa": "DBC93722-E34B-440C-B7A7-FB6641D0D9AB",
"_idfv"
:
i
,
"_lib_version"
:
lv
,
"_carrier"
:
carrier
,
"_ry_ts"
:
"1565941809416"
,
"_create_timestamp"
:
"1565941809351"
,
"_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"
,
"_model"
:
model
,
"_mac"
:
"02:00:00:00:00:00"
,
"_network_type"
:
"WIFI"
,
"_lats"
:
"1"
"what"
:
"invoke"
,
"appType"
:
""
,
"appid"
:
appkey
,
"context"
:
{
"_campaignid"
:
cmpaignid
,
"_rydevicetype"
:
"iPhone"
,
"_ip"
:
IP
,
"_ryosversion"
:
ryosversion
,
"_manufacturer"
:
"苹果"
,
"frequency"
:
"0.000"
,
"_app_version"
:
"2.0"
,
"_isreyundefaultevent"
:
"1"
,
"_deviceid"
:
i
,
"_device_gps"
:
"unknown"
,
"_jbk"
:
"0"
,
"_timestamp"
:
"1565941809351"
,
"_imei"
:
i
,
# "_idfa": "DBC93722-E34B-440C-B7A7-FB6641D0D9AB",
"_idfv"
:
i
,
"_lib_version"
:
lv
,
"_carrier"
:
carrier
,
"_ry_ts"
:
"1565941809416"
,
"_create_timestamp"
:
"1565941809351"
,
"_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"
,
"_model"
:
model
,
"_mac"
:
"02:00:00:00:00:00"
,
"_network_type"
:
"WIFI"
,
"_lats"
:
"1"
},
"where"
:
"event"
,
"when"
:
time
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
,
time
.
localtime
(
time
.
time
())),
"ds"
:
when
,
"who"
:
"unknown"
"where"
:
"event"
,
"when"
:
time
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
,
time
.
localtime
(
time
.
time
())),
"ds"
:
when
,
"who"
:
"unknown"
})
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
)
fenbao_android_event_case/android_fenlianjie.py
View file @
76ac8f9e
...
...
@@ -5,12 +5,12 @@ import random
import
time
import
time
#安卓分包激活
appkey
=
'
6012db28b7fbdfcb1e3a847756137f9b
'
appkey
=
'
ee977614c940fc833f474d0696b852a0
'
#57ed2dd31596bb4682471e82c0c73c1a
# 4b25b8a4dc584e63e9a7b81c3adedf2f
# event = 'event_10'
cmpaignid
=
'11
2222
'
cmpaignid
=
'11
11
'
for
index
in
range
(
1
):
# 随机生成12为数组
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
...
...
@@ -30,6 +30,4 @@ for index in range(1):
# allEvent().payEvent(i, ip, appkey)
# allEvent().registerEvent(i, ip, appkey)
# allEvent().invoke_test(i, ip, appkey,cmpaignid)
print
(
i
)
microservices/attributioncaseios.py
View file @
76ac8f9e
...
...
@@ -86,7 +86,7 @@ def test_atb3():
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
time
.
sleep
(
1
)
receiveios
.
data
[
0
][
'device_info'
][
'idfa'
]
=
i
receiveios
.
data
[
0
][
'device_info'
][
'idfa_md5'
]
=
computeMD5
(
i
)
receiveios
.
data
[
0
][
'device_info'
][
'idfv'
]
=
v
...
...
@@ -771,7 +771,6 @@ def test_atb29():
# -------------------------------后续事件归因---------------------------------
# 目前无法验证后续事件是否匹配到了激活,等测试回调时一起测试该功能
# device_id相同-可通过device_id进行关联
def
test_atb30
():
i
=
idfacode
()
...
...
@@ -876,20 +875,20 @@ def test_atb32():
def
test_atb33
():
i
=
idfacode
()
v
=
idfvcode
()
#
redirectios.parms['idfa'] = i
#
redirectios.parms['idfa_md5'] = computeMD5(i)
#
redirectios.send_request3('')
#
time.sleep(8)
#
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()
#
time.sleep(3)
redirectios
.
parms
[
'idfa'
]
=
i
redirectios
.
parms
[
'idfa_md5'
]
=
computeMD5
(
i
)
redirectios
.
send_request3
(
''
)
time
.
sleep
(
8
)
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
()
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
...
...
@@ -1219,6 +1218,23 @@ def test_atb44():
print
(
i
)
# 自然量
def
test_atb46
():
i
=
idfacode
()
v
=
idfvcode
()
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
.
data
[
0
][
"event_info"
][
'event_name'
]
=
'install'
receiveios
.
send_request
()
print
(
i
)
# -----------------------asa逻辑测试--------------------
# 数据为测试数据,不是asa激活,走正常归因逻辑
...
...
microservices/receiveandroid.py
View file @
76ac8f9e
...
...
@@ -234,11 +234,11 @@ def test_app_empty():
assert
response
[
"status"
]
==
"101"
# appkey
长度非法
# appkey
不存在
def
test_app_illegal_length
():
data
[
0
][
"application_info"
][
"appkey"
]
=
"74b81be2432c029040e0b2bc375ce7fb3"
response
=
send_request
()
assert
response
[
"status"
]
==
"1
01
"
assert
response
[
"status"
]
==
"1
90
"
# bundleid为空
...
...
microservices/receiveios.py
View file @
76ac8f9e
...
...
@@ -13,6 +13,8 @@ headers = {
}
# 生成小写字母加数字组合
n
=
10
def
code_nums1
(
n
=
6
):
ret
=
''
for
i
in
range
(
n
):
...
...
@@ -25,6 +27,8 @@ def code_nums1(n=6):
# 生成数字组合
n
=
10
def
code_nums2
(
n
=
6
):
ret
=
''
for
i
in
range
(
n
):
...
...
@@ -33,6 +37,7 @@ def code_nums2(n=6):
ret
+=
s
return
ret
global
data
data
=
[
{
...
...
@@ -73,6 +78,8 @@ data = [
"idfa_md5"
:
"c3381276ae145b3663c8e0f6dd9f628a"
,
"idfv"
:
"3DEA635F-B24F-434B-833F-4ED028FEAEEF"
,
"idfv_md5"
:
"c3381276ae145b3663c8e0f6dd9f628a"
,
"carrier"
:
"TEST"
,
"city"
:
"beijing"
},
"event_info"
:
{
...
...
@@ -160,9 +167,9 @@ def send_request():
# 对接se地址
# url = 'http://tmtest-se.trackingio.com/receive/tkiov2/sdk'
# 测试
#
url = "http://tmtest.trackingio.com/receive/tkiov2/sdk"
url
=
"http://tmtest.trackingio.com/receive/tkiov2/sdk"
# 线上
url
=
"http://tkio-receive.solar-engine.com/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
))
...
...
@@ -195,8 +202,6 @@ def send_request2():
return
response
# iad_retry_times为num型,应该返回214,但是实时接收时接收到的是string类型,无法判断number
def
test_se1
():
data
[
0
][
"asa_info"
][
"iad_info"
][
'iad_retry_times'
]
=
3
...
...
@@ -395,13 +400,6 @@ def test_iad_attribution5():
assert
response
[
"status"
]
==
"0"
# iad-org-name为空
def
test_iad_org_name1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-org-name'
]
=
''
...
...
@@ -423,8 +421,6 @@ def test_iad_org_name3():
assert
response
[
"status"
]
==
"197"
# iad-org-name为特殊字符和中文组合
def
test_iad_org_name4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-org-name'
]
=
"@# ¥
%
测试一下"
...
...
@@ -432,17 +428,6 @@ def test_iad_org_name4():
assert
response
[
"status"
]
==
"0"
# iad-org-id为空
def
test_iad_org_id1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-org-id'
]
=
''
...
...
@@ -464,8 +449,6 @@ def test_iad_org_id3():
assert
response
[
"status"
]
==
"198"
# iad-org-id为特殊字符和中文组合
def
test_iad_org_id4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-org-id'
]
=
"@# ¥
%
测试一下"
...
...
@@ -473,19 +456,6 @@ def test_iad_org_id4():
assert
response
[
"status"
]
==
"0"
# iad-campaign-id为空
def
test_iad_campaign_id1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-campaign-id'
]
=
''
...
...
@@ -507,8 +477,6 @@ def test_iad_campaign_id3():
assert
response
[
"status"
]
==
"199"
# iad-campaign-id为特殊字符和中文组合
def
test_iad_campaign_id4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-campaign-id'
]
=
"@# ¥
%
测试一下"
...
...
@@ -516,12 +484,6 @@ def test_iad_campaign_id4():
assert
response
[
"status"
]
==
"0"
# iad_campaign_name为空
def
test_iad_campaign_name1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-campaign-name'
]
=
''
...
...
@@ -543,8 +505,6 @@ def test_iad_campaign_name3():
assert
response
[
"status"
]
==
"200"
# iad_campaign_name为特殊字符和中文组合
def
test_iad_campaign_name4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-campaign-name'
]
=
"@# ¥
%
测试一下"
...
...
@@ -552,22 +512,6 @@ def test_iad_campaign_name4():
assert
response
[
"status"
]
==
"0"
# iad_purchase-date为空
def
test_iad_purchase_date1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-purchase-date'
]
=
''
...
...
@@ -589,8 +533,6 @@ def test_iad_purchase_date3():
assert
response
[
"status"
]
==
"201"
# iad_purchase-date为特殊字符和中文组合
def
test_iad_purchase_date4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-purchase-date'
]
=
"@# ¥
%
测试一下"
...
...
@@ -605,19 +547,6 @@ def test_iad_purchase_date5():
assert
response
[
"status"
]
==
"0"
# iad_conversion-date为空
def
test_iad_conversion_date1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-conversion-date'
]
=
''
...
...
@@ -639,8 +568,6 @@ def test_iad_conversion_date3():
assert
response
[
"status"
]
==
"202"
# iad_conversion-date为特殊字符和中文组合
def
test_iad_conversion_date4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-conversion-date'
]
=
"@# ¥
%
测试一下"
...
...
@@ -655,8 +582,6 @@ def test_iad_conversion_date5():
assert
response
[
"status"
]
==
"0"
# iad_conversion-type为空
def
test_iad_conversion_type1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-conversion-type'
]
=
''
...
...
@@ -678,8 +603,6 @@ def test_iad_conversion_type3():
assert
response
[
"status"
]
==
"203"
# iad_conversion-type为特殊字符和中文组合
def
test_iad_conversion_type4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-conversion-type'
]
=
"@# ¥
%
测试一下"
...
...
@@ -694,7 +617,6 @@ def test_iad_conversion_type5():
assert
response
[
"status"
]
==
"0"
# iad_click-date为空
def
test_iad_click_date1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-click-date'
]
=
''
...
...
@@ -716,8 +638,6 @@ def test_iad_click_date3():
assert
response
[
"status"
]
==
"204"
# iad_click-date为特殊字符和中文组合
def
test_iad_click_date4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-click-date'
]
=
"@# ¥
%
测试一下"
...
...
@@ -732,8 +652,6 @@ def test_iad_click_date5():
assert
response
[
"status"
]
==
"0"
# iad_adgroup-id为空
def
test_iad_adgroup_id1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-adgroup-id'
]
=
''
...
...
@@ -755,8 +673,6 @@ def test_iad_adgroup_id3():
assert
response
[
"status"
]
==
"205"
# iad_adgroup-id为特殊字符和中文组合
def
test_iad_adgroup_id4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-adgroup-id'
]
=
"@# ¥
%
测试一下"
...
...
@@ -764,7 +680,6 @@ def test_iad_adgroup_id4():
assert
response
[
"status"
]
==
"0"
# iad_adgroup-name为空
def
test_iad_adgroup_name1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-adgroup-name'
]
=
''
...
...
@@ -786,8 +701,6 @@ def test_iad_adgroup_name3():
assert
response
[
"status"
]
==
"206"
# iad_adgroup-name为特殊字符和中文组合
def
test_iad_adgroup_name4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-adgroup-name'
]
=
"@# ¥
%
测试一下"
...
...
@@ -795,9 +708,6 @@ def test_iad_adgroup_name4():
assert
response
[
"status"
]
==
"0"
# iad-country-or-region为空
def
test_iad_country_or_region1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-country-or-region'
]
=
''
...
...
@@ -819,8 +729,6 @@ def test_iad_country_or_region3():
assert
response
[
"status"
]
==
"207"
# iad-country-or-region为特殊字符和中文组合
def
test_iad_country_or_region4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-country-or-region'
]
=
"@# ¥
%
测试一下"
...
...
@@ -828,7 +736,6 @@ def test_iad_country_or_region4():
assert
response
[
"status"
]
==
"0"
# iad-keyword为空
def
test_iad_keyword1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-keyword'
]
=
''
...
...
@@ -850,8 +757,6 @@ def test_iad_keyword3():
assert
response
[
"status"
]
==
"208"
# iad-keyword为特殊字符和中文组合
def
test_iad_keyword4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-keyword'
]
=
"@# ¥
%
测试一下"
...
...
@@ -859,8 +764,6 @@ def test_iad_keyword4():
assert
response
[
"status"
]
==
"0"
# iad-keyword-id为空
def
test_iad_keyword_id1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-keyword-id'
]
=
''
...
...
@@ -882,8 +785,6 @@ def test_iad_keyword_id3():
assert
response
[
"status"
]
==
"209"
# iad-keyword-id为特殊字符和中文组合
def
test_iad_keyword_id4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-keyword-id'
]
=
"@# ¥
%
测试一下"
...
...
@@ -891,7 +792,6 @@ def test_iad_keyword_id4():
assert
response
[
"status"
]
==
"0"
# iad-keyword-matchtype为空
def
test_iad_keyword_matchtype1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-keyword-matchtype'
]
=
''
...
...
@@ -913,8 +813,6 @@ def test_iad_keyword_matchtype3():
assert
response
[
"status"
]
==
"210"
# iad-keyword-matchtype为特殊字符和中文组合
def
test_iad_keyword_matchtype4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-keyword-matchtype'
]
=
"@# ¥
%
测试一下"
...
...
@@ -922,7 +820,6 @@ def test_iad_keyword_matchtype4():
assert
response
[
"status"
]
==
"0"
# iad-ad-id为空
def
test_iad_ad_id1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-ad-id'
]
=
''
...
...
@@ -944,8 +841,6 @@ def test_iad_ad_id3():
assert
response
[
"status"
]
==
"211"
# iad-ad-id为特殊字符和中文组合
def
test_iad_ad_id4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-ad-id'
]
=
"@# ¥
%
测试一下"
...
...
@@ -974,8 +869,6 @@ def test_iad_lineitem_id3():
assert
response
[
"status"
]
==
"212"
# iad-lineitem-id为特殊字符和中文组合
def
test_iad_lineitem_id4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-lineitem-id'
]
=
"@# ¥
%
测-试一下"
...
...
@@ -983,7 +876,6 @@ def test_iad_lineitem_id4():
assert
response
[
"status"
]
==
"0"
# iad-lineitem-name为空
def
test_iad_lineitem_name1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-lineitem-name'
]
=
''
...
...
@@ -1005,8 +897,6 @@ def test_iad_lineitem_name3():
assert
response
[
"status"
]
==
"213"
# iad-lineitem-name为特殊字符和中文组合
def
test_iad_lineitem_name4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad-lineitem-name'
]
=
"@# ¥
%
测试一下"
...
...
@@ -1014,7 +904,6 @@ def test_iad_lineitem_name4():
assert
response
[
"status"
]
==
"0"
# iad_retry_times为空
def
test_iad_retry_times1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad_retry_times'
]
=
''
...
...
@@ -1036,8 +925,6 @@ def test_iad_retry_times3():
assert
response
[
"status"
]
==
"214"
# iad_retry_times为特殊字符
def
test_iad_retry_times4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad_retry_times'
]
=
"@"
...
...
@@ -1045,7 +932,6 @@ def test_iad_retry_times4():
assert
response
[
"status"
]
==
"0"
# iad_retry_times为中文
def
test_iad_retry_times5
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad_retry_times'
]
=
"测"
...
...
@@ -1053,8 +939,6 @@ def test_iad_retry_times5():
assert
response
[
"status"
]
==
"0"
# iad_error_info为空
def
test_iad_error_info1
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad_error_info'
]
=
''
...
...
@@ -1069,8 +953,6 @@ def test_iad_error_info2():
assert
response
[
"status"
]
==
"0"
# iad_error_info为特殊字符和中文组合
def
test_iad_error_info4
():
data
[
0
][
'asa_info'
][
'iad_info'
][
'iad_error_info'
]
=
"@# ¥
%
测试一下"
...
...
@@ -1078,7 +960,6 @@ def test_iad_error_info4():
assert
response
[
"status"
]
==
"0"
# token为空
def
test_token1
():
data
[
0
][
'asa_info'
][
'adservices_info'
][
'token'
]
=
""
...
...
@@ -1088,7 +969,8 @@ def test_token1():
# token为正常值
def
test_token2
():
data
[
0
][
'asa_info'
][
'adservices_info'
][
'token'
]
=
"k+q1PtvKksjrtMbqONmlPeOztkXqSJ1xqux9EFXvZUAhY5R8szPkUwKOf0nc4d84FvRKY9LZ+3ncRBXuDeFmrtq+WbkEWxgTXwAAAVADAAAA9gAAAIBv7KMoc3AHIi4QyzGWI67z4cAqk9IocPPaAQXHcyM9OVtdMCcg6b0m8EI+27BKknAWOUA9ZoUiQ0vuERiCWWW7tzOZ5pgcnuoYzn18jnlTTTtisEHhw/JLBHg6c8aR/I/mBk11+iMdEAZvQZ68aKwzI3rmmI3Kz/5h9zcZHTphIQAAABV3tAsFnsbMHeC7RT7ymgRtJ+1KiWgAAACfAfzmGF1G6TvapSaorph2MlE1rj/2AAAAhgUFMRHeByS1h0HmhTUPcsgZFWKLpvkZJBORRTKgdLTblWSAdj9yeJ0J/vgK15qBW4eOJELfVGrSBCclb5aqqCNUlhf9a35XXX21822C+FznX7zSfbcB/eOfeyAykz61bLPLjbsw0ZADMUgh+HvAOB6BTypPqinj8+kEYGQsu3tnqC4ZmIudAAAAAAAAAAAAAAABBEUNAAA="
data
[
0
][
'asa_info'
][
'adservices_info'
][
'token'
]
=
"k+q1PtvKksjrtMbqONmlPeOztkXqSJ1xqux9EFXvZUAhY5R8szPkUwKOf0nc4d84FvRKY9LZ+3ncRBXuDeFmrtq+WbkEWxgTXwAAAVADAAAA9gAAAIBv7KMoc3AHIi4QyzGWI67z4cAqk9IocPPaAQXHcyM9OVtdMCcg6b0m8EI+27BKknAWOUA9ZoUiQ0vuERiCWWW7tzOZ5pgcnuoYzn18jnlTTTtisEHhw/JLBHg6c8aR/I/mBk11+iMdEAZvQZ68aKwzI3rmmI3Kz/5h9zcZHTphIQAAABV3tAsFnsbMHeC7RT7ymgRtJ+1KiWgAAACfAfzmGF1G6TvapSaorph2MlE1rj/2AAAAhgUFMRHeByS1h0HmhTUPcsgZFWKLpvkZJBORRTKgdLTblWSAdj9yeJ0J/vgK15qBW4eOJELfVGrSBCclb5aqqCNUlhf9a35XXX21822C+FznX7zSfbcB/eOfeyAykz61bLPLjbsw0ZADMUgh+HvAOB6BTypPqinj8+kEYGQsu3tnqC4ZmIudAAAAAAAAAAAAAAABBEUNAAA="
response
=
send_request
()
assert
response
[
"status"
]
==
"0"
...
...
@@ -1128,8 +1010,6 @@ def test_adservices_retry_times5():
assert
response
[
"status"
]
==
"0"
# adservices_error_info为空
def
test_adservices_error_info1
():
data
[
0
][
'asa_info'
][
'adservices_info'
][
'adservices_error_info'
]
=
''
...
...
@@ -1137,8 +1017,6 @@ def test_adservices_error_info1():
assert
response
[
"status"
]
==
"0"
# adservices_error_info为1000字符
def
test_adservices_error_info2
():
data
[
0
][
'asa_info'
][
'adservices_info'
][
'adservices_error_info'
]
=
code_nums1
(
1000
)
...
...
microservices/redirectios.py
View file @
76ac8f9e
...
...
@@ -102,9 +102,9 @@ def send_request(cs):
def
send_request3
(
cs
):
global
parms
# 测试
# url1 = 'http://tmtest.trackingio.com/receive/turl/I3eYve
a' + cs
url1
=
'http://tmtest.trackingio.com/receive/turl/JJvQFj
a'
+
cs
# 线上
url1
=
'http://tkio-redirect.solar-engine.com/receive/turl/6Z3Yrya'
+
cs
#
url1 = 'http://tkio-redirect.solar-engine.com/receive/turl/6Z3Yrya' + cs
parms
[
'ts'
]
=
int
(
round
(
time
.
time
()
*
1000
))
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
url
)
...
...
tkio/attributioncaseios.py
View file @
76ac8f9e
...
...
@@ -777,3 +777,22 @@ def test_at30():
print
(
caid1
)
print
(
caid2
)
# 点击激活的idfa,caid,ip+ua,ip都相同,归因方式为idfa
def
test_at31
():
i
=
idfacode
()
caid
=
code_nums1
(
36
)
ip1
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
clickios
.
parms
[
'idfa'
]
=
i
clickios
.
parms
[
'ip'
]
=
ip1
clickios
.
parms
[
'caid1'
]
=
caid
clickios
.
send_requestandroid
(
''
)
time
.
sleep
(
8
)
tkioreceive
.
data
[
'context'
][
'_deviceid'
]
=
i
tkioreceive
.
data
[
'context'
][
'_idfa'
]
=
i
tkioreceive
.
data
[
'context'
][
'_ip'
]
=
ip1
tkioreceive
.
data
[
'context'
][
'_caid'
]
=
caid
tkioreceive
.
send_request
()
print
(
i
)
print
(
ip1
)
\ No newline at end of file
tkio/clickios.py
View file @
76ac8f9e
...
...
@@ -32,8 +32,8 @@ parms = {
def
send_requestandroid
(
hc
):
# url1 = 'http://52.80.137.106:8083/tkio/JZzMni
a?noredirect=true' + hc
url1
=
'http://uri6.com/tkio/YjeERja?noredirect=true'
+
hc
url1
=
'http://52.80.137.106:8083/tkio/ZRRjQr
a?noredirect=true'
+
hc
#
url1 = 'http://uri6.com/tkio/YjeERja?noredirect=true' + hc
response
=
requests
.
get
(
url
=
url1
,
params
=
parms
,
timeout
=
10
,
verify
=
False
)
print
(
response
.
text
)
print
(
url1
)
...
...
tkio/tkioreceive.py
View file @
76ac8f9e
...
...
@@ -8,7 +8,7 @@ import hashlib
data
=
{
"what"
:
"install"
,
"appid"
:
"
53acd3308411e0c4ab1f6444d7878aab
"
,
"appid"
:
"
7f43b32bad452c092096136c9be73d09
"
,
"context"
:
{
"_deviceid"
:
""
,
"_idfa"
:
""
,
...
...
@@ -24,6 +24,7 @@ data = {
"_timestamp"
:
1655291783782
,
"_model"
:
"jixing"
,
"_ryosversion"
:
"13.6.1"
,
"mobdna_info"
:
"{
\"
mobdna_oid
\"
:
\"
95820f88217ec8cbdf621919bb81c0a5
\"
,
\"
mobdna_appkey
\"
:
\"
16dc0cb882d3dbec4f7f66251a84d6dd
\"
,
\"
mobdna_rdid
\"
:
\"
ORRykMqaFSnIrDmGmF1tnvEwDwFYvA5w3TjMiucLZxQKQhIOVgghT0JUR9MbwJy1
\"
,
\"
mobdna_requestid
\"
:
\"
463cfd5564d24d30a607a18a1e8ae2d8
\"
}"
,
"__model"
:
"jixing"
},
"when"
:
int
(
round
(
time
.
time
()
*
1000
)),
...
...
@@ -41,9 +42,9 @@ data_temp = json.dumps(data)
def
send_request
():
global
data
# 测试
#
url = "http://52.80.137.106:8080/receive/tkio/install"
url
=
"http://52.80.137.106:8080/receive/tkio/install"
# 线上
url
=
"http://log.trackingio.com/receive/tkio/install"
#
url = "http://log.trackingio.com/receive/tkio/install"
data
[
'context'
][
'install_time'
]
=
int
(
round
(
time
.
time
()
*
1000
))
print
(
data
)
response
=
requests
.
request
(
"POST"
,
url
,
headers
=
headers
,
data
=
json
.
dumps
(
data
))
...
...
xiaochengxu/x_launch.py
View file @
76ac8f9e
...
...
@@ -2,15 +2,15 @@ from xiaochengxu.xiaochenxu_script import allEvent
import
socket
import
struct
import
random
appkey
=
'
9f6dfeed6a42210a781bafb7e62dc722
'
appkey
=
'
30a90f0b0cfbde59b206bb046540a17f
'
#cid
cid
=
'
11469
'
cid
=
'
-1
'
#surl
surl
=
'
Evmu6na
'
for
_
in
range
(
50
):
surl
=
''
for
_
in
range
(
1
):
# 随机生成12为数组
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
12
))
# i = '
324014210339
'
i
=
''
.
join
(
str
(
random
.
choice
(
range
(
10
)))
for
_
in
range
(
28
))
# i = '
WEWRHWUEIEWRHEWR54HEWRUWEFCEWUFE
'
# 随机生成ip
ip
=
socket
.
inet_ntoa
(
struct
.
pack
(
'>I'
,
random
.
randint
(
1
,
0xffffffff
)))
...
...
xiaochengxu/xiaochenxu_script.py
View file @
76ac8f9e
...
...
@@ -5,12 +5,12 @@ import random
headers
=
{
'Content-Type'
:
'application/json'
}
#测试环境
URL
=
'http://10.2.20.42:8080/receive/tkio/event'
#
URL = 'http://10.2.20.42:8080/receive/tkio/event'
# URL = 'http://10.2.20.42:8080/receive/tkio/'
#线上环境
# URL = 'http://log.reyun.com/receive/tkio/event'
# URL = 'http://tlog.trackingio.com/receive/tkio/event'
URL
=
'http://log.trackingio.com/receive/tkio/event'
#时间和日期
when
=
time
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
,
time
.
localtime
(
time
.
time
()))
...
...
@@ -39,8 +39,8 @@ class allEvent:
"context"
:
{
"_cid"
:
cid
,
"_ip"
:
IP
,
"_deviceid"
:
'null'
,
#
"_openid":i,
"_deviceid"
:
i
,
"_openid"
:
i
,
"_campaignid"
:
surl
,
"_sceneid"
:
"unknown"
,
"_apptype"
:
"wx"
...
...
@@ -53,6 +53,7 @@ class allEvent:
p
=
requests
.
post
(
url
=
URL
,
data
=
s
,
headers
=
headers
,
timeout
=
5
)
print
(
p
.
text
)
print
(
p
.
url
)
print
(
i
)
# pv
def
pviaochengxu
(
self
,
i
,
IP
,
cid
,
surl
,
appid
):
...
...
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