Commit e16bdf85 by zhaihuitao

update

parent ccfb5114
......@@ -19,8 +19,16 @@
<select />
</component>
<component name="ChangeListManager">
<list default="true" id="d0064643-2990-4ed3-bfb0-875849b30f4e" name="Default" comment="update">
<list default="true" id="d0064643-2990-4ed3-bfb0-875849b30f4e" name="Default" comment="">
<change afterPath="$PROJECT_DIR$/testcase/game/click.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/envcfg.py" beforeDir="false" afterPath="$PROJECT_DIR$/config/envcfg.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/prod/params.py" beforeDir="false" afterPath="$PROJECT_DIR$/config/prod/params.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testcase/android_click/test_click.py" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/android_click/test_click.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testcase/game/game_event.py" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/game/game_event.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testcase/game/game_param.py" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/game/game_param.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testcase/game/imei.json" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/game/imei.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/testcase/run_all_cases.py" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/run_all_cases.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -99,33 +107,14 @@
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>ry</find>
<find>event</find>
<find>background</find>
<find>adshow</find>
<find>p</find>
<find>prod</find>
<find>prod_</find>
<find>prod_cli</find>
<find>prod_click</find>
<find>prod_click_</find>
<find>prod_click_u</find>
<find>prod_click_url</find>
<find>stringIO</find>
<find>report</find>
<find>os</find>
</findStrings>
<replaceStrings>
<replace />
<replace>click_url</replace>
</replaceStrings>
</component>
<component name="Git.Settings">
<option name="UPDATE_TYPE" value="MERGE" />
<option name="ROOT_SYNC" value="DONT_SYNC" />
<option name="RECENT_BRANCH_BY_REPOSITORY">
<map>
<entry key="$PROJECT_DIR$" value="master" />
</map>
</option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
<option name="ROOT_SYNC" value="DONT_SYNC" />
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
......@@ -290,7 +279,7 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="params" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<configuration name="game_param" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="trackingIO" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
......@@ -298,12 +287,12 @@
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/config/prod" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testcase/game" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/config/prod/params.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/testcase/game/game_param.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
......@@ -312,7 +301,7 @@
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<configuration name="run_all_cases" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<configuration name="params" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="trackingIO" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
......@@ -320,12 +309,12 @@
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testcase" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/config/prod" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/testcase/run_all_cases.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/config/prod/params.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
......@@ -346,36 +335,36 @@
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" runner="coverage.py" />
<method v="2" />
</configuration>
<configuration name="Nosetests for testcase.android_events._adclick.adclickTestCase.testadclick" type="tests" factoryName="Nosetests" temporary="true" nameIsGenerated="true">
<configuration name="Nosetests for test_click.clickTestCase.testclick" type="tests" factoryName="Nosetests" temporary="true" nameIsGenerated="true">
<module name="trackingIO" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testcase/android_events" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testcase/android_click" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" runner="coverage.py" />
<option name="_new_regexPattern" value="&quot;&quot;" />
<option name="_new_additionalArguments" value="&quot;&quot;" />
<option name="_new_target" value="&quot;testcase.android_events._adclick.adclickTestCase.testadclick&quot;" />
<option name="_new_target" value="&quot;test_click.clickTestCase.testclick&quot;" />
<option name="_new_targetType" value="&quot;PYTHON&quot;" />
<method v="2" />
</configuration>
<configuration name="Nosetests for testcase.android_events._adshow.adshowTestCase.testadshow" type="tests" factoryName="Nosetests" temporary="true" nameIsGenerated="true">
<configuration name="Nosetests in test_click.py" type="tests" factoryName="Nosetests" temporary="true" nameIsGenerated="true">
<module name="trackingIO" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testcase/android_events" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/testcase/android_click" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" enabled="false" runner="coverage.py" />
<option name="_new_regexPattern" value="&quot;&quot;" />
<option name="_new_additionalArguments" value="&quot;&quot;" />
<option name="_new_target" value="&quot;testcase.android_events._adshow.adshowTestCase.testadshow&quot;" />
<option name="_new_targetType" value="&quot;PYTHON&quot;" />
<option name="_new_target" value="&quot;$PROJECT_DIR$/testcase/android_click/test_click.py&quot;" />
<option name="_new_targetType" value="&quot;PATH&quot;" />
<method v="2" />
</configuration>
<configuration default="true" type="tests" factoryName="Doctests">
......@@ -414,19 +403,19 @@
<method v="2" />
</configuration>
<list>
<item itemvalue="Python.params" />
<item itemvalue="Python.run_all_cases" />
<item itemvalue="Python tests.Nosetests for testcase.android_events._adclick.adclickTestCase.testadclick" />
<item itemvalue="Python tests.Nosetests for testcase.android_events._adshow.adshowTestCase.testadshow" />
<item itemvalue="Python.game_event" />
<item itemvalue="Python.params" />
<item itemvalue="Python tests.Nosetests in test_click.py" />
<item itemvalue="Python tests.Nosetests for test_click.clickTestCase.testclick" />
<item itemvalue="Python.game_param" />
</list>
<recent_temporary>
<list>
<item itemvalue="Python.game_event" />
<item itemvalue="Python.run_all_cases" />
<item itemvalue="Python tests.Nosetests in test_click.py" />
<item itemvalue="Python.game_param" />
<item itemvalue="Python tests.Nosetests for test_click.clickTestCase.testclick" />
<item itemvalue="Python.params" />
<item itemvalue="Python tests.Nosetests for testcase.android_events._adshow.adshowTestCase.testadshow" />
<item itemvalue="Python tests.Nosetests for testcase.android_events._adclick.adclickTestCase.testadclick" />
</list>
</recent_temporary>
</component>
......@@ -443,20 +432,6 @@
<updated>1596505503233</updated>
<workItem from="1596786333197" duration="228000" />
</task>
<task id="LOCAL-00038" summary="update">
<created>1598596354765</created>
<option name="number" value="00038" />
<option name="presentableId" value="LOCAL-00038" />
<option name="project" value="LOCAL" />
<updated>1598596354765</updated>
</task>
<task id="LOCAL-00039" summary="update">
<created>1598860679221</created>
<option name="number" value="00039" />
<option name="presentableId" value="LOCAL-00039" />
<option name="project" value="LOCAL" />
<updated>1598860679221</updated>
</task>
<task id="LOCAL-00040" summary="update">
<created>1598860695945</created>
<option name="number" value="00040" />
......@@ -786,7 +761,21 @@
<option name="project" value="LOCAL" />
<updated>1608120173227</updated>
</task>
<option name="localTasksCounter" value="87" />
<task id="LOCAL-00087" summary="update">
<created>1608120339629</created>
<option name="number" value="00087" />
<option name="presentableId" value="LOCAL-00087" />
<option name="project" value="LOCAL" />
<updated>1608120339629</updated>
</task>
<task id="LOCAL-00088" summary="update">
<created>1608120492678</created>
<option name="number" value="00088" />
<option name="presentableId" value="LOCAL-00088" />
<option name="project" value="LOCAL" />
<updated>1608120492678</updated>
</task>
<option name="localTasksCounter" value="89" />
<servers />
</component>
<component name="TodoView">
......@@ -829,35 +818,35 @@
<screen x="0" y="25" width="1280" height="716" />
</state>
<state x="355" y="211" key="#Notifications/0.25.1280.716@0.25.1280.716" timestamp="1607073482927" />
<state width="1259" height="210" key="GridCell.Tab.0.bottom" timestamp="1608117430908">
<state width="1259" height="210" key="GridCell.Tab.0.bottom" timestamp="1610611940965">
<screen x="0" y="0" width="1280" height="800" />
</state>
<state width="1259" height="210" key="GridCell.Tab.0.bottom/0.0.1280.800@0.0.1280.800" timestamp="1608117430908" />
<state width="1259" height="210" key="GridCell.Tab.0.bottom/0.0.1280.800@0.0.1280.800" timestamp="1610611940965" />
<state width="1259" height="174" key="GridCell.Tab.0.bottom/0.25.1280.716@0.25.1280.716" timestamp="1608105693500" />
<state width="1259" height="210" key="GridCell.Tab.0.center" timestamp="1608117430906">
<state width="1259" height="210" key="GridCell.Tab.0.center" timestamp="1610611940962">
<screen x="0" y="0" width="1280" height="800" />
</state>
<state width="1259" height="210" key="GridCell.Tab.0.center/0.0.1280.800@0.0.1280.800" timestamp="1608117430906" />
<state width="1259" height="210" key="GridCell.Tab.0.center/0.0.1280.800@0.0.1280.800" timestamp="1610611940962" />
<state width="1259" height="174" key="GridCell.Tab.0.center/0.25.1280.716@0.25.1280.716" timestamp="1608105693499" />
<state width="1259" height="210" key="GridCell.Tab.0.left" timestamp="1608117430906">
<state width="1259" height="210" key="GridCell.Tab.0.left" timestamp="1610611940961">
<screen x="0" y="0" width="1280" height="800" />
</state>
<state width="1259" height="210" key="GridCell.Tab.0.left/0.0.1280.800@0.0.1280.800" timestamp="1608117430906" />
<state width="1259" height="210" key="GridCell.Tab.0.left/0.0.1280.800@0.0.1280.800" timestamp="1610611940961" />
<state width="1259" height="174" key="GridCell.Tab.0.left/0.25.1280.716@0.25.1280.716" timestamp="1608105693498" />
<state width="1259" height="210" key="GridCell.Tab.0.right" timestamp="1608117430907">
<state width="1259" height="210" key="GridCell.Tab.0.right" timestamp="1610611940963">
<screen x="0" y="0" width="1280" height="800" />
</state>
<state width="1259" height="210" key="GridCell.Tab.0.right/0.0.1280.800@0.0.1280.800" timestamp="1608117430907" />
<state width="1259" height="210" key="GridCell.Tab.0.right/0.0.1280.800@0.0.1280.800" timestamp="1610611940963" />
<state width="1259" height="174" key="GridCell.Tab.0.right/0.25.1280.716@0.25.1280.716" timestamp="1608105693500" />
<state x="149" y="25" width="982" height="728" key="SettingsEditor" timestamp="1608117997488">
<screen x="0" y="0" width="1280" height="800" />
</state>
<state x="149" y="25" width="982" height="728" key="SettingsEditor/0.0.1280.800@0.0.1280.800" timestamp="1608117997488" />
<state x="149" y="25" width="982" height="716" key="SettingsEditor/0.25.1280.716@0.25.1280.716" timestamp="1606734406260" />
<state x="240" y="106" key="Vcs.Push.Dialog.v2" timestamp="1608120175150">
<state x="240" y="106" key="Vcs.Push.Dialog.v2" timestamp="1608120494089">
<screen x="0" y="0" width="1280" height="800" />
</state>
<state x="240" y="106" key="Vcs.Push.Dialog.v2/0.0.1280.800@0.0.1280.800" timestamp="1608120175150" />
<state x="240" y="106" key="Vcs.Push.Dialog.v2/0.0.1280.800@0.0.1280.800" timestamp="1608120494089" />
<state x="240" y="120" key="Vcs.Push.Dialog.v2/0.25.1280.716@0.25.1280.716" timestamp="1606734542701" />
</component>
</project>
\ No newline at end of file
......@@ -22,7 +22,7 @@ print(url)
# click_url = 'http://10.3.20.42:8083/tkio/JjuUb2a'
click_url = 'http://10.3.20.42:8083/tkio/ye6zEja'
click_url = 'http://10.3.20.42:8083/tkio/Bzq2aua'
# prod_event_url = 'http://log.trackingio.com'
prod_event_url = 'http://log.reyun.com'
# prod_event_url = 'http://10.3.20.42:8080'
......
......@@ -9,15 +9,16 @@
import time
from config.envcfg import prod, prod_appkey
from common import randomUtil
from testcase.run_all_cases import IMEI
# from testcase.run_all_cases import IMEI
IMEI = randomUtil.r.randimei()
params_click = {
# 'androidid': "43214532142142",
'imei': IMEI,
'imei': "cffef74e-b6bf-bd16-e7f8-dfdbff5fb6e1",
# "idfa": 'DBC43622-E38B-440C-B7A7-FB6641D0D9AB',
'ip': randomUtil.r.randip(),
'vid': "test_vid"
'vid': "test_vid",
"_deviceid": "CFFEF74E-B6BF-BD16-E7F8-DFDBFF5FB6E1",
# "idfa": "00000000-0000-0000-0000-000000000000",
# "idfv": ""
# "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3",
......@@ -39,7 +40,7 @@ params_click = {
# 'subchannel': '3123123',
# 'aid': '111',
# 'siteid': '222',
# 'csite': '333',
# 'csite': '40001',
# "timestamp": "1569141628027",
# "creative": "31096865315",
# "deviceid": "881554685049",
......
# -*- coding: utf-8 -*-
"""
@author:zhaiht
@file: test_click.py
@file: click.py
@time: 2020/8/5 14:48
@desc:
"""
......
import requests
from common import randomUtil
# url = 'https://uri6.com/tkio/Y7RVvea?imei=__IMEI__&mac=__MAC1__&androidid=__ANDROIDID__&oaid=__OAID__&ip=__IP__&ts=__TS__&os=__OS__&callback_param=__CALLBACK_PARAM__&callback=__CALLBACK_URL__&ry_adgroup_id=__CAMPAIGN_ID__&ry_adplan_id=__AID__&ry_adplan_name=__AID_NAME__&ry_adcreative_id=__CID__&ctype=__CTYPE__&csite=40001&siteid=__UNION_SITE__&vid=__VID__&ry_adcreative_name=__CID_NAME__&aid=__AID__&ry_adgroup_name=__CAMPAIGN_NAME__&noredirect=true'
url = 'https://uri6.com/tkio/Y7RVvea'
count = 0
params_click = {
# 'androidid': "43214532142142",
'imei': randomUtil.r.randimei(),
# "idfa": 'DBC43622-E38B-440C-B7A7-FB6641D0D9AB',
'ip': randomUtil.r.randip(),
'vid': "test_vid",
# "idfa": "00000000-0000-0000-0000-000000000000",
# "idfv": ""
# "ua": "Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3",
# '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,
# 'imei2': 'null',
# 'meid': i
# 'bd_vid': i
# 'oaid': "234B9U1T-A274-ED22-CEBF-4B6DDDFC18A9",
# 'muid': "4CF21FBB2FA6CA3D914476954ABBFEBF182BB0BD",
# 'mac': "12321321321321321",
# 'subchannel': '3123123',
# 'aid': '111',
# 'siteid': '222',
'csite': '40001',
# "timestamp": "1569141628027",
# "creative": "31096865315",
# "deviceid": "881554685049",
# "tz": "+8",
# "wx_campaign_id":ry_adgroup_id,
# 'wx_adgroup_id':ry_adplan_id,
# 'ry_adcreative_id':ry_adcreative_id
# "ry_channel_fake": "false",
# "ry_ts": "1569141628025",
# "type": '1222',
# "ctype": '4232323',
# "campaign_id": '123',
# "adgroup_id": '123',
# "creative_id": '123'
}
while count < 1001:
count = count+1
p = requests.get(url=url,params=params_click)
print(p.text)
print(count)
\ No newline at end of file
import os
import sys
import importlib
import datetime
importlib.reload(sys)
import time
import json
......@@ -11,16 +11,27 @@ from testcase.game.game_param import allevent
rootPath = os.path.split(curPath)[0]
sys.path.append(rootPath)'''
base_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.extend(['/Users/zhaihuitao/PycharmProjects/TKIO/interfaceTest/testcase'])
sys.path.append(base_dir)
lst = []
newList = ['195713813811']
appkey = 'ff2c15d87db8fb16e6d0e82d8f2b4a6d'
event = 'exception'
appkey = 'd1ff8a31072aac7f8c4611241905d334'
event = 'event_1'
count = 1
while True:
time.sleep(0.3)
ts = int(time.time()) * 1000
# now = datetime.datetime.now()
startDate = datetime.datetime(2021, 1, 8, 16, 32, 00)
startTs = int(time.mktime(startDate.timetuple())) * 1000
endDate = (startDate + datetime.timedelta(minutes=6))
endTs = int(time.mktime(endDate.timetuple())) * 1000
# print(startTs, ts, endTs)
i = json.load(open('imei.json', 'r+'))['imei'] + 1
json.dump({"imei": i}, open('imei.json', 'w+'), sort_keys=True, indent=4)
print(i)
i = json.load(open('imei.json', 'r+'))['imei'] + 1
json.dump({"imei": i}, open('imei.json', 'w+'), sort_keys=True, indent=4)
#print(i)
# 遍历已有列表数据 发请求
# for i in newList:
......@@ -34,15 +45,20 @@ print(i)
# for _ in range(1):
# i = ''.join(str(random.choice(range(10))) for _ in range(12))
# c = ''.join(str(random.choice(range(10))) for _ in range(12))
allevent().event_install(i, appkey)
time.sleep(2)
allevent().event_register(i, appkey)
time.sleep(2)
allevent().event_login(i, appkey)
# time.sleep(2)
allevent().event_payment(i, appkey, campId='reyun')
time.sleep(2)
# allevent().event_event(i,appkey,event)
# allevent().event_economy(i,appkey,c)
lst.append(i)
print(lst)
allevent().event_install(i, appkey)
#time.sleep(2)
allevent().event_register(i, appkey)
#time.sleep(2)
allevent().event_login(i, appkey)
# time.sleep(2)
allevent().event_payment(i, appkey, campId='reyun')
#time.sleep(2)
allevent().event_event(i, appkey, event)
allevent().event_economy(i, appkey)
allevent().event_quest(i, appkey)
allevent().event_heart(i, appkey)
count = count + 1
print(count)
# lst.append(i)
if count >= 500:
break
......@@ -14,16 +14,23 @@ URL_payment = URL+'/receive/rest/payment'
URL_loggedin = URL+'/receive/rest/loggedin'
URL_event = URL+'/receive/rest/event'
URL_economy = URL+'/receive/rest/economy'
URL_quest = URL+'/receive/rest/quest'
URL_heart = URL+'/receive/rest/heartbeat'
network = 'wifi'
os = 'ios'
devicetype = 'iphone4s'
os = 'android'
devicetype = 'huaweimate'
resolution = '123*456'
channelid = '111'
op = '中国移动'
itemname = '测试5'
itemtotalprice = '99'
itemname = random.randint(100,900)
itemtotalprice = random.randint(101,303)
itemamount = random.randint(1,10)
serverid = 1
campId = random.randint(1000, 1002)
level = random.randint(0, 1001)
class allevent:
def event_install(self,i,appid):
s = json.dumps({
......@@ -31,9 +38,9 @@ class allevent:
"context":
{
"deviceid": i,
"idfa":i,
"idfv":i,
"channelid":channelid
"imei":i,
## "idfv":i,
"channelid":random.randint(111, 113)
}
})
p = requests.post(url=URL_install,data=s,headers=headers,timeout=4)
......@@ -44,9 +51,9 @@ class allevent:
"context":
{
"deviceid": i,
"idfa":i,
"idfv":i,
"channelid":channelid,
"imei":i,
# # "idfv":i,
"channelid":random.randint(111, 113),
"network":network,
"os":os,
"devicetype":devicetype,
......@@ -63,10 +70,10 @@ class allevent:
"context":
{
"deviceid": i,
#"idfa":i,
#"idfv":i,
"imei":i,
## "idfv":i,
"serverid": serverid,
"channelid":channelid
"channelid":random.randint(111, 113)
}
})
p = requests.post(url=URL_register, data=s, headers=headers, timeout=4)
......@@ -79,8 +86,8 @@ class allevent:
"context":
{
"deviceid": i,
# "idfa":i,
# "idfv":i,
"imei":i,
# # "idfv":i,
"serverid": serverid,
"channelid": channelid
}
......@@ -94,13 +101,13 @@ class allevent:
"context":
{
"deviceid": i,
"idfa":i,
"idfv":i,
"channelid":channelid,
"imei":i,
# "idfv":i,
"channelid":random.randint(111, 113),
"transactionid":"12323232131321",
"paymenttype":"支付宝",
"currencytype":"CNY",
"currencyamount":"100",
"currencyamount":random.randint(100, 500),
"virtualcoinamount":"500",
"iapname":"test",
"iapamount":"3",
......@@ -117,8 +124,8 @@ class allevent:
"context":
{
"deviceid": i,
# "idfa":i,
# "idfv":i,
# "imei":i,
# # "idfv":i,
"serverid": serverid,
"channelid": channelid
}
......@@ -126,21 +133,62 @@ class allevent:
p = requests.post(url=URL_event, data=s, headers=headers, timeout=4)
print(p.text)
def event_economy(self,i,appid,campId):
def event_economy(self,i,appid):
s = json.dumps({
"appid": appid,
"who":i,
"context":
{
"deviceid": i,
"idfa":i,
"idfv":i,
"channelid":channelid,
"itemamount": "1",
"itemname": itemname,
"imei":i,
# "idfv":i,
"channelid":random.randint(111, 113),
"itemamount": random.randint(1,20),
"itemname": random.randint(100, 111),
"itemtotalprice": itemtotalprice,
"campId": campId
"level": random.randint(0, 1001),
"serverid": random.randint(10000,10050),
"campId": random.randint(1000, 1002)
}
})
p = requests.post(url=URL_economy,data=s,headers=headers,timeout=4)
print(p.text)
def event_quest(self, i, appid):
s = json.dumps({
"appid": appid,
"who": i,
"context":
{
"deviceid": i,
# "imei": i,
# "idfv":i,
"questid": random.randint(110, 120),
"queststatus": random.choice('acf'),
"questtype": "new",
"channelid": channelid,
# "itemamount": random.randint(1, 20),
# "itemname": random.randint(100, 111),
# "itemtotalprice": itemtotalprice,
"level": random.randint(0, 1001),
"serverid": random.randint(10000, 10050),
# "campId": random.randint(1000, 1002)
}
})
p = requests.post(url=URL_quest, data=s, headers=headers, timeout=4)
print(p.text)
def event_heart(self, i, appid):
s = json.dumps({
"appid": appid,
"who": i,
"context":
{
"deviceid": i,
"level": random.randint(0, 1001),
"serverid": random.randint(10000, 10050),
"channelid": "222"
}
})
p = requests.post(url=URL_heart, data=s, headers=headers, timeout=4)
print(p.text)
\ No newline at end of file
{
"imei": 400000000000002
"imei": 50100000000499
}
\ No newline at end of file
......@@ -15,9 +15,9 @@ importlib.reload(sys)
import json
IMEI = json.load(open('imei.json', 'r+'))['imei'] + 1
json.dump({"imei": IMEI}, open('imei.json', 'w+'), sort_keys=True, indent=4)
print(IMEI)
#IMEI = json.load(open('imei.json', 'r+'))['imei'] + 1
#json.dump({"imei": IMEI}, open('imei.json', 'w+'), sort_keys=True, indent=4)
#print(IMEI)
......
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