Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
interfaceTest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Schedules
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
zhaihuitao
interfaceTest
Commits
8f7f5c5a
Commit
8f7f5c5a
authored
Aug 06, 2020
by
zhaihuitao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加生产环境配置信息
parent
87d6f9bd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
5 deletions
+45
-5
workspace.xml
.idea/workspace.xml
+0
-0
analysis.py
config/analysis.py
+3
-0
prod.yaml
config/prod/prod.yaml
+14
-0
click.py
testcase/android_click/click.py
+8
-5
test_click.py
testcase/android_click/test_click.py
+20
-0
No files found.
.idea/workspace.xml
View file @
8f7f5c5a
This diff is collapsed.
Click to expand it.
config/analysis.py
View file @
8f7f5c5a
...
@@ -25,3 +25,5 @@ class loadYaml:
...
@@ -25,3 +25,5 @@ class loadYaml:
except
Exception
as
es
:
except
Exception
as
es
:
print
(
F
'内容:{data}
\n
写入{filepath}文件出错,错误是{es}'
)
print
(
F
'内容:{data}
\n
写入{filepath}文件出错,错误是{es}'
)
return
False
return
False
ly
=
loadYaml
()
\ No newline at end of file
config/prod/prod.yaml
View file @
8f7f5c5a
click
:
click
:
url
:
http://t.uri6.com/tkio/EFbIzya
url
:
http://t.uri6.com/tkio/EFbIzya
appkey
:
9b17c1568c3ce34599c5fd2778483ff9
appkey
:
9b17c1568c3ce34599c5fd2778483ff9
params
:
ry_adcreative_id = '111'
# 广告组ID
ry_adgroup_id = '222'
# 广告计划ID
ry_adplan_id = '333'
# 广告组名称
ry_adgroup_name = '头条广告组2'
# 广告计划名称
ry_adplan_name = '头条广告计划2'
# 广告创意名称
ry_adcreative_name = '头条广告名称2'
\ No newline at end of file
testcase/android_click/click.py
View file @
8f7f5c5a
...
@@ -5,15 +5,16 @@
...
@@ -5,15 +5,16 @@
@time: 2020/8/4 13:56
@time: 2020/8/4 13:56
@desc: android click
@desc: android click
"""
"""
import
os
import
random
import
random
import
requests
import
requests
import
socket
import
socket
import
struct
import
struct
import
yaml
import
yaml
import
sys
import
sys
sys
.
path
.
append
(
r'/Users/zhaihuitao/gitlab/trackingIO/config'
)
base_path
=
os
.
getcwd
()
import
config.analysis
sys
.
path
.
append
(
base_path
)
from
config.analysis
import
loadYaml
import
config.prod
import
config.prod
import
time
import
time
...
@@ -37,7 +38,7 @@ ry_adcreative_name = '广告创意'
...
@@ -37,7 +38,7 @@ ry_adcreative_name = '广告创意'
s
=
0
s
=
0
w
=
0
w
=
0
#print(config['click']['url'])
for
_
in
range
(
1
):
for
_
in
range
(
1
):
#随机生成12为数组
#随机生成12为数组
...
@@ -65,7 +66,9 @@ for _ in range(1):
...
@@ -65,7 +66,9 @@ for _ in range(1):
# verify = False
# verify = False
# y = config.analysis.loadYaml()
# y = config.analysis.loadYaml()
# y.readYaml('/Users/zhaihuitao/gitlab/trackingIO/config/prod/prod.yaml')
# y.readYaml('/Users/zhaihuitao/gitlab/trackingIO/config/prod/prod.yaml')
y
=
yaml
.
load
(
open
(
'/Users/zhaihuitao/gitlab/trackingIO/config/prod/prod.yaml'
,
'r'
,
encoding
=
'utf-8'
))
# y = yaml.load(open('/Users/zhaihuitao/gitlab/trackingIO/config/prod/prod.yaml', 'r',encoding='utf-8'))
y
=
loadYaml
.
read_yaml
(
loadYaml
,
'/Users/zhaihuitao/gitlab/trackingIO/config/prod/prod.yaml'
)
print
(
y
)
p
=
requests
.
get
(
url
=
y
[
'click'
][
'url'
],
params
=
parms
,
timeout
=
30
,
verify
=
False
)
p
=
requests
.
get
(
url
=
y
[
'click'
][
'url'
],
params
=
parms
,
timeout
=
30
,
verify
=
False
)
print
(
'success:'
,
s
)
print
(
'success:'
,
s
)
...
...
testcase/android_click/test_click.py
0 → 100644
View file @
8f7f5c5a
# -*- coding: utf-8 -*-
"""
@author:zhaiht
@file: test_click.py
@time: 2020/8/5 14:48
@desc:
"""
import
unittest
import
random
import
requests
import
socket
import
struct
import
yaml
import
sys
sys
.
path
.
append
(
r'/Users/zhaihuitao/gitlab/trackingIO/config'
)
class
clickTestCase
(
unittest
.
TestCase
):
def
click
(
self
):
pass
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