Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
InterfaceAutoTest
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TestAuto
InterfaceAutoTest
Commits
416a7e42
Commit
416a7e42
authored
Aug 31, 2021
by
taoke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shanSSO
parent
ec6eef59
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
36 deletions
+1
-36
test_case/bmy/test_login.py
+1
-1
test_case/sso/conftest.py
+0
-13
test_case/sso/test_login.py
+0
-22
No files found.
test_case/bmy/test_login.py
View file @
416a7e42
...
...
@@ -32,7 +32,7 @@ if __name__ == '__main__':
for
one
in
os
.
listdir
(
'../../report/tmp'
):
# 列出对应文件夹的数据
if
'json'
in
one
:
os
.
remove
(
f
'../../report/tmp/{one}'
)
pytest
.
main
([
'test_login
.py'
,
'-s'
,
'--alluredir'
,
'../../report/tmp'
])
# pytest.main(['test_login55
.py', '-s', '--alluredir', '../../report/tmp'])
# # 启动默认浏览器打开报告
os
.
system
(
'allure serve ../../report/tmp'
)
test_case/sso/conftest.py
deleted
100644 → 0
View file @
ec6eef59
__author__
=
'fanxun'
__data__
=
"2021-05-08 10:26"
import
pytest
from
config
import
SSOConfig
from
service.login
import
SSOLogin
@pytest.fixture
(
scope
=
'module'
,
autouse
=
True
)
def
sso_login
():
"""SSO登录获取token"""
sso_token
=
SSOLogin
()
.
sso_login
(
url
=
SSOConfig
.
sso_url
)
setattr
(
SSOConfig
,
'sso_token'
,
sso_token
)
\ No newline at end of file
test_case/sso/test_login.py
deleted
100644 → 0
View file @
ec6eef59
# autor: taoke
# time : 2021/8/26 17:13
import
pytest
,
allure
,
xlrd
,
requests
,
os
from
service.login
import
*
class
TestLogin
():
# workBook = xlrd.open_workbook(f'{BmyConfig.root_path}/test_case_data/bmy/bmy_case.xlsx')
def
test_login
(
self
):
res
=
SSOLogin
()
.
new_ssologin
({
"loginName"
:
"taoker"
,
"password"
:
"tk123456"
},
getToken
=
False
)
print
(
res
)
assert
res
[
'code'
]
==
"200"
def
test_login2
(
self
):
res
=
SSOLogin
()
.
new_ssologin
({
"loginName"
:
"taoker"
,
"password"
:
""
},
getToken
=
False
)
print
(
res
)
assert
res
[
'code'
]
==
"500"
if
__name__
==
'__main__'
:
pytest
.
main
([
'test_login.py'
,
'-s'
])
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