阳洁
2023-07-13 b9c5276ec40e2e80d4958a126c377b171b5baa43
测评系统自动测试
3个文件已修改
20 ■■■■■ 已修改文件
main.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
report/report.html 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
testcase/test_smoking.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
main.py
@@ -1,3 +1,5 @@
import time
import pytest
import pytest_html
report/report.html
@@ -253,10 +253,10 @@
}
</script>
    <h1>report.html</h1>
    <p>Report generated on 13-Jul-2023 at 14:10:29 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a> v3.2.0</p>
    <p>Report generated on 13-Jul-2023 at 15:20:12 by <a href="https://pypi.python.org/pypi/pytest-html">pytest-html</a> v3.2.0</p>
    <h2>Summary</h2>
    <p>4 tests ran in 5.98 seconds. </p>
    <p class="filter" hidden="true">(Un)check the boxes to filter the results.</p><input checked="true" class="filter" data-test-result="passed" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="passed">1 passed</span>, <input checked="true" class="filter" data-test-result="skipped" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="skipped">0 skipped</span>, <input checked="true" class="filter" data-test-result="failed" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="failed">3 failed</span>, <input checked="true" class="filter" data-test-result="error" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="error">0 errors</span>, <input checked="true" class="filter" data-test-result="xfailed" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="xfailed">0 expected failures</span>, <input checked="true" class="filter" data-test-result="xpassed" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="xpassed">0 unexpected passes</span>
    <p>4 tests ran in 25.54 seconds. </p>
    <p class="filter" hidden="true">(Un)check the boxes to filter the results.</p><input checked="true" class="filter" data-test-result="passed" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="passed">0 passed</span>, <input checked="true" class="filter" data-test-result="skipped" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="skipped">0 skipped</span>, <input checked="true" class="filter" data-test-result="failed" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="failed">4 failed</span>, <input checked="true" class="filter" data-test-result="error" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="error">0 errors</span>, <input checked="true" class="filter" data-test-result="xfailed" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="xfailed">0 expected failures</span>, <input checked="true" class="filter" data-test-result="xpassed" disabled="true" hidden="true" name="filter_checkbox" onChange="filterTable(this)" type="checkbox"/><span class="xpassed">0 unexpected passes</span>
    <h2>Results</h2>
    <table id="results-table">
      <thead id="results-table-head">
@@ -271,7 +271,7 @@
        <tr>
          <td class="col-result">Failed</td>
          <td class="col-name">testcase/test_smoking.py::TestSmoking::test_login</td>
          <td class="col-duration">4.36</td>
          <td class="col-duration">12.07</td>
          <td class="col-links"></td></tr>
        <tr>
          <td class="extra" colspan="4">
@@ -289,16 +289,16 @@
        <tr>
          <td class="col-result">Failed</td>
          <td class="col-name">testcase/test_smoking.py::TestSmoking::test_open_url</td>
          <td class="col-duration">0.00</td>
          <td class="col-duration">0.02</td>
          <td class="col-links"></td></tr>
        <tr>
          <td class="extra" colspan="4">
            <div class="empty log">No log output captured.</div></td></tr></tbody>
      <tbody class="passed results-table-row">
      <tbody class="failed results-table-row">
        <tr>
          <td class="col-result">Passed</td>
          <td class="col-result">Failed</td>
          <td class="col-name">testcase/test_smoking.py::TestSmoking::test_answer</td>
          <td class="col-duration">8.81</td>
          <td class="col-duration">13.11</td>
          <td class="col-links"></td></tr>
        <tr>
          <td class="extra" colspan="4">
testcase/test_smoking.py
@@ -46,7 +46,7 @@
                # 出现异常表示不存在刷新按钮,退出循环
                break
        login_page.login("admin", "HyNc#jp0z#N7Y5ih", "ots")
        login_page.login("admin", "ots@2021!!", "ots")
        time.sleep(2)
        assert login_page.is_login_success()