* If the test case reports error due to an existing problem and the fix is not available, add @ref testmanual_3_6 "TODO" statement for each error to mark it as a known problem. The TODO statements must be specific so as to match the actually generated messages but not all similar errors.
* To check expected output which should be obtained as the test result, add @ref testmanual_3_7 "REQUIRED" statement for each line of output to mark it as required.
* If the test case produces error messages (contained in parse.rules), which are expected in that test and should not be considered as its failure (e.g. test for *checkshape* command), add REQUIRED statement for each error to mark it as required output.
-4. If the test uses data file(s) that are not yet present in the test database, it is possible to put them to (sub)directory pointed out by *CSF_TestDataPath* variable for running test. The files should be attached to the Mantis issue corresponding to the tested modification.
+4. To check whether the data files needed for the test are already present in the database, use DRAW command *testfile* (see below).
+ If the data file is already present, use it for a new test instead of adding a duplicate.
+ If the data file(s) are not yet present in the test database, put them to a folder and add it to the environment variable *CSF_TestDataPath* to be found by the test system.
+ The location of the data files, which need to be accessed by OCC team and put to the official database, should be provided in the comment to Mantis issue, clearly indicating how the names of the files used by the test script match the actual names of the files.
+ The simplest way is to attach the data files to the Mantis issue, with the same names as used by the test script.
5. Check that the test case runs as expected (test for fix: OK with the fix, FAILED without the fix; test for existing problem: BAD), and integrate it to the Git branch created for the issue.
Example:
checkshape result
~~~~~
+DRAW command *testfile* should be used to check the data files used by the test for possible duplication of content or names.
+The command accepts the list of paths to files to be checked (as a single argument) and gives a conclusion on each of the files, for instance:
+
+~~~~~
+Draw[1]> testfile [glob /my/data/path/bug12345*]
+Collecting info on test data files repository...
+Checking new file(s)...
+
+* /my/data/path/bug12345.brep: duplicate
+ already present under name bug28773_1.brep
+ --> //server/occt_tests_data/public/brep/bug28773_1.brep
+
+* /my/data/path/cadso.brep: new file
+ Warning: DOS encoding detected, consider converting to
+ UNIX unless DOS line ends are needed for the test
+ Warning: shape contains triangulation (946 triangles),
+ consider removing them unless they are needed for the test!
+ BREP size=201 KiB, nbfaces=33, nbedges=94 -> private
+
+* /my/data/path/case_8_wire3.brep: already present
+ --> //server/occt_tests_data/public/brep/case_8_wire3.brep
+
+* /my/data/path/case_8_wire4.brep: error
+ name is already used by existing file
+ --> //server/occt_tests_data/public/brep/case_8_wire4.brep
+~~~~~
+
@section testmanual_2 Organization of Test Scripts
@subsection testmanual_2_1 General Layout
General layout of test scripts is shown in Figure 1.
-@figure{/dev_guides/tests/images/tests_image001.png, "Layout of tests folder"}
+@figure{/dev_guides/tests/images/tests_image001.png,"Layout of tests folder",400}
@subsection testmanual_2_2 Test Groups
Each line in the file should specify a status (single word), followed by a regular expression delimited by slashes (*/*) that will be matched against lines in the test output log to check if it corresponds to this status.
-The regular expressions should follow <a href="http://www.tcl.tk/man/tcl/TclCmd/re_syntax.htm">Tcl syntax</a>, with a special exception that "\b" is considered as word limit (Perl-style), in addition to "\y" used in Tcl.
+The regular expressions should follow <a href="https://www.tcl.tk/man/tcl/TclCmd/re_syntax.htm">Tcl syntax</a>, with a special exception that "\b" is considered as word limit (Perl-style), in addition to "\y" used in Tcl.
The rest of the line can contain a comment message, which will be added to the test report when this status is detected.
@subsection testmanual_3_6 Marking BAD cases
-If the test produces an invalid result at a certain moment then the corresponding bug should be created in the OCCT issue tracker located at http://tracker.dev.opencascade.org, and the problem should be marked as TODO in the test script.
+If the test produces an invalid result at a certain moment then the corresponding bug should be created in the OCCT issue tracker located at https://tracker.dev.opencascade.org, and the problem should be marked as TODO in the test script.
The following statement should be added to such a test script:
~~~~~
| dist_angle_complex | | Distance from edge and given angle |
| dist_angle_sequence | | Distance from edge and given angle |
-@subsubsection testmanual_5_1_7 demo
+@subsubsection testmanual_5_1_7 de
+
+This group tests reading and writing of CAD data files (iges, step) to and from OCCT.
+
+Test cases check transfer status, shape and attributes against expected reference values.
+
+| Grid | Commands | Functionality |
+| :---- | :----- | :------- |
+| iges_1, iges_2, iges_3 | igesbrep, brepiges, ReadIges, WriteIges | IGES tests |
+| step_1, step_2, step_3, step_4, step_5 | stepread, stepwrite, ReadStep, WriteStep | STEP tests |
+
+@subsubsection testmanual_5_1_8 demo
This group allows demonstrating how testing cases are created, and testing DRAW commands and the test system as a whole.
| samples | | OCCT samples |
-@subsubsection testmanual_5_1_8 draft
+@subsubsection testmanual_5_1_9 draft
This group allows testing draft operations.
| Angle | depouille | Drafts with angle (inclined walls) |
-@subsubsection testmanual_5_1_9 feat
+@subsubsection testmanual_5_1_10 feat
This group allows testing creation of features on a shape.
| featrevol | | |
| featrf | | |
-@subsubsection testmanual_5_1_10 heal
+@subsubsection testmanual_5_1_11 heal
This group allows testing the functionality provided by *ShapeHealing* toolkit.
| surface_to_revolution_standard | DT_ShapeConvertRev | Convert elementary surfaces to revolutions, simple cases |
| update_tolerance_locked | updatetolerance | Update the tolerance of shape so that it satisfy the rule: toler(face)<=toler(edge)<=toler(vertex) |
-@subsubsection testmanual_5_1_11 mesh
+@subsubsection testmanual_5_1_12 mesh
This group allows testing shape tessellation (*BRepMesh*) and shading.
| advanced_incmesh_parallel | incmesh | Meshing of complex shapes, parallel mode |
| standard_incmesh_parallel | incmesh | Meshing of simple shapes, parallel mode |
-@subsubsection testmanual_5_1_12 mkface
+@subsubsection testmanual_5_1_13 mkface
This group allows testing creation of simple surfaces.
| after_revsurf_and_offset | mkface | |
| mkplane | mkplane | |
-@subsubsection testmanual_5_1_13 nproject
+@subsubsection testmanual_5_1_14 nproject
This group allows testing normal projection of edges and wires onto a face.
| :---- | :----- | :------- |
| Base | nproject | |
-@subsubsection testmanual_5_1_14 offset
+@subsubsection testmanual_5_1_15 offset
This group allows testing offset functionality for curves and surfaces.
| shape | offsetshape | |
| wire_closed_outside_0_005, wire_closed_outside_0_025, wire_closed_outside_0_075, wire_closed_inside_0_005, wire_closed_inside_0_025, wire_closed_inside_0_075, wire_unclosed_outside_0_005, wire_unclosed_outside_0_025, wire_unclosed_outside_0_075 | mkoffset | 2d offset of closed and unclosed planar wires with different offset step and directions of offset ( inside / outside ) |
-@subsubsection testmanual_5_1_15 pipe
+@subsubsection testmanual_5_1_16 pipe
This group allows testing construction of pipes (sweeping of a contour along profile).
| :---- | :----- | :------- |
| Standard | pipe | |
-@subsubsection testmanual_5_1_16 prism
+@subsubsection testmanual_5_1_17 prism
This group allows testing construction of prisms.
| :---- | :----- | :------- |
| seminf | prism | |
-@subsubsection testmanual_5_1_17 sewing
+@subsubsection testmanual_5_1_18 sewing
This group allows testing sewing of faces by connecting edges.
| tol_1 | sewing | Sewing faces with tolerance 1 |
| tol_100 | sewing | Sewing faces with tolerance 100 |
-@subsubsection testmanual_5_1_18 thrusection
+@subsubsection testmanual_5_1_19 thrusection
This group allows testing construction of shell or a solid passing through a set of sections in a given sequence (loft).
| solids | thrusection | Lofting with resulting solid |
| not_solids | thrusection | Lofting with resulting shell or face |
-@subsubsection testmanual_5_1_19 xcaf
+@subsubsection testmanual_5_1_20 xcaf
This group allows testing extended data exchange packages.
~~~~~
checktrinfo result -defl 1 -tol_abs_defl 0.001
~~~~~
+