Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
Test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曹燕
Test
Commits
89397b26
Commit
89397b26
authored
Nov 25, 2019
by
huangqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加发送邮件2
parent
0db045b0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
17 deletions
+23
-17
student_data.json
...face_Atuo_test/jiyunying/reception/data/student_data.json
+2
-2
debugtalk.py
Interface_Atuo_test/jiyunying/reception/debugtalk.py
+9
-6
apply_student_new.yml
..._test/jiyunying/reception/testcases/apply_student_new.yml
+12
-9
No files found.
Interface_Atuo_test/jiyunying/reception/data/student_data.json
View file @
89397b26
{
{
"studentName"
:
""
,
"studentName"
:
""
,
"studentPrimPhoneNo"
:
""
,
"studentPrimPhoneNo"
:
"
19900000000
"
,
"primBelong"
:
"爸爸"
,
"primBelong"
:
"爸爸"
,
"studentSecondaryPhoneNo"
:
""
,
"studentSecondaryPhoneNo"
:
""
,
"secondaryBelong"
:
""
,
"secondaryBelong"
:
""
,
"studentSex"
:
"男"
,
"studentSex"
:
"男"
,
"attendSchool"
:
""
,
"attendSchool"
:
""
,
"attendGrade"
:
"三年级"
,
"attendGrade"
:
"三年级"
,
"birthday"
:
"201
9
-08-04"
,
"birthday"
:
"201
0
-08-04"
,
"studentSource"
:
"营销口碑"
,
"studentSource"
:
"营销口碑"
,
"introducer"
:
"黄弓"
,
"introducer"
:
"黄弓"
,
"introducerId"
:
10140033
,
"introducerId"
:
10140033
,
...
...
Interface_Atuo_test/jiyunying/reception/debugtalk.py
View file @
89397b26
...
@@ -17,19 +17,15 @@ def get_token():
...
@@ -17,19 +17,15 @@ def get_token():
return
common
.
readconf
(
"token"
,
"token"
)
return
common
.
readconf
(
"token"
,
"token"
)
def
get_student_data
(
attendSchool
,
schoolArea
=
3015
,
entrancePaper
=
""
,
introducer
=
""
,
introducerId
=
None
):
def
get_student_data
(
attendSchool
,
entrancePaper
=
None
,
introducer
=
None
,
introducerId
=
None
):
num_name
=
random
.
randint
(
0
,
10000
)
num_name
=
random
.
randint
(
0
,
10000
)
num_phone
=
random
.
randint
(
10000000
,
90000000
)
student_name
=
"自动"
+
str
(
num_name
)
student_name
=
"自动"
+
str
(
num_name
)
num_phone
=
"197
%
s"
%
num_phone
with
open
(
"reception/data/student_data.json"
,
encoding
=
"utf-8"
)
as
fp
:
with
open
(
"reception/data/student_data.json"
,
encoding
=
"utf-8"
)
as
fp
:
student_data
=
json
.
load
(
fp
)
student_data
=
json
.
load
(
fp
)
student_data
[
"studentName"
]
=
student_name
student_data
[
"studentName"
]
=
student_name
student_data
[
"studentPrimPhoneNo"
]
=
num_phone
student_data
[
"introducer"
]
=
introducer
student_data
[
"introducer"
]
=
introducer
student_data
[
"introducerId"
]
=
introducerId
student_data
[
"introducerId"
]
=
introducerId
student_data
[
"attendSchool"
]
=
attendSchool
student_data
[
"attendSchool"
]
=
attendSchool
student_data
[
"schoolArea"
]
=
schoolArea
student_data
[
"entrancePaper"
]
=
entrancePaper
student_data
[
"entrancePaper"
]
=
entrancePaper
return
student_data
return
student_data
...
@@ -37,9 +33,16 @@ def get_student_data(attendSchool, schoolArea=3015, entrancePaper="", introducer
...
@@ -37,9 +33,16 @@ def get_student_data(attendSchool, schoolArea=3015, entrancePaper="", introducer
def
is_skip
():
def
is_skip
():
flag
=
None
flag
=
None
host
=
common
.
readconf
(
"host"
,
"host"
)
host
=
common
.
readconf
(
"host"
,
"host"
)
if
host
==
"geek.jkwljy.com"
or
host
==
"132.232.15.12"
:
if
host
==
"geek.jkwljy.com"
:
flag
=
True
flag
=
True
else
:
else
:
flag
=
False
flag
=
False
return
flag
return
flag
def
get_phone
():
with
open
(
"reception/data/student_data.json"
,
encoding
=
"utf-8"
)
as
fp
:
student_data
=
json
.
load
(
fp
)
phone
=
student_data
[
"studentPrimPhoneNo"
]
return
phone
Interface_Atuo_test/jiyunying/reception/testcases/apply_student_new.yml
View file @
89397b26
...
@@ -3,31 +3,33 @@ config:
...
@@ -3,31 +3,33 @@ config:
# base_url: ${get_host()}
# base_url: ${get_host()}
teststeps
:
teststeps
:
-
name
:
查询员工信息接口
api
:
api/login_empliyee_info.yml
-
-
name
:
防重复提交接口
name
:
防重复提交接口
# setup_hooks:
# setup_hooks:
# - ${test($request)}
# - ${test($request)}
teardown_hooks
:
#
teardown_hooks:
-
${test($response)}
#
- ${test($response)}
api
:
api/all_check_recommit.yml
api
:
api/all_check_recommit.yml
-
-
name
:
查询公立学校接口
name
:
查询公立学校接口
skip
:
跳过
api
:
api/apply_query_public_school.yml
api
:
api/apply_query_public_school.yml
variables
:
variables
:
schoolName
:
成都市
schoolName
:
成都市
-
-
name
:
查询手机号绑定学生接口
name
:
查询手机号绑定学生接口
skip
:
"
没有原因"
api
:
api/apply_phone_bounding.yml
api
:
api/apply_phone_bounding.yml
variables
:
variables
:
new_phone
:
"
"
new_phone
:
${get_phone()}
-
-
name
:
查询学生信息接口
name
:
查询学生信息接口
skip
:
跳过
api
:
api/apply_student_info.yml
api
:
api/apply_student_info.yml
variables
:
variables
:
studentName
:
"
黄弓"
studentName
:
"
黄弓"
...
@@ -37,14 +39,15 @@ teststeps:
...
@@ -37,14 +39,15 @@ teststeps:
-
-
name
:
上传文件(试卷)接口
name
:
上传文件(试卷)接口
skipIf
:
None
skipIf
:
${is_skip()}
api
:
api/apply_upload_file.yml
api
:
api/apply_upload_file.yml
variables
:
variables
:
userId
:
8223
userId
:
$employeeId
-
-
name
:
新建学生接口
name
:
新建学生接口
skipIf
:
None
# skipIf: ${is_skip()}
skipIf
:
True
api
:
api/apply_student_new.yml
api
:
api/apply_student_new.yml
variables
:
variables
:
student_data
:
${get_student_data($public_school_name,entrancePaper=$file_url)}
student_data
:
${get_student_data($public_school_name,entrancePaper=$file_url)}
...
...
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