Commit 48b2569a by linguangwei

review

parent 3eeea1c8
......@@ -4,16 +4,12 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="00f4febb-36b6-426d-bfe6-b023876a617e" name="Default Changelist" comment="添加测试白板的page和testcase">
<change beforePath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<list default="true" id="00f4febb-36b6-426d-bfe6-b023876a617e" name="Default Changelist" comment="修改为pytest框架">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/config.ini" beforeDir="false" afterPath="$PROJECT_DIR$/config/config.ini" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pageobject/mainpage.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/pageobject/mainpage.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/testcase/testLivePage.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/testcase/test_LivePage.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/testcase/testLoginPage.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/testcase/test_LoginPage.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/testcase/testMainPage.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/testcase/test_MainPage.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/testcase/testWhiteBoardPage.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/testcase/test_WhiteBoardPage.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/requirements.txt" beforeDir="false" afterPath="$PROJECT_DIR$/requirements.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/framework/common.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/framework/common.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -158,11 +154,12 @@
<recent name="E:\python project\xm-uitest-sow\src\framework" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="E:\python project\xm-uitest-sow\src\testcase" />
<recent name="D:\pycharm projects\xm-uitest-sow\commom" />
<recent name="C:\Users\Administrator\PycharmProjects\xm-uitest-live" />
</key>
</component>
<component name="RunManager" selected="Python tests.pytest in test_MainPage.py">
<component name="RunManager" selected="Python.main">
<configuration name="main" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="xm-uitest-live" />
<option name="INTERPRETER_OPTIONS" value="" />
......@@ -256,8 +253,8 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python tests.pytest in test_MainPage.py" />
<item itemvalue="Python.main" />
<item itemvalue="Python tests.pytest in test_MainPage.py" />
<item itemvalue="Python tests.pytest in test_LoginPage.py" />
<item itemvalue="Python tests.pytest for src.testcase.test_LoginPage.TestLoginPage.testLogin" />
<item itemvalue="Python.test_LoginPage" />
......@@ -367,7 +364,14 @@
<option name="project" value="LOCAL" />
<updated>1624256411294</updated>
</task>
<option name="localTasksCounter" value="13" />
<task id="LOCAL-00013" summary="修改为pytest框架">
<created>1624266261609</created>
<option name="number" value="00013" />
<option name="presentableId" value="LOCAL-00013" />
<option name="project" value="LOCAL" />
<updated>1624266261609</updated>
</task>
<option name="localTasksCounter" value="14" />
<servers />
</component>
<component name="TestHistory">
......@@ -475,7 +479,8 @@
<MESSAGE value="添加转换窗口方法" />
<MESSAGE value="review" />
<MESSAGE value="添加测试白板的page和testcase" />
<option name="LAST_COMMIT_MESSAGE" value="添加测试白板的page和testcase" />
<MESSAGE value="修改为pytest框架" />
<option name="LAST_COMMIT_MESSAGE" value="修改为pytest框架" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/server.log" />
......
......@@ -5,10 +5,11 @@ browserName = Chrome
#browserName = IE
[testServer]
#输入你要测得本地文件路径
#调试客户端本地文件路径
app_location = C:\Users\Administrator\AppData\Local\Programs\xmqxy\小麦企学院.exe
[account]
# 白名单账号
username = 13777867342
password = 0000
......
......@@ -4,4 +4,15 @@ from src.framework import common
if __name__ == '__main__':
htmlPath = "./report/AI-XM_Report{}.html".format(common.year_to_minute())
pytest.main(["-v", '--html={}'.format(htmlPath), './src/testcase/test_MainPage.py'])
pytest.main(["-v", '--html={}'.format(htmlPath), './src/testcase/test_LoginPage.py'])
# # 定义报告输出路径
# htmlPath = "./report/AI-XM_Report{}.html".format(common.year_to_minute())
# with(open(htmlPath, 'wb')) as fp:
# runner = HTMLTestRunner(
# stream=fp,
# title='AI-小麦测试报告',
# description='描述'
# )
# runner.run(testunit)
selenium==3.141.0
allure-pytest==2.9.43
allure-python-commons==2.9.43
Pillow==8.2.0
pytest==6.2.4
Pillow~=8.2.0
requests~=2.25.1
\ No newline at end of file
pytest-html==3.1.1
pytest-metadata==1.11.0
requests==2.25.1
selenium==3.141.0
six==1.16.0
urllib3==1.26.5
......@@ -68,7 +68,7 @@ def create_a_live(start_time, start_time2=None):
xmtoken = get_token()
while xmtoken == "登录过频繁":
# 休息5s是因为可能会登录频繁
time.sleep(5)
time.sleep(15)
xmtoken = get_token()
print(xmtoken)
dt = year_to_day() + ' 00:00:00'
......
Markdown is supported
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