Testing
To ensure reliability and stability of Safety Analysis a variety of tests are performed. We are using JUnit, Pi-test and other Java extensons connected with tests.
During execution of all tests bugs and issues are found. Analysis of tests results is available here.
Acceptance tests
Unit tests
Command Line Use Case Tests Specification
This page contains documentation for CLI Use Case Tests in order of appearance in code.
Test | Parser test - unrecognized argument |
---|---|
Description | This test checks GNU Parser for use of unrecognized argument. |
Conditions | Argument must be one of given in tables above. |
Test procedure |
|
Expected results | Output string: "Encountered exception while parsing using GnuParser:\nUnrecognized option: -l" |
Test | Analyze Fault Tree - no tree loaded |
Description | This test checks correctness of Fault Tree Analysis. |
Conditions | No tree loaded. |
Test procedure |
|
Expected results | Output string: "There is no tree that I could analyze." |
Test | Check the Cohesion of Event Tree - no tree loaded |
Description | This test checks cohesion of Event Tree. |
Conditions | No tree loaded. |
Test procedure |
|
Expected results | Output string: "There is no tree that I could analyze." |
Test | Get Fuzzy Importance Index of Fault Tree - no tree loaded |
Description | This test gets fuzzy importance index of fault tree. |
Conditions | No tree loaded. |
Test procedure |
|
Expected results | Output string: "There is no tree that I could analyze." |
Test | Load Event Tree - wrong tree |
Description | This test checks Event Tree loading from file. |
Conditions | - |
Test procedure |
|
Expected results | Output string: "\nRead Event Tree file from: wrong.xml Fail" |
Test | Load Fault Tree - wrong tree |
Description | This test checks Fault Tree loading from file. |
Conditions | - |
Test procedure |
|
Expected results | Output string: "\nRead Fault Tree file from: wrong.xml Fail" |
Test | Load Event Tree - correct tree |
Description | This test checks Event Tree loading from file. |
Conditions | - |
Test procedure |
|
Expected results | Output string: "\nRead Event Tree file from: treeXmltest2.xml Success" |
Test | Check Cohesion of Event Tree |
Description | This test checks cohesion of Event Tree. |
Conditions | Sucesfully load Event Tree from file. |
Test procedure |
|
Expected results | Output string: "\nRead Event Tree file from: treeXmltest2.xml Success\n"Result of the analysis Events Tree: \nEvents tree is ok" |
Test | Check Report generation |
Description | This test checks report generation. |
Conditions | - |
Test procedure |
|
Expected results | Output string: "\nCreated file: Report.odt" |
Test | Load Fault Tree - correct tree |
Description | This test checks Fault Tree loading from file. |
Conditions | - |
Test procedure |
|
Expected results | Output string: "\nRead Fault Tree file from: exampleFaultTree.xml Success" |
Test | Get Fuzzy Importance Index of Fault Tree |
Description | This test gets fuzzy importance index of fault tree. |
Conditions | Sucesfully loaded Fault Tree. |
Test procedure |
|
Expected results | Output string: "\nRead Fault Tree file from: exampleFaultTree.xml Success\nResult of the analysis Fault Tree: \nKey: root = Value: " |