Commit c75c84cf by zhaihuitao

update

parent 2b859933
......@@ -315,3 +315,62 @@ params_adclick = {
# 'ds': ds,
'who': 'lxx_test'
}
params_pageduration = {
"appid": prod['events']['appkey'],
"context": {
'_pageid': "pageId",
"_sessionid": "sessionID",
'_pageduration': "1000",
"_campaignid": 'default',
"_deviceid": randomUtil.r.randimei(),
"_imei": randomUtil.r.randimei(),
# "_idfa": '75463565745634546',
"_androidid": "424653325643",
# "_imei2":"324323AAAA",
# "_meid": "CCC324323",
"_ip": randomUtil.r.randip(),
# "_ipv6": i,
'_manufacturer': "vivo",
'_ryos': "android",
'_rydevicetype': "vivox9",
'_network': "wifi",
'_resolution': "1344*750",
'_op': "中国移动",
'_timestamp': int(round(time.time() * 1000)),
'_oaid': '999b6e3e-a274-ed22-cebf-2b6dddfc29b7'
# '_mac':"565354131606"
},
# 'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
# 'ds': ds,
'who': 'lxx_test'
}
params_appduration = {
"appid": prod['events']['appkey'],
"context": {
"_appduration": "10",
"_sessionid": "sessionID",
"_campaignid": 'default',
"_deviceid": randomUtil.r.randimei(),
"_imei": randomUtil.r.randimei(),
# "_idfa": '75463565745634546',
"_androidid": "424653325643",
# "_imei2":"324323AAAA",
# "_meid": "CCC324323",
"_ip": randomUtil.r.randip(),
# "_ipv6": i,
'_manufacturer': "vivo",
'_ryos': "android",
'_rydevicetype': "vivox9",
'_network': "wifi",
'_resolution': "1344*750",
'_op': "中国移动",
'_timestamp': int(round(time.time() * 1000)),
'_oaid': '999b6e3e-a274-ed22-cebf-2b6dddfc29b7'
# '_mac':"565354131606"
},
# 'when': time.strftime('%Y-%m-%d %H:%M:%S', time.localtime(time.time())),
# 'ds': ds,
'who': 'lxx_test'
}
\ No newline at end of file
# -*- coding: utf-8 -*-
"""
@author:zhaiht
@file: test_appduration.py
@time: 2020/8/24 20:21
@desc:
"""
import unittest
import json
import requests
from config.envcfg import prod, headers
from config.prod.params import params_appduration
class appdurationTestCase(unittest.TestCase):
def testappduration(self):
r = requests.post(url=prod['events']['url'] + 'appduration', data=json.dumps(params_appduration), headers=headers, timeout=5)
print("App使用时长:" + r.text)
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
# -*- coding: utf-8 -*-
"""
@author:zhaiht
@file: test_pageduration.py
@time: 2020/8/24 18:19
@desc:
"""
import unittest
import json
import requests
from config.envcfg import prod, headers
from config.prod.params import params_pageduration
class pagedurationTestCase(unittest.TestCase):
def testpageduration(self):
r = requests.post(url=prod['events']['url'] + 'pageduration', data=json.dumps(params_pageduration), headers=headers, timeout=5)
print("App页面浏览时长分布:" + r.text)
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
......@@ -17,7 +17,6 @@ class startupTestCase(unittest.TestCase):
def teststartup(self):
r = requests.post(url=prod['events']['url'] + 'startup', data=json.dumps(params_startup), headers=headers, timeout=10)
print(r.text+"\n"+r.url)
#print(r.url)
if __name__ == "__main__":
unittest.main()
\ No newline at end of file
unittest.main()
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