Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jk_interface_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
huangqiang
jk_interface_test
Commits
c789b585
Commit
c789b585
authored
Apr 19, 2021
by
小刘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录成功后请求所有的接口
parent
96a48b36
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
6 deletions
+73
-6
test_auth_choose_class.py
...iarch_app/test_xin_choose_class/test_auth_choose_class.py
+0
-0
test_auth_choose_class_details.py
...p/test_xin_choose_class/test_auth_choose_class_details.py
+1
-2
test_auth_classes.py
...atriarch_app/test_xin_students_class/test_auth_classes.py
+2
-2
test_auth_students_classes.py
...app/test_xin_students_class/test_auth_students_classes.py
+1
-1
test_auth_students.py
...triarch_app/test_xin_students_login/test_auth_students.py
+69
-1
No files found.
script/xin_project_patriarch_app/xin_patriarch_app/test_xin_choose_class/test_auth_choose_class.py
View file @
c789b585
This diff is collapsed.
Click to expand it.
script/xin_project_patriarch_app/xin_patriarch_app/test_xin_choose_class/test_auth_choose_class_details.py
View file @
c789b585
...
...
@@ -22,7 +22,7 @@ class TestAuthChoseClassDetails:
def
setup_class
(
self
):
self
.
server
=
StaticGlobal
.
SERVER
self
.
schoolArea
=
StaticGlobal
.
SCHOOL
self
.
studentPho
=
'145'
+
datetime
.
datetime
.
now
()
.
strftime
(
'
%
d
%
H
%
M
%
S
'
)
self
.
studentPho
=
'145'
+
datetime
.
datetime
.
now
()
.
strftime
(
'
%
S
%
f
'
)
students_data
=
CreateStudent
(
server
=
self
.
server
,
contactInfo
=
self
.
studentPho
)
.
create_student
()
self
.
userId
=
students_data
[
'data'
][
'list'
][
0
][
'studentId'
]
"""
...
...
@@ -180,4 +180,3 @@ class TestAuthChoseClassDetails:
with
assume
:
assert
details_data
.
get
(
'data'
)
.
get
(
'teacherDetail'
)
.
get
(
'subject'
)
==
'数学'
with
assume
:
assert
details_data
.
get
(
'data'
)
.
get
(
'teacherDetail'
)
.
get
(
'sex'
)
==
'男'
with
assume
:
assert
'测试成都校区'
in
details_data
.
get
(
'data'
)
.
get
(
'teacherDetail'
)
.
get
(
'schoolArea'
)
script/xin_project_patriarch_app/xin_patriarch_app/test_xin_students_class/test_auth_classes.py
View file @
c789b585
...
...
@@ -24,7 +24,7 @@ from script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login im
class
TestAuthNotBuyClasses
:
def
setup_class
(
self
):
self
.
server
=
StaticGlobal
.
SERVER
self
.
studentPho
=
'133'
+
datetime
.
datetime
.
now
()
.
strftime
(
'
%
d
%
H
%
M
%
S
'
)
self
.
studentPho
=
'133'
+
datetime
.
datetime
.
now
()
.
strftime
(
'
%
S
%
f
'
)
students_data
=
CreateStudent
(
server
=
self
.
server
,
contactInfo
=
self
.
studentPho
)
.
create_student
()
self
.
userId
=
students_data
[
'data'
][
'list'
][
0
][
'studentId'
]
self
.
header
=
AuthHeaders
(
server
=
self
.
server
,
username
=
self
.
studentPho
,
password
=
'geek1234'
)
.
get_auth_headers
()
...
...
@@ -53,7 +53,7 @@ class TestAuthNotBuyClasses:
class
TestAuthHaveClasses
:
def
setup_class
(
self
):
self
.
server
=
StaticGlobal
.
SERVER
self
.
studentPho
=
'133'
+
datetime
.
datetime
.
now
()
.
strftime
(
'
%
d
%
H
%
M
%
S
'
)
self
.
studentPho
=
'133'
+
datetime
.
datetime
.
now
()
.
strftime
(
'
%
S
%
f
'
)
self
.
students_data
=
CreateStudent
(
server
=
self
.
server
,
contactInfo
=
self
.
studentPho
)
.
create_student
()
self
.
userId
=
self
.
students_data
[
'data'
][
'list'
][
0
][
'studentId'
]
self
.
create_class_data
=
[[
'主线课程'
,
'极趣班'
,
'常规班课'
,
'数学'
],
...
...
script/xin_project_patriarch_app/xin_patriarch_app/test_xin_students_class/test_auth_students_classes.py
View file @
c789b585
...
...
@@ -23,7 +23,7 @@ from script.xin_project_patriarch_app.xin_static.xin_educational.xin_course_hand
class
TestAuthStudentsClassMessage
:
def
setup_class
(
self
):
self
.
server
=
StaticGlobal
.
SERVER
self
.
studentPho
=
'167'
+
datetime
.
datetime
.
now
()
.
strftime
(
'
%
d
%
H
%
M
%
S
'
)
self
.
studentPho
=
'167'
+
datetime
.
datetime
.
now
()
.
strftime
(
'
%
S
%
f
'
)
students_data
=
CreateStudent
(
server
=
self
.
server
,
contactInfo
=
self
.
studentPho
)
.
create_student
()
self
.
userId
=
students_data
[
'data'
][
'list'
][
0
][
'studentId'
]
self
.
course_id
=
CreateCourse
(
server
=
self
.
server
,
...
...
script/xin_project_patriarch_app/xin_patriarch_app/test_xin_students_login/test_auth_students.py
View file @
c789b585
...
...
@@ -2,8 +2,11 @@ import allure
import
jsonpath
from
pytest_assume.plugin
import
assume
from
script.base_api
import
app_students_phoneNumber_mobilePhoneNumberBounding_get
,
app_pushRelationship_post
from
script.base_api
import
app_students_phoneNumber_mobilePhoneNumberBounding_get
,
app_pushRelationship_post
,
plaso_student_token_get
,
plaso_student_exist_get
,
app_notice_getNotReadCount_get
from
script.base_api
import
app_purchaseOrder_studentId_student_count_get
,
app_course_courseNoticeMessage_post
,
app_course_recentClassTime_get
,
examination_app_queryExamination_get
from
script.base_api
import
app_zeGou_queryClassesIsAvailableVideo_post
from
script.xin_project_patriarch_app.xin_patriarch_app.xin_patriach_static.xin_public_class.xin_global_static
import
StaticGlobal
from
script.xin_project_patriarch_app.xin_patriarch_app.xin_patriach_static.xin_students_message.xin_query_students_message
import
QueryStudentsMessage
from
script.xin_project_patriarch_app.xin_static.xin_user.xin_patriarch_login
import
AuthHeaders
...
...
@@ -13,6 +16,8 @@ class TestAuthStudents:
def
setup_class
(
self
):
self
.
server
=
StaticGlobal
.
SERVER
self
.
header
=
AuthHeaders
(
server
=
self
.
server
,
username
=
'13364004418'
,
password
=
'geek1234'
)
.
get_auth_headers
()
students_message
=
QueryStudentsMessage
(
server
=
self
.
server
,
studentPno
=
'13364004418'
)
.
query_students_message
()
self
.
student_id
=
students_message
.
get
(
'data'
)[
0
]
.
get
(
'student'
)
.
get
(
'id'
)
@allure.story
(
'登录成功验证'
)
@allure.title
(
'验证查询学生信息正确'
)
...
...
@@ -35,3 +40,66 @@ class TestAuthStudents:
}
push_data
=
app_pushRelationship_post
(
body
=
push_data
,
header
=
self
.
header
,
default_assert
=
False
)
with
assume
:
assert
push_data
.
get
(
'code'
)
==
0
@allure.story
(
'登录成功验证'
)
@allure.title
(
'伯索获取学生用户token'
)
@allure.description
(
'伯索获取学生用户token'
)
def
test_auth_three_token
(
self
):
auth_data
=
plaso_student_token_get
(
header
=
self
.
header
,
params
=
{
"id"
:
self
.
student_id
})
with
assume
:
assert
auth_data
.
get
(
'code'
)
==
0
with
assume
:
assert
auth_data
.
get
(
'msg'
)
==
'成功'
@allure.story
(
'登录成功验证'
)
@allure.title
(
'是否存在伯索学生身份'
)
@allure.description
(
'是否存在伯索学生身份'
)
def
test_auth_exist_student
(
self
):
exist_data
=
plaso_student_exist_get
(
params
=
{
'id'
:
self
.
student_id
},
header
=
self
.
header
)
with
assume
:
assert
exist_data
.
get
(
'code'
)
==
0
with
assume
:
assert
exist_data
.
get
(
'msg'
)
==
'成功'
@allure.story
(
'登录成功验证'
)
@allure.title
(
'验证学生所有消息未读数'
)
@allure.description
(
'验证学生所有消息未读数'
)
def
test_auth_not_read_message
(
self
):
message_data
=
app_notice_getNotReadCount_get
(
params
=
{
'userId'
:
self
.
student_id
},
header
=
self
.
header
)
with
assume
:
assert
message_data
.
get
(
'code'
)
==
0
with
assume
:
assert
message_data
.
get
(
'msg'
)
==
'成功'
@allure.story
(
'登录成功验证'
)
@allure.title
(
'获取某个学生购课单中课程总数'
)
@allure.description
(
'获取某个学生购课单中课程总数'
)
def
test_auth_purchase_order_count
(
self
):
purchase_order_data
=
app_purchaseOrder_studentId_student_count_get
(
studentId
=
self
.
student_id
,
header
=
self
.
header
)
with
assume
:
assert
purchase_order_data
.
get
(
'code'
)
==
0
with
assume
:
assert
purchase_order_data
.
get
(
'msg'
)
==
'成功'
@allure.story
(
'登录成功验证'
)
@allure.title
(
'验证学生的课程提醒'
)
@allure.description
(
'验证学生的课程提醒'
)
def
test_auth_course_notice_message
(
self
):
notice_data
=
app_course_courseNoticeMessage_post
(
params
=
{
"studentId"
:
self
.
student_id
},
header
=
self
.
header
)
with
assume
:
assert
notice_data
.
get
(
'code'
)
==
0
with
assume
:
assert
notice_data
.
get
(
'msg'
)
==
'成功'
@allure.story
(
'登录成功验证'
)
@allure.title
(
'验证学生的最近上课时间'
)
@allure.description
(
'验证学生的最近上课时间'
)
def
test_auth_course_recent_class_time
(
self
):
recent_data
=
app_course_recentClassTime_get
(
params
=
{
"studentId"
:
self
.
student_id
},
header
=
self
.
header
)
with
assume
:
assert
recent_data
.
get
(
'code'
)
==
0
with
assume
:
assert
recent_data
.
get
(
'msg'
)
==
'成功'
@allure.story
(
'登录成功验证'
)
@allure.title
(
'验证学生的考试列表'
)
@allure.description
(
'验证学生的考试列表'
)
def
test_auth_course_examination
(
self
):
examination_data
=
examination_app_queryExamination_get
(
params
=
{
"studentId"
:
self
.
student_id
},
header
=
self
.
header
)
with
assume
:
assert
examination_data
.
get
(
'code'
)
==
0
with
assume
:
assert
examination_data
.
get
(
'msg'
)
==
'成功'
@allure.story
(
'登录成功验证'
)
@allure.title
(
'获取班级当前排课'
)
@allure.description
(
'获取班级当前排课'
)
def
test_auth_available_video
(
self
):
video_data
=
app_zeGou_queryClassesIsAvailableVideo_post
(
header
=
self
.
header
,
body
=
[])
with
assume
:
assert
video_data
.
get
(
'code'
)
==
0
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