Ver Fonte

update pytest testcase/test_case.py

hanojiang há 2 anos atrás
pai
commit
515e43a91d

+ 45 - 73
.idea/workspace.xml

@@ -2,37 +2,7 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="95170716-16e9-467a-973d-c2f0cc971440" name="Default Changelist" comment="">
-      <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Data/CheckList.xlsx" beforeDir="false" afterPath="$PROJECT_DIR$/Data/CheckList.xlsx" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/Data/DataAccess.py" beforeDir="false" afterPath="$PROJECT_DIR$/Data/DataAccess.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/all.py" beforeDir="false" afterPath="$PROJECT_DIR$/all.py" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/data/behaviors.csv" beforeDir="false" afterPath="$PROJECT_DIR$/report/data/behaviors.csv" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/data/behaviors.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/data/behaviors.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/data/categories.csv" beforeDir="false" afterPath="$PROJECT_DIR$/report/data/categories.csv" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/data/categories.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/data/categories.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/data/packages.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/data/packages.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/data/suites.csv" beforeDir="false" afterPath="$PROJECT_DIR$/report/data/suites.csv" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/data/suites.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/data/suites.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/data/timeline.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/data/timeline.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/export/influxDbData.txt" beforeDir="false" afterPath="$PROJECT_DIR$/report/export/influxDbData.txt" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/export/prometheusData.txt" beforeDir="false" afterPath="$PROJECT_DIR$/report/export/prometheusData.txt" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/history/categories-trend.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/history/categories-trend.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/history/duration-trend.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/history/duration-trend.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/history/history-trend.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/history/history-trend.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/history/history.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/history/history.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/history/retry-trend.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/history/retry-trend.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/widgets/behaviors.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/widgets/behaviors.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/widgets/categories-trend.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/widgets/categories-trend.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/widgets/categories.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/widgets/categories.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/widgets/duration-trend.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/widgets/duration-trend.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/widgets/duration.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/widgets/duration.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/widgets/history-trend.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/widgets/history-trend.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/widgets/retry-trend.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/widgets/retry-trend.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/widgets/severity.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/widgets/severity.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/widgets/status-chart.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/widgets/status-chart.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/widgets/suites.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/widgets/suites.json" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/report/widgets/summary.json" beforeDir="false" afterPath="$PROJECT_DIR$/report/widgets/summary.json" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/reportname.html" beforeDir="false" afterPath="$PROJECT_DIR$/reportname.html" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/testcase/test_case.py" beforeDir="false" afterPath="$PROJECT_DIR$/testcase/test_case.py" afterDir="false" />
     </list>
@@ -47,7 +17,7 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/all.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="171">
+            <state relative-caret-position="114">
               <caret line="9" column="60" selection-start-line="9" selection-start-column="56" selection-end-line="9" selection-end-column="60" />
               <folding>
                 <element signature="e#0#9#0" expanded="true" />
@@ -59,7 +29,7 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/Base/CfgCheckBase.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="882">
+            <state relative-caret-position="836">
               <caret line="47" column="118" selection-start-line="47" selection-start-column="19" selection-end-line="47" selection-end-column="118" />
               <folding>
                 <element signature="e#125#147#0" expanded="true" />
@@ -68,10 +38,10 @@
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
+      <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/Base/ModuleCfgCheck.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-904">
+            <state relative-caret-position="171">
               <caret line="15" column="33" selection-start-line="15" selection-start-column="21" selection-end-line="15" selection-end-column="33" />
               <folding>
                 <element signature="e#127#141#0" expanded="true" />
@@ -83,7 +53,7 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/Base/Arxml.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="3724">
+            <state relative-caret-position="3705">
               <caret line="196" column="47" selection-start-line="196" selection-start-column="47" selection-end-line="196" selection-end-column="47" />
               <folding>
                 <element signature="e#0#22#0" expanded="true" />
@@ -92,11 +62,11 @@
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
+      <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/testcase/test_case.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="1596">
-              <caret line="84" column="25" selection-start-line="84" selection-start-column="25" selection-end-line="84" selection-end-column="25" />
+            <state relative-caret-position="285">
+              <caret line="15" column="31" selection-start-line="15" selection-start-column="31" selection-end-line="15" selection-end-column="31" />
               <folding>
                 <element signature="e#123#136#0" expanded="true" />
               </folding>
@@ -107,7 +77,7 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/Base/BaseContainer.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="-3521">
+            <state relative-caret-position="741">
               <caret line="41" column="24" selection-start-line="41" selection-start-column="6" selection-end-line="41" selection-end-column="24" />
             </state>
           </provider>
@@ -125,7 +95,7 @@
       <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/Data/DataAccess.py">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="760">
+            <state relative-caret-position="1444">
               <caret line="78" column="34" selection-start-line="78" selection-start-column="34" selection-end-line="78" selection-end-column="34" />
             </state>
           </provider>
@@ -372,6 +342,8 @@
       <workItem from="1664355712870" duration="91000" />
       <workItem from="1664527281750" duration="246000" />
       <workItem from="1664528095262" duration="123000" />
+      <workItem from="1665452799614" duration="1521000" />
+      <workItem from="1665468447370" duration="8000" />
     </task>
     <servers />
   </component>
@@ -408,20 +380,20 @@
     </history-entry>
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="58877000" />
+    <option name="totallyTimeSpent" value="60406000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="-7" y="-7" width="2062" height="1294" extended-state="6" />
     <editor active="true" />
     <layout>
       <window_info id="Favorites" order="0" side_tool="true" />
-      <window_info active="true" content_ui="combo" id="Project" order="1" visible="true" weight="0.17632368" />
+      <window_info active="true" content_ui="combo" id="Project" order="1" visible="true" weight="0.17932068" />
       <window_info id="Structure" order="2" side_tool="true" weight="0.25" />
       <window_info anchor="bottom" id="Database Changes" order="0" />
-      <window_info anchor="bottom" id="Terminal" order="1" weight="0.27425373" />
+      <window_info anchor="bottom" id="Terminal" order="1" weight="0.44224137" />
       <window_info anchor="bottom" id="Event Log" order="2" side_tool="true" />
       <window_info anchor="bottom" id="Version Control" order="3" weight="0.16293104" />
-      <window_info anchor="bottom" id="Python Console" order="4" weight="0.3101305" />
+      <window_info anchor="bottom" id="Python Console" order="4" weight="0.30948275" />
       <window_info anchor="bottom" id="Docker" order="5" show_stripe_button="false" />
       <window_info anchor="bottom" id="Message" order="6" />
       <window_info anchor="bottom" id="Find" order="7" weight="0.32939714" />
@@ -468,7 +440,7 @@
     <SUITE FILE_PATH="coverage/pytest_src$DataAccess.coverage" NAME="DataAccess Coverage Results" MODIFIED="1664009099956" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/Data" />
     <SUITE FILE_PATH="coverage/pytest_src$pytest_for_test_case_test_04_case.coverage" NAME="pytest for test_case.test_04_case Coverage Results" MODIFIED="1664085346123" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/testcase" />
     <SUITE FILE_PATH="coverage/pytest_src$pytest_for_test_dcm_test_01_case.coverage" NAME="pytest for test_dcm.test_01_case Coverage Results" MODIFIED="1663913935826" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/testcase" />
-    <SUITE FILE_PATH="coverage/pytest_src$all.coverage" NAME="all Coverage Results" MODIFIED="1664527287141" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
+    <SUITE FILE_PATH="coverage/pytest_src$all.coverage" NAME="all Coverage Results" MODIFIED="1665453107769" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
     <SUITE FILE_PATH="coverage/pytest_src$CfgCheckBase.coverage" NAME="CfgCheckBase Coverage Results" MODIFIED="1663898494426" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/Base" />
     <SUITE FILE_PATH="coverage/pytest_src$ModuleCfgCheck.coverage" NAME="ModuleCfgCheck Coverage Results" MODIFIED="1663909713613" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/Base" />
   </component>
@@ -523,7 +495,7 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/all.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="171">
+        <state relative-caret-position="114">
           <caret line="9" column="60" selection-start-line="9" selection-start-column="56" selection-end-line="9" selection-end-column="60" />
           <folding>
             <element signature="e#0#9#0" expanded="true" />
@@ -531,23 +503,29 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/../pytest_venv/Lib/site-packages/openpyxl/worksheet/_reader.py">
+    <entry file="file://$PROJECT_DIR$/Base/CfgCheckBase.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="5130">
-          <caret line="311" selection-start-line="311" selection-end-line="311" />
+        <state relative-caret-position="836">
+          <caret line="47" column="118" selection-start-line="47" selection-start-column="19" selection-end-line="47" selection-end-column="118" />
+          <folding>
+            <element signature="e#125#147#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/../pytest_venv/Lib/site-packages/openpyxl/reader/excel.py">
+    <entry file="file://$PROJECT_DIR$/Base/ModuleCfgCheck.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="5909">
-          <caret line="317" column="17" selection-start-line="317" selection-start-column="11" selection-end-line="317" selection-end-column="17" />
+        <state relative-caret-position="171">
+          <caret line="15" column="33" selection-start-line="15" selection-start-column="21" selection-end-line="15" selection-end-column="33" />
+          <folding>
+            <element signature="e#127#141#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/Base/Arxml.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="3724">
+        <state relative-caret-position="3705">
           <caret line="196" column="47" selection-start-line="196" selection-start-column="47" selection-end-line="196" selection-end-column="47" />
           <folding>
             <element signature="e#0#22#0" expanded="true" />
@@ -557,44 +535,38 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/Base/BaseContainer.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-3521">
+        <state relative-caret-position="741">
           <caret line="41" column="24" selection-start-line="41" selection-start-column="6" selection-end-line="41" selection-end-column="24" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/Data/DataAccess.py">
+    <entry file="file://$PROJECT_DIR$/../pytest_venv/Lib/site-packages/openpyxl/worksheet/_reader.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="760">
-          <caret line="78" column="34" selection-start-line="78" selection-start-column="34" selection-end-line="78" selection-end-column="34" />
+        <state relative-caret-position="5130">
+          <caret line="311" selection-start-line="311" selection-end-line="311" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/testcase/test_case.py">
+    <entry file="file://$PROJECT_DIR$/Data/DataAccess.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1596">
-          <caret line="84" column="25" selection-start-line="84" selection-start-column="25" selection-end-line="84" selection-end-column="25" />
-          <folding>
-            <element signature="e#123#136#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="1444">
+          <caret line="78" column="34" selection-start-line="78" selection-start-column="34" selection-end-line="78" selection-end-column="34" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/Base/CfgCheckBase.py">
+    <entry file="file://$PROJECT_DIR$/../pytest_venv/Lib/site-packages/openpyxl/reader/excel.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="882">
-          <caret line="47" column="118" selection-start-line="47" selection-start-column="19" selection-end-line="47" selection-end-column="118" />
-          <folding>
-            <element signature="e#125#147#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="5909">
+          <caret line="317" column="17" selection-start-line="317" selection-start-column="11" selection-end-line="317" selection-end-column="17" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/Base/ModuleCfgCheck.py">
+    <entry file="file://$PROJECT_DIR$/testcase/test_case.py">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-904">
-          <caret line="15" column="33" selection-start-line="15" selection-start-column="21" selection-end-line="15" selection-end-column="33" />
+        <state relative-caret-position="285">
+          <caret line="15" column="31" selection-start-line="15" selection-start-column="31" selection-end-line="15" selection-end-column="31" />
           <folding>
-            <element signature="e#127#141#0" expanded="true" />
+            <element signature="e#123#136#0" expanded="true" />
           </folding>
         </state>
       </provider>

Diff do ficheiro suprimidas por serem muito extensas
+ 255 - 128
reportname.html


+ 2 - 1
requirements.txt

@@ -4,4 +4,5 @@ pytest-xdist
 pytest-rerunfailures
 pytest-html
 pytest-dependency
-allure-pytest
+allure-pytest
+lxml

BIN
testcase/__pycache__/test_case.cpython-39-pytest-7.1.3.pyc


+ 2 - 2
testcase/test_case.py

@@ -13,8 +13,8 @@ from Data.DataAccess import ItemType, get_xlsx_data_by_filter, ProjectType
 from Base.Arxml import Arxml
 from Base.BaseContainer import EcucContainerValue
 
-PROJECT_TYPE = ProjectType.CCP
-PROJECT = r'D:\01_Work\02_WP\EP39_EV\branch\src\Config\ECUC'
+PROJECT_TYPE = ProjectType.GW04
+PROJECT = r'D:\01_Work\02_WP\AS33\branch\src_v6_1\Config\ECUC'
 # PROJECT = r'D:\01_Work\02_WP\EP39_EV\branch\src\Config\ECUC'
 
 @allure.feature('Fix Value Parameter Check')

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff