Commit 9dd0cd47 authored by 17322369953's avatar 17322369953
Browse files

登录案例执行指令更新

parent b296d423
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="D:\python\python.exe" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="PyPep8Inspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
<option name="ignoredErrors">
<list>
<option value="E501" />
</list>
</option>
</inspection_tool>
</profile>
</component>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="D:\python\python.exe" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/autotest-airtest-web-sc.iml" filepath="$PROJECT_DIR$/.idea/autotest-airtest-web-sc.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
...@@ -37,13 +37,13 @@ if __name__ == '__main__': ...@@ -37,13 +37,13 @@ if __name__ == '__main__':
# 创建报告目录 # 创建报告目录
report_dir = create_report_dir() report_dir = create_report_dir()
pytest.main(
['-vs', 'D:/pythonProject/atuobase/test_login/test_login_success.py', '--reruns', '3', '--reruns-delay', '2', '--alluredir',
report_dir, '--clean-alluredir'])
# 开始执行用例
#pytest.main( #pytest.main(
# ['-vs', 'D:/pythonProject/atuobase/test_login', '--reruns', '3', '--reruns-delay', '2', '--alluredir', # ['-vs', 'D:/pythonProject/atuobase/test_login/test_login_success.py', '--reruns', '3', '--reruns-delay', '2', '--alluredir',
# report_dir, '--clean-alluredir']) # report_dir, '--clean-alluredir'])
# 开始执行用例
pytest.main(
['-vs', 'D:/pythonProject/atuobase/test_login', '--reruns', '3', '--reruns-delay', '2', '--alluredir',
report_dir, '--clean-alluredir'])
# Mail().send() # Mail().send()
os.system('allure serve %s' % report_dir) os.system('allure serve %s' % report_dir)
......
{"uuid": "209f5de0-e30b-4271-b874-97a1c1fea87f", "children": ["a4d17bdd-9108-4e8b-ba93-0dc1b0e02b13"], "befores": [{"name": "housework", "status": "passed", "start": 1700472864625, "stop": 1700472864625}], "start": 1700472864625, "stop": 1700472871507}
\ No newline at end of file
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段url值为http://scdev.cmic.com.cn:8088/beta/
INFO root:steps_login.py:26 当前url: http://scdev.cmic.com.cn:8088/beta/
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段url值为http://scdev.cmic.com.cn:8088/beta/
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段account值为bj_qgl
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段password值为Gyxc12345
INFO root:verifycode.py:9 开始解析验证码
INFO root:verifycode.py:23 当前验证码的文字为:UK7B
INFO root:steps_login.py:82 输入的验证码为:UK7B
\ No newline at end of file
{"uuid": "73709d31-8d6d-4562-83a3-97470b15aaea", "children": ["57b2c080-a1a0-49c7-a297-f9a6c60b9322"], "befores": [{"name": "housework", "status": "passed", "start": 1700472850035, "stop": 1700472850035}], "start": 1700472850035, "stop": 1700472858023}
\ No newline at end of file
{"uuid": "9ec1ac72-ef2d-4ab1-92b4-7242487c087b", "children": ["8df9c1dc-783a-4ee4-9855-b0898884a95b"], "befores": [{"name": "housework", "status": "passed", "start": 1700472902740, "stop": 1700472902740}], "start": 1700472902740, "stop": 1700472909413}
\ No newline at end of file
{"name": "test_login_verify_code_error", "status": "passed", "steps": [{"name": "打开浏览器", "status": "passed", "start": 1700472902741, "stop": 1700472902844}, {"name": "输入账号密码", "status": "passed", "parameters": [{"name": "flag", "value": "0"}], "start": 1700472902844, "stop": 1700472904948}, {"name": "输入验证码", "status": "passed", "parameters": [{"name": "flag", "value": "1"}], "start": 1700472904948, "stop": 1700472907364}, {"name": "点击登录", "status": "passed", "start": 1700472907364, "stop": 1700472908400}, {"name": "登录错误结果校验", "status": "passed", "parameters": [{"name": "flag", "value": "0"}], "start": 1700472908400, "stop": 1700472909411}], "attachments": [{"name": "log", "source": "f9bdeb94-cc54-438b-b9b2-3d0d93d1a2ff-attachment.txt", "type": "text/plain"}], "start": 1700472902741, "stop": 1700472909413, "uuid": "8df9c1dc-783a-4ee4-9855-b0898884a95b", "historyId": "ede6c7f0e1e7a2af3e978d67fba55397", "testCaseId": "3055648340d6ae4c20cfb3b690f12d9a", "fullName": "atuobase.test_login.test_login_verify_code_error.TestLoginVerifyCodeError#test_login_verify_code_error", "labels": [{"name": "story", "value": "登录验证码错误案例-点击登录"}, {"name": "feature", "value": "登录模块"}, {"name": "parentSuite", "value": "atuobase.test_login"}, {"name": "suite", "value": "test_login_verify_code_error"}, {"name": "subSuite", "value": "TestLoginVerifyCodeError"}, {"name": "host", "value": "HUAWEI"}, {"name": "thread", "value": "13928-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "atuobase.test_login.test_login_verify_code_error"}]}
\ No newline at end of file
{"uuid": "e154583b-e6ad-42d4-a031-d62af1f3ea1b", "children": ["08f89516-a331-4f0f-87e7-f7105fd65ba0"], "befores": [{"name": "housework", "status": "passed", "start": 1700472896097, "stop": 1700472896097}], "start": 1700472896097, "stop": 1700472902735}
\ No newline at end of file
{"name": "test_login_no_input_verifycode", "status": "passed", "steps": [{"name": "打开浏览器", "status": "passed", "start": 1700472858025, "stop": 1700472858123}, {"name": "输入账号密码", "status": "passed", "parameters": [{"name": "flag", "value": "0"}], "start": 1700472858123, "stop": 1700472860225}, {"name": "输入验证码", "status": "passed", "parameters": [{"name": "flag", "value": "2"}], "start": 1700472860225, "stop": 1700472862567}, {"name": "点击登录", "status": "passed", "start": 1700472862567, "stop": 1700472863603}, {"name": "登录错误结果校验", "status": "passed", "parameters": [{"name": "flag", "value": "3"}], "start": 1700472863603, "stop": 1700472864620}], "attachments": [{"name": "log", "source": "18d9e0ea-d1f3-437b-8662-ee941dff3459-attachment.txt", "type": "text/plain"}], "start": 1700472858025, "stop": 1700472864620, "uuid": "363fb4df-ca00-448d-aa56-0d96cfa082ed", "historyId": "1eb6d2660c1ffd3692c35d343ff5f6de", "testCaseId": "7135ee4b659905a7032c89f8e6f8102f", "fullName": "atuobase.test_login.test_login_no_input_verifycode.TestLoginNoInputVerifycode#test_login_no_input_verifycode", "labels": [{"name": "story", "value": "不输入验证码案例-点击登录"}, {"name": "feature", "value": "登录模块"}, {"name": "parentSuite", "value": "atuobase.test_login"}, {"name": "suite", "value": "test_login_no_input_verifycode"}, {"name": "subSuite", "value": "TestLoginNoInputVerifycode"}, {"name": "host", "value": "HUAWEI"}, {"name": "thread", "value": "13928-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "atuobase.test_login.test_login_no_input_verifycode"}]}
\ No newline at end of file
{"name": "test_login_success_click", "status": "passed", "steps": [{"name": "打开浏览器", "status": "passed", "start": 1700472871511, "stop": 1700472871613}, {"name": "输入账号密码", "status": "passed", "parameters": [{"name": "flag", "value": "0"}], "start": 1700472871613, "stop": 1700472873712}, {"name": "输入验证码", "status": "passed", "parameters": [{"name": "flag", "value": "0"}], "start": 1700472873712, "stop": 1700472876101}, {"name": "点击登录", "status": "passed", "start": 1700472876101, "stop": 1700472877144}, {"name": "判断是否登录成功", "status": "passed", "start": 1700472877144, "stop": 1700472878217}], "attachments": [{"name": "log", "source": "ee4b9e59-2376-4164-90d8-8eba81851367-attachment.txt", "type": "text/plain"}], "start": 1700472871511, "stop": 1700472878217, "uuid": "0b88d4b8-7a55-4cb2-81cb-839660f62e0e", "historyId": "994bdc7d7f2d92350503243c6e75259e", "testCaseId": "f473e68493409c6e5d7b915b06c2bb77", "fullName": "atuobase.test_login.test_login_success.TestLoginSuccess#test_login_success_click", "labels": [{"name": "story", "value": "登录成功案例-点击登录"}, {"name": "feature", "value": "登录模块"}, {"name": "parentSuite", "value": "atuobase.test_login"}, {"name": "suite", "value": "test_login_success"}, {"name": "subSuite", "value": "TestLoginSuccess"}, {"name": "host", "value": "HUAWEI"}, {"name": "thread", "value": "13928-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "atuobase.test_login.test_login_success"}]}
\ No newline at end of file
{"name": "test_login_no_input_userid", "status": "passed", "steps": [{"name": "打开浏览器", "status": "passed", "start": 1700472850035, "stop": 1700472851462}, {"name": "输入账号密码", "status": "passed", "parameters": [{"name": "flag", "value": "2"}], "start": 1700472851462, "stop": 1700472853542}, {"name": "输入验证码", "status": "passed", "parameters": [{"name": "flag", "value": "0"}], "start": 1700472853542, "stop": 1700472855957}, {"name": "点击登录", "status": "passed", "start": 1700472855957, "stop": 1700472857006}, {"name": "登录错误结果校验", "status": "passed", "parameters": [{"name": "flag", "value": "2"}], "start": 1700472857007, "stop": 1700472858021}], "attachments": [{"name": "log", "source": "6e0334ea-9ea8-4951-892f-f038f27f1552-attachment.txt", "type": "text/plain"}], "start": 1700472850035, "stop": 1700472858021, "uuid": "57b2c080-a1a0-49c7-a297-f9a6c60b9322", "historyId": "25dad1d66da10ac8330f09b02006392f", "testCaseId": "ad2e7b0e7feeb5ab37c5db7ceb3bf349", "fullName": "atuobase.test_login.test_login_no_input_userid.TestLoginNoInputUserid#test_login_no_input_userid", "labels": [{"name": "story", "value": "不输入用户名登录失败案例-点击登录"}, {"name": "feature", "value": "登录模块"}, {"name": "parentSuite", "value": "atuobase.test_login"}, {"name": "suite", "value": "test_login_no_input_userid"}, {"name": "subSuite", "value": "TestLoginNoInputUserid"}, {"name": "host", "value": "HUAWEI"}, {"name": "thread", "value": "13928-MainThread"}, {"name": "framework", "value": "pytest"}, {"name": "language", "value": "cpython3"}, {"name": "package", "value": "atuobase.test_login.test_login_no_input_userid"}]}
\ No newline at end of file
{"uuid": "1a8c9dd2-3af3-4e5d-9a17-8525507244a2", "children": ["08f89516-a331-4f0f-87e7-f7105fd65ba0"], "befores": [{"name": "housework", "status": "passed", "start": 1700472878223, "stop": 1700472878223}], "start": 1700472878223, "stop": 1700472885205}
\ No newline at end of file
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段url值为http://scdev.cmic.com.cn:8088/beta/
INFO root:steps_login.py:26 当前url: http://scdev.cmic.com.cn:8088/beta/
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段url值为http://scdev.cmic.com.cn:8088/beta/
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段account值为bj_qgl
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段password值为Gyxc12345
INFO root:verifycode.py:9 开始解析验证码
INFO root:verifycode.py:23 当前验证码的文字为:OKVV
INFO root:steps_login.py:82 输入的验证码为:OKVV
ERROR root:steps_login.py:152 登录错误结果校验,案例执行失败
ERROR root:steps_login.py:153 self.page_login.get_text(login_result_element)=验证码错误!!
ERROR root:steps_login.py:155 result_value=用户名或密码错误
ERROR root:steps_login.py:156 self.page_login.get_text(login_result_element)与result_value不一致
ERROR root:steps_login.py:159 登录错误结果校验问题:Assertion failed.Traceback (most recent call last):
File "D:\pythonProject\atuobase\test_login\steps_login.py", line 157, in judge_result_error
assert False
AssertionError
\ No newline at end of file
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段url值为http://scdev.cmic.com.cn:8088/beta/
INFO root:steps_login.py:26 当前url: http://scdev.cmic.com.cn:8088/beta/
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段url值为http://scdev.cmic.com.cn:8088/beta/
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段account值为bj_qgl
INFO root:read_yaml.py:34 当前的yaml文件路径:D:\pythonProject\atuobase\data\test_login\data.yaml
INFO root:read_yaml.py:37 文件data中字段password值为Gyxc12345
INFO root:verifycode.py:9 开始解析验证码
INFO root:verifycode.py:23 当前验证码的文字为:AX3Y
INFO root:steps_login.py:82 输入的验证码为:AX3Y
\ No newline at end of file
Supports Markdown
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