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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
188 additions
and
273 deletions
+188
-273
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
+62
-66
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,10 +183,11 @@ 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
))
...
...
@@ -211,13 +210,11 @@ class allEvent:
'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,19 +223,19 @@ 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"
:
""
,
...
...
@@ -260,7 +257,7 @@ class allEvent:
# "_idfa": "DBC93722-E34B-440C-B7A7-FB6641D0D9AB",
"_idfv"
:
i
,
"_lib_version"
:
lv
,
"_carrier"
:
carrier
,
"_carrier"
:
carrier
,
"_ry_ts"
:
"1565941809416"
,
"_create_timestamp"
:
"1565941809351"
,
"_tz"
:
"+8"
,
...
...
@@ -280,6 +277,5 @@ class allEvent:
"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
This diff is collapsed.
Click to expand it.
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