Commit 443c541a by liuxiaoxing

test

parent 063502f0
......@@ -5,4 +5,11 @@
<orderEntry type="jdk" jdkName="NewPython 3.7 (test)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PackageRequirementsSettings">
<option name="requirementsPath" value="" />
</component>
<component name="TestRunnerService">
<option name="projectConfiguration" value="pytest" />
<option name="PROJECT_TEST_RUNNER" value="pytest" />
</component>
</module>
\ No newline at end of file
......@@ -26,7 +26,7 @@ ry_adplan_name = '新版测试-计划'
ry_adcreative_name = '新版测试创意'
# bytedance_int 今日头条,kuaishou_int 快手,tencentams_int (新)广点通,rryingxiao_int 人人营销
pid = 'rryingxiao_int'
URL = 'http://jisuredirect.sortda.com/tkio/zQFVfma?noredirect=true'
URL = 'http://10.2.20.42:8083/tkio/MrYbuaa?noredirect=true'
# 测试头条衍生事件回调时加上
# callback= http%3A%2F%2Fad.toutiao.com%2Ftrack%2Factivate%2F%3Fcallback%3DCKP4rs-Zn4QDEKiQ6teZn4QDGN6L8Y-h9Wcg3ovxj6H1ZyiE0PjgroSEAzAOOM_X-8IDQik0YWY1NzdlOC1lZmViLTRmZDEtYmZkZC00MzE1Zjc1MmJhMGF1NTQ5M0iA0pOtA1AAiAEAkAECmAEA%26os%3D0%26muid%3D
# URL = 'http://uri6.com/adapt/encryp/love.match.set-bytedance?noredirect=true&pid=rryingxiao_int&callback=D8311DBF28D751F327B83F7CEE5B8850B88CC74C8C3FF628EB3A48CAE2212EE260EE347E1771382C5F1B2C0FC9E8921CB5245576D7E5C1EF680315AAA98DCFB189F66FBA49CC7BCB8E4B4726D6D363B816BB2133CADC80B1C12D9FE464A05ED974A70A646BAB1D4D78E2A75361676D5A0D3D4E52B7E7C6B72E9388C17FE9384BE1A47503AABEFB9423727DBAC7B7275AAD237E0E2774D2A8C3D0FDC895CE10C0CCE38F8FEDBC24AF2E23B2B5E742B50C07744361334E148979087917DFFFC445A74B9F939412DEF8D060474E1D353ED7E2EB636B32CADF29842BB90E2131BD3ED05D1A0438EA0EA8577613780B3D64377D85E758A2B20507A034A2C8A96077C7E200C410188C78F76B9B5E7F3E5E4AC3'
......@@ -39,7 +39,7 @@ URL = 'http://jisuredirect.sortda.com/tkio/zQFVfma?noredirect=true'
# 7e3aa681f68435b3f74de790d6424690
# 4eab4be709defbfc2cc85826b09caea0
# 6ba2b016f280004d10a1a354e426eceb
appkey = '519dd48e4162eb4f059d8ff91c307477'
appkey = 'bf3b409800af7328042de440f2fb7917'
lst = []
nowTime = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
s = 0
......@@ -163,14 +163,14 @@ for index in range(1):
# print(p.status_code)
# print('androidid', a)
w = w + 1
time.sleep(8)
try:
allEvent().installUpload(i, ip, appkey)
# allEvent().formevent(i, ip, appkey)
except Exception:
print('install_wrong:', w)
w = w + 1
# time.sleep(8)
# try:
# allEvent().installUpload(i, ip, appkey)
# # allEvent().formevent(i, ip, appkey)
#
# except Exception:
# print('install_wrong:', w)
# w = w + 1
# time.sleep(5)
......@@ -275,7 +275,7 @@ for index in range(1):
# except Exception:
# print('install_wrong:', w)
# w = w + 1
#
# time.sleep(5)
# try:
# allEvent().h5registerEvent(i, ip, appkey)
......
......@@ -8,8 +8,8 @@ headers = {'Content-Type': 'application/json', 'X-RY-Access-Token': 'test_access
# 测试环境
URL_batch = 'http://10.3.20.42:8080/receive/batch'
# URL = 'http://10.2.20.42:8080/receive/tkio/'
# URL = 'http://log.trackingio.com/receive/tkio/'
URL = 'http://jisulog.sortda.com/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/'
# 腾迅云tkio http协议的生产地址:
......
......@@ -8,7 +8,7 @@ import hashlib
#安卓常规渠道激活
appkey = '519dd48e4162eb4f059d8ff91c307477'
appkey = 'bf3b409800af7328042de440f2fb7917'
# 线上预约app
# 7f64fbd64513bc74aa6b5bf753ae0953
# 16dc0cb882d3dbec4f7f66251a84d6dd
......
......@@ -7,8 +7,8 @@ import random
headers = {'Content-Type': 'application/json'}
URL = 'http://10.2.20.42:8080/receive/tkio/'
# URL = 'http://log.trackingio.com/receive/tkio/'
# URL = 'http://10.2.20.42:8080/receive/tkio/'
URL = 'http://log.trackingio.com/receive/tkio/'
# URL = 'http://jisulog.sortda.com/receive/tkio/'
#时间戳
......@@ -94,7 +94,7 @@ class allEvent:
"iad-conversion-type": "Download",
# 广告活动组ID(campaign group id)
"iad-org-id": "764352453453",
"iad-org-id": "111111",
# 广告活动组名称(campaign group name)
"iad-org-name": "name",
......
......@@ -6,7 +6,7 @@ import string
import time
#iOS常规渠道激活
appkey = '0e4ab9b7523030e273e75d7898c7470a'
appkey = 'cd9a88d26f715c3a0503dd9a1476cccd'
event = 'event_1'
for index in range(1):
......
......@@ -2,7 +2,6 @@ import requests
import json
import time
import pytest
url1 = 'http://tmtest.trackingio.com/receive/turl/3r5K1h9'
current_time_13 = int(round(time.time() * 1000))
zf35 = '54321422322132132131213133322323233'
......
......@@ -2,7 +2,6 @@ import requests
import json
import time
import pytest
url1 = 'http://tmtest.trackingio.com/receive/turl/3r5K1h9'
current_time_13 = int(round(time.time() * 1000))
zf35 = '54321422322132132131213133322323233'
......
# from .import clickparams
import socket
import struct
import random
import requests
import json
URL = 'http://tmtest.trackingio.com/receive/turl/Yzuiuma'
s = 0
w = 0
for index in range(1):
# print("开始时间"+datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
# 随机生成12为数组
i = ''.join(str(random.choice(range(10))) for _ in range(12))
# # i = '65453434546345'
# o = ''.join(str(random.choice(range(10))) for _ in range(12))
# m = ''.join(str(random.choice(range(10))) for _ in range(12))
# se = ''.join(str(random.choice(range(10))) for _ in range(12))
# adid = ''.join(str(random.choice(range(10))) for _ in range(12))
# # adid = '5011813780042235'
# p1 = ''.join(str(random.choice(range(10))) for _ in range(12))
# accountid = ''.join(str(random.choice(range(10))) for _ in range(12))
# accountid = '032273574734'
# p1 = '测试一下'
# "idfa": 'B5588C9C-4534-43FB-935D-F17C91622C83',
# "idfa": '00000000-0000-0000-0000-000000000000',
# sh1 = "track_click:"+appkey+":"+get_str_sha1_secret_str(i)
# print(sh1)
# i = '091508889907'
# md5加密
# 创建md5对象
# m = hashlib.md5()
# b = i.encode(encoding='utf-8')
# m.update(b)
# str_md5 = m.hexdigest().upper()
# print("md5加密:"+str_md5)
###########
# md16加密(截取md5加密的字符串)
# imei_16 = str_md5[8:24]
# print("md16加密:"+imei_16)
# 随机生成ip
ip = socket.inet_ntoa(struct.pack('>I', random.randint(1, 0xffffffff)))
# ip = '156.119.456.199'
try:
parms = {
# 触点传参时间。is_s2s=1时必传,0时选传。不同渠道有可能传多种格式,详见需求。限制32位字符内。短链传参。
'ts': '2122132121',
# 集成方式。is_s2s=1为服务器上报触点,0为客户端上报触点。0或1时有不同的参数非空校验,详见需求。固定为0或1。都必传
'is_s2s': '1',
# 操作系统。限制16字符内。都选传。短链传参。暂不与app_platform互相做校验。
'os': 'ios',
# 设备型号。限制64字符内。都选传。短链传参。
'model': '小米',
# 用户公网IP v4版本。限制15字符内。is_s2s=1时都必传,0时都选传,0时优先取传参IP,未传参或传参报错时,取http header中的ip作为ipv4的值
'ipv4': '1.1.1.1',
# 用户公网IP v6版本。限制128字符内。都选传
'ipv6': '1.1.1.1',
# 用户代理信息。限制512字符内。is_s2s=1时都必传,0时都选传,0时优先取传参UA,未传参或报错时,取http header中的user agent作为ua的值
'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/37.0.0.0 MQQBrowser/7.3 Mobile Safari/537.36',
# 监测短链id。固定7位。
# 'turl_id': '3r5K1h9',
# 全部url参数。
# 'tkul_string': 'xxx',
# 触点类型。固定为click。都必传
'touchpoint_type': 'click',
# 归因类型。固定为ua(user acquirement新客获取)
'attribution_type': 'ua',
# 广告账户id。限制64字符内。都选传
'account_id': '',
# 广告组id。限制64字符内。都选传
'adgroup_id': '',
# 广告组名称。限制256字符内。都选传
'adgroup_name': '',
# 广告计划id。限制64字符内。都选传
'adplan_id': '',
# 广告计划名称。限制256字符内。都选传
'adplan_name': '',
# 广告创意id。限制128字符内。都选传
'adcreative_id': '',
# 广告创意名称。限制256字符内。都选传
'adcreative_name': '',
# 创意类型(例如大图、小图、视频等)。限制16字符内。都选传
'adcreative_type': '',
# 流量媒体id(例如巨量的今日头条、穿山甲、抖音等)。限制32字符内。都选传
'site_id': '',
# 流量媒体名称(例如巨量的今日头条、穿山甲、抖音等)。限制128字符内。都选传
'site_name': '',
# 广告类型(例如开屏、信息流、搜索等)。限制32字符内。都选传。
'ad_type': '',
# 广告位id。限制64字符内。都选传
'placement_id': '',
# 转化id。限制64字符内。都选传
'conversion_id': '',
# 广告点击id。限制64字符内。都选传
'click_id': '',
# 广告展示id。限制64字符内。都选传
'impression_id': '',
# 广告请求id。限制64字符内。都选传
'request_id': '',
# 渠道回调id。限制256字符。都选传
'callback_id': 'EJiw267wvfQCGKf2g74ZIPD89-vIATAMOAFCIjIwMTkxMTI3MTQxMTEzMDEwMDI2MDc3MjE1MTUwNTczNTBIAQ==',
# 渠道回调地址。限制256字符。都选传
'callback_url': 'http%3A%2F%2Ftracking.e.qq.com%2Fconv%3Fcb%3DMTIzYWJjNDU2ZGVm%26conv_id%3D12345678',
# 自定触点参数集合。都选传。
'custom_params_1': '' ,
# Android OAID原值。限制512字符内。Android选传,app_platform=ios时报错
'oaid': '3DEA635F-B24F-434B-833F-4ED028FEAEEF',
# Android OAID原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'oaid_md5': '8e488a40a17aed2f6752f51382a4eafc',
# Android主卡IMEI原值。限制32字符内。Android选传,app_platform=ios时报错
'imei1': i,
# Android主卡IMEI原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'imei1_md5': '8e488a40a17aed2f6752f51382a4eafc',
# Android副卡IMEI原值。限制32字符内。Android选传,app_platform=ios时报错
'imei2': '8342732742383',
# Android副卡IMEI原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'imei2_md5': '8e488a40a17aed2f6752f51382a4eafc',
# Google Advertising ID原值。固定36字符。Android选传,app_platform=ios时报错
'gaid': 'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0',
# Google Advertising ID原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'gaid_md5': '8e488a40a17aed2f6752f51382a4eafc',
# //MAC原值。固定17字符。Android选传,app_platform=ios时报错
'mac': '',
# MAC原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'mac_md5': '',
# Android ID原值。固定16字符。Android选传,app_platform=ios时报错
'android_id': '',
# Android ID原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'android_id_md5': '',
}
# timeout可以超时四秒
# verify = False
p = requests.get(url=URL, params=parms, timeout=10, verify=False)
print('imei:', i)
print("ip:", ip)
# print("accountid:", accountid)
print(p.text)
print(p.url)
# print("oaid:",o)
print('success:', s)
print(p.status_code)
print(p.content)
# print('androidid:',a)
# print(nowTime)
s = s + 1
except Exception as err:
print(err)
print('wrong:', w)
print('imei:', i)
print("ip:", ip)
# print(p.status_code)
# print('androidid', a)
w = w + 1
\ No newline at end of file
parms = {
# 触点传参时间。is_s2s=1时必传,0时选传。不同渠道有可能传多种格式,详见需求。限制32位字符内。短链传参。
'ts': '2122132121',
# 集成方式。is_s2s=1为服务器上报触点,0为客户端上报触点。0或1时有不同的参数非空校验,详见需求。固定为0或1。都必传
'is_s2s': '1',
# 操作系统。限制16字符内。都选传。短链传参。暂不与app_platform互相做校验。
'os': 'ios',
# 设备型号。限制64字符内。都选传。短链传参。
'model': '小米',
# 用户公网IP v4版本。限制15字符内。is_s2s=1时都必传,0时都选传,0时优先取传参IP,未传参或传参报错时,取http header中的ip作为ipv4的值
'ipv4': '1.1.1.1',
# 用户公网IP v6版本。限制128字符内。都选传
'ipv6': '1.1.1.1',
# 用户代理信息。限制512字符内。is_s2s=1时都必传,0时都选传,0时优先取传参UA,未传参或报错时,取http header中的user agent作为ua的值
'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/37.0.0.0 MQQBrowser/7.3 Mobile Safari/537.36',
# 监测短链id。固定7位。
# 'turl_id': '3r5K1h9',
# 全部url参数。
# 'tkul_string': 'xxx',
# 触点类型。固定为click。都必传
'touchpoint_type': 'click',
# 归因类型。固定为ua(user acquirement新客获取)
'attribution_type': 'ua',
# 广告账户id。限制64字符内。都选传
'account_id': '',
# 广告组id。限制64字符内。都选传
'adgroup_id': '',
# 广告组名称。限制256字符内。都选传
'adgroup_name': '',
# 广告计划id。限制64字符内。都选传
'adplan_id': '',
# 广告计划名称。限制256字符内。都选传
'adplan_name': '',
# 广告创意id。限制128字符内。都选传
'adcreative_id': '',
# 广告创意名称。限制256字符内。都选传
'adcreative_name': '',
# 创意类型(例如大图、小图、视频等)。限制16字符内。都选传
'adcreative_type': '',
# 流量媒体id(例如巨量的今日头条、穿山甲、抖音等)。限制32字符内。都选传
'site_id': '',
# 流量媒体名称(例如巨量的今日头条、穿山甲、抖音等)。限制128字符内。都选传
'site_name': '',
# 广告类型(例如开屏、信息流、搜索等)。限制32字符内。都选传。
'ad_type': '',
# 广告位id。限制64字符内。都选传
'placement_id': '',
# 转化id。限制64字符内。都选传
'conversion_id': '',
# 广告点击id。限制64字符内。都选传
'click_id': '',
# 广告展示id。限制64字符内。都选传
'impression_id': '',
# 广告请求id。限制64字符内。都选传
'request_id': '',
# 渠道回调id。限制256字符。都选传
'callback_id': 'EJiw267wvfQCGKf2g74ZIPD89-vIATAMOAFCIjIwMTkxMTI3MTQxMTEzMDEwMDI2MDc3MjE1MTUwNTczNTBIAQ==',
# 渠道回调地址。限制256字符。都选传
'callback_url': 'http%3A%2F%2Ftracking.e.qq.com%2Fconv%3Fcb%3DMTIzYWJjNDU2ZGVm%26conv_id%3D12345678',
# 自定触点参数集合。都选传。
'custom_params_1': ''
}
parmsios = {
# 操作系统。限制16字符内。都选传。短链传参。暂不与app_platform互相做校验。
'os': 'ios',
# iOS IDFA原值。固定为36字符
"idfa": "3DEA635F-B24F-434B-833F-4ED028FEAEEF",
"idfa_md5": "8e488a40a17aed2f6752f51382a4eafc",
"idfv": "3DEA635F-B24F-434B-833F-4ED028FEAEEF",
"idfv_md5": "8e488a40a17aed2f6752f51382a4eafc",
}
parmsandroid = {
# Android OAID原值。限制512字符内。Android选传,app_platform=ios时报错
'oaid': '3DEA635F-B24F-434B-833F-4ED028FEAEEF',
# Android OAID原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'oaid_md5': '8e488a40a17aed2f6752f51382a4eafc',
# Android主卡IMEI原值。限制32字符内。Android选传,app_platform=ios时报错
'imei1': '8342732742383',
# Android主卡IMEI原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'imei1_md5': '8e488a40a17aed2f6752f51382a4eafc',
# Android副卡IMEI原值。限制32字符内。Android选传,app_platform=ios时报错
'imei2': '8342732742383',
# Android副卡IMEI原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'imei2_md5': '8e488a40a17aed2f6752f51382a4eafc',
# Google Advertising ID原值。固定36字符。Android选传,app_platform=ios时报错
'gaid': 'B21C5EC5-9921-42FD-AAC5-07A0EB6CF1A0',
# Google Advertising ID原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'gaid_md5': '8e488a40a17aed2f6752f51382a4eafc',
# //MAC原值。固定17字符。Android选传,app_platform=ios时报错
'mac': '',
# MAC原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'mac_md5': '',
# Android ID原值。固定16字符。Android选传,app_platform=ios时报错
'android_id': '',
# Android ID原值MD5后转小写。固定为32字符。Android选传,app_platform=ios时报错
'android_id_md5': '',
}
\ No newline at end of file
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