Testing elements for library (= SiL-test)

The test framework of logi.CAD 3 allows you to create automated →unit tests for each library element and to achieve an corresponding test coverage . This test is also known as →SiL-test.

Recommended

The execution of the SIL-test per library element is a recommended step, if you create a logi.SAFE library or a logi.WEB library.
When the logi.SAFE or logi.WEB library is generated and without the SiL-tests (thus, without unit tests and hence without test coverage), you will get appropriate messages that files are not found and that information is not available. Without the test suites for the SiL-tests, the PiL-tests are also not possible (the execution of PiL-tests is a recommended step as well). Subsequently, the SiL-report and the PiL-report are missing for the following release for which the missing files/information are also listed.

If you want to generate a logi.CAD 3 library, skip this instruction.


Proceed as follows in order to test the library elements of a logi.SAFE or a logi.WEB library:

  1. Make sure that the project where the library element is located is compliant with the appropriate conditions. Details: See " Preparing an existing project for tests " .

  2. Create a test suite for a library element. Details: See " Creating a test suite " .

  3. Enter the test data for the library element within this test suite. Afterwards i mport the test suite into the test project . Details: See " Modifying the Excel test suite, creating the test suite required for test execution " .

  4. Have these tests executed as SiL-Test with Coverage and check the test coverage. Details: See " Executing the test".
    logi.CAD 3 generates files based on the test execution. These files are located in the same folder as the test suite (e.g. the file report.html for the test report). When the library is generated, these files are automatically packed within the library in order to log the performed test execution.

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg If you do not achieve a full test coverage for a library element and this full test coverage is not required due to corresponding reviews, it is possible to specify this exception within the library configuration – the keyword SiLCoverageReviewed must be used. Details: See under "Declaration of the contents of the library".

Good to know

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/lightbulb.svg logi.CAD 3 provides a tool for the automated SiL-test .