Commit 105ee656 by liuxiaoxing

Merge remote-tracking branch 'remotes/origin/recieveandroid-se' into receiveios-asa

# Conflicts: # microservices/receiveandroid.py # microservices/receiveios.py 合并asa和se代码
parents 5fa9497a f12a93a3
......@@ -36,7 +36,7 @@ ry_adcreative_name = 'c测试1'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid = 'rryingxiao_int'
# URL = 'http://52.80.137.106:8083/tkio/V3Q7bqa?noredirect=true'
URL = 'http://uri6.com/tkio/2MRFZra?noredirect=true'
URL = 'http://uri6.com/tkio/A3QzEva?noredirect=true'
# 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
......@@ -121,9 +121,9 @@ for index in range(1):
# 'ry_adgroup_name': ry_adgroup_name,
# 'ry_adplan_name': ry_adplan_name,
# 'ry_adcreative_name': ry_adcreative_name,
"ry_adgroup_id": ry_adgroup_id,
"ry_adplan_id": ry_adplan_id,
"ry_adcreative_id": ry_adcreative_id,
# "ry_adgroup_id": ry_adgroup_id,
# "ry_adplan_id": ry_adplan_id,
# "ry_adcreative_id": ry_adcreative_id,
# 'imei2': 'null',
# 'meid': i
# 'bd_vid': i
......@@ -186,14 +186,14 @@ for index in range(1):
# print('androidid', a)
w = w + 1
time.sleep(10)
try:
allEvent().installUpload(i, ip, appkey)
# allEvent().formevent(i, ip, appkey)
except Exception:
print('install_wrong:', w)
w = w + 1
# time.sleep(10)
# try:
# allEvent().installUpload(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey)
#
# except Exception:
# print('install_wrong:', w)
# w = w + 1
# #
# #
# time.sleep(5)
......@@ -231,20 +231,20 @@ for index in range(1):
# # except Exception:
# # print('retention',w)
# # w = w + 1
time.sleep(3)
try:
allEvent().adshow(i, ip, appkey,adid)
# allEvent().formevent(i, ip, appkey)
except Exception:
print('adshow_wrong:', w)
w = w + 1
time.sleep(3)
try:
allEvent().adclick(i, ip, appkey, adid)
# allEvent().formevent(i, ip, appkey)
except Exception:
print('adshow_wrong:', w)
w = w + 1
# time.sleep(3)
# try:
# allEvent().adshow(i, ip, appkey,adid)
# # allEvent().formevent(i, ip, appkey)
# except Exception:
# print('adshow_wrong:', w)
# w = w + 1
# time.sleep(3)
# try:
# allEvent().adclick(i, ip, appkey, adid)
# # allEvent().formevent(i, ip, appkey)
# except Exception:
# print('adshow_wrong:', w)
# w = w + 1
# time.sleep(5)
# try:
# allEvent().appduration(i, ip, appkey,se)
......@@ -270,14 +270,14 @@ for index in range(1):
# num = index + 1
# event = 'event_' + str(num)
event = 'event_1'
time.sleep(3)
try:
allEvent().ziding_event(i, ip, appkey, event)
print(event)
except Exception as err:
print(err)
print('自定义_wrong:', w)
# event = 'event_1'
# time.sleep(3)
# try:
# allEvent().ziding_event(i, ip, appkey, event)
# print(event)
# except Exception as err:
# print(err)
# print('自定义_wrong:', w)
......
......@@ -37,14 +37,15 @@ global data
data = [
{
"application_info": {
# 线上-
# 测试-
"appkey": "2c81418e218b4879b904a45530f0a09e",
# 线上-55705dbd45dd246751b87bba94b8c73c
# 测试-55705dbd45dd246751b87bba94b8c73c
"appkey": "2a33891fd3ea53f8edb0fca391a2432e",
"bundleid": "3423232",
"app_version": "1.9.0",
"channel_name": "default"
},
"timestamp_info": {
"country": "chi",
"time_zone": "GMT+08",
"install_time": int(round(time.time() * 1000)),
"current_event_time": int(round(time.time() * 1000)),
......@@ -61,7 +62,7 @@ data = [
"device_id_type": "idfa_md5",
"device_id_md5": "c3381276ae145b3663c8e0f6dd9f628a",
"device_id_md5_type": "idfa_md5",
"os": "ios",
"os": "2",
"os_version": "19",
"manufacturer": "HUAWEI",
"model": "Mate 40",
......@@ -158,10 +159,12 @@ data_temp = json.dumps(data)
def send_request():
global data
# 对接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))
......@@ -194,6 +197,22 @@ 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
response = send_request()
assert response["status"] == "0"
# iad_retry_times为num型,同上test_se1
def test_se2():
data[0]["asa_info"]["adservices_info"]['adservices_retry_times'] = 3
response = send_request()
assert response["status"] == "0"
# os为ios,channel_name不等于default
def test_os_ios():
data[0]["device_info"]["os"] = 'ios'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment