Test cases\r
#######################\r
\r
-A base of 30 test cases guarantees the correct functioning of « Bloc Fissure ». 12 cases are dedicated to :ref:`cracked bended pipes <pipeTC>` and the others 13 are for other :ref:`generic geometries <genericTC>`. They are shown here in order to illustrate cases on which « Bloc Fissure » works.\r
+A base of 28 test cases guarantees the correct functioning of « Bloc Fissure ». 12 cases are dedicated to :ref:`cracked bended pipes <pipeTC>` and the others 16 are for other :ref:`generic geometries <genericTC>`. They are shown here in order to illustrate cases on which « Bloc Fissure » works.\r
\r
.. _genericTC:\r
\r
Generic cases\r
===============================\r
\r
-All 13 cases are shown Table 2. Two views show the whole cracked structure and a zoom onto the crack with its tore.\r
-\r
-+-------------------------------------------+----------------------------------------------+\r
-| CubeAngle |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/01_CubeAngle.png | .. image:: images/01_CubeAngle_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| CubeAngle2 |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/02_CubeAngle2.png | .. image:: images/02_CubeAngle2_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| cylindre |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/03_cylindre.png | .. image:: images/03_cylindre_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| cylindre2 |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/04_cylindre2.png | .. image:: images/04_cylindre2_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| disque |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/05_disque.png | .. image:: images/05_disque_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| ellipse1 |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/06_ellipse1.png | .. image:: images/06_ellipse1_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| ellipse2 (tilted crack) |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/07_ellipse2.png | .. image:: images/07_ellipse2_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| eprouvetteCourbe |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/08_eprouvetteCourbe.png | .. image:: images/08_eprouvetteCourbe_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| eprouvetteDroite |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/09_eprouvetteDroite.png | .. image:: images/09_eprouvetteDroite_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| eprouvetteDroite2 |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/10_eprouvetteDroite2.png | .. image:: images/10_eprouvetteDroite2_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| faceGauche |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/11_faceGauche.png | .. image:: images/11_faceGauche_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| faceGauche2 |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/12_faceGauche2.png | .. image:: images/12_faceGauche2_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| vis (Crack is in the radius filet between the screw head and the screw shank) |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/13_vis_1.png | .. image:: images/13_vis_1_2.png |\r
-| :width: 400 | :width: 400 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| tube |\r
-+-------------------------------------------+----------------------------------------------+\r
+All 16 cases are shown Table 2. Two views show the whole cracked structure and a zoom onto the crack with its tore.\r
+\r
++--------------------------------------------+-----------------------------------------------+\r
+| CubeAngle |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/01_CubeAngle.png | .. image:: images/01_CubeAngle_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| CubeAngle_2 |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/02_CubeAngle_2.png | .. image:: images/02_CubeAngle_2_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| cubeCoin |\r
++--------------------------------------------+-----------------------------------------------+\r
+| cubeMilieu |\r
++--------------------------------------------+-----------------------------------------------+\r
+| cubeTransverse |\r
++--------------------------------------------+-----------------------------------------------+\r
+| cylindre |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/03_cylindre.png | .. image:: images/03_cylindre_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| cylindre_2 |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/04_cylindre_2.png | .. image:: images/04_cylindre_2_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| disquePerce |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/05_disque.png | .. image:: images/05_disque_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| ellipse_1 |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/06_ellipse_1.png | .. image:: images/06_ellipse_1_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| ellipse_2 (tilted crack) |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/07_ellipse_2.png | .. image:: images/07_ellipse_2_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| eprouvetteCourbe |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/08_eprouvetteCourbe.png | .. image:: images/08_eprouvetteCourbe_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| eprouvetteDroite |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/09_eprouvetteDroite.png | .. image:: images/09_eprouvetteDroite_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| eprouvetteDroite_2 |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/10_eprouvetteDroite_2.png | .. image:: images/10_eprouvetteDroite_2_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| faceGauche |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/11_faceGauche.png | .. image:: images/11_faceGauche_2.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| faceGauche_2 |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/12_faceGauche_2.png | .. image:: images/12_faceGauche_2_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| vis (Crack is in the radius filet between the screw head and the screw shank) |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/13_vis_1.png | .. image:: images/13_vis_1_2.png |\r
+| :width: 400 | :width: 400 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| tube |\r
++--------------------------------------------+-----------------------------------------------+\r
\r
.. _pipeTC:\r
\r
\r
« Bloc Fissure » is very efficient for the case of bended pipes. The generation of the geometry and the crack insertion takes only around 15s.\r
\r
-Running test cases\r
+Data for the test cases\r
=====================================\r
\r
All the files for these test cases are stored in the directory of the installation of SALOME:\r
\r
``Salome-VXXXX_package-YY/modules/SMESH_VXXXX/lib/python3.6/site-packages/salome/blocFissure``\r
\r
-The test cases can be runned either through the python window of the SALOME GUI or with a python script.\r
-\r
-0) **Generate med and breps files.**::\r
+The set of the med, xao and brep files can be created by the following importation:\r
\r
from blocFissure.materielCasTests import genereMateriel\r
\r
\r
There is no need to generate them again.\r
\r
-1) **To execute all test cases**::\r
-\r
- from blocFissure.CasTests import execution_Cas\r
-\r
-2) **To execute only selected test cases**:\r
+To check the installation of salome, the test cases can be computed by the salome test process::\r
\r
-modify the file ``CasTests/execution_Cas.py`` and change::\r
+ salome -test blocFissure\r
\r
- runall = False. #old : True\r
-\r
-And change from 0 to 1 of the index of the test you want to launch::\r
+Running test cases\r
+=====================================\r
\r
- torun = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\r
+The test cases can be runned by the following instructions::\r
\r
-then launch the test cases::\r
+ from blocFissure.CasTests.blocFissureTest import blocFissureTest\r
+ BLOCFISSURE_TEST = blocFissureTest(list_of_cases)\r
+ MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()\r
+ sys.stdout.write(MESSAGE_ERREUR)\r
+ del BLOCFISSURE_TEST\r
\r
- from blocFissure.CasTests import execution_Cas\r
+If ``list_of_cases`` is an empty list, all the cases are computed.\r
\r
-The index of each test is the position of the test in the following table, from 0 for cubeAngle, 1 for cubeAngle2,\r
-2 for cubeCoin... from top to bottom, then from left to right.\r
+If not, ``list_of_cases`` is made of the list of the numbers and/or the name of the requested case. The index of each test is the position of the test in the following table, from 0 for cubeAngle, 1 for cubeAngle_2, 2 for cubeCoin... from top to bottom, then from left to right.\r
\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
| cubeAngle | cylindre_2 | eprouvetteDroite_2 | fissureCoude_3 | fissureCoude_9 |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
-| cubeAngle2 | disquePerce | faceGauche | fissureCoude_4 | fissure_Coude |\r
+| cubeAngle_2 | disquePerce | faceGauche | fissureCoude_4 | fissure_Coude |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
| cubeCoin | ellipse_1 | faceGauche_2 | fissureCoude_5 | fissure_Coude_4 |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
| cubeMilieu | ellipse_2 | fissureCoude_1 | fissureCoude_6 | vis_1 |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
-| cubeTransverse | eprouvetteCourbe | fissureCoude_10 | fissureCoude_7 | tube |\r
+| cubeTransverse | eprouvetteCourbe | fissureCoude_10 | fissureCoude_7 | |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
| cylindre | eprouvetteDroite | fissureCoude_2 | fissureCoude_8 | |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
\r
-3) **To execute only one test case**::\r
-\r
- from blocFissure.CasTests.[TEST_CASE_NAME] import [TEST_CASE_NAME]\r
-\r
- [TEST_CASE_NAME](0).executeProbleme()\r
-\r
-[TEST_CASE_NAME] is the name of the test case in the previous list. Note that the test cases fissureCoude_4 and fissure_Coude_4 are very similar.\r
-\r
-\r
-\r