/
Failing to Reach 100% Coverage

Failing to Reach 100% Coverage

Here a checklist of actions that can be done to understand why 100% coverage has not been reached after test generation. A test target may not be covered because:

  1. The target is on a control flow path which follows or requires a condition to be fulfilled (in a decision node or an action pre-condition) that can never be fulfilled, e.g., because the value being compared to is not allowed or missing in the input action constraining that value, or simply mistyped in either input action constraint or condition.

  2. Test generation has been stopped by reaching the test generation time limit. If advanced test generation options such as “Enable Only Finalized Runs” or “Enable Data Distribution” are enabled, then it is likely that a higher time limit is required. Otherwise, users should always first review model complexity (in particular when it comes to combinatorial data coverage and data coming from external spreadsheets) before increasing the time limit.

  3. The default setting of the target has not been reviewed and is still “TARGET” even though model construction clearly prevents its coverage, e.g., a combinatorial data pair cannot be injected since an action-precondition does not allow that or the values to be paired are injected in parallel control flows. (see section Review Testing Target Settings before Analyzing Your Model)

  4. “Enable Only Finalized Runs” has been enabled and even though the target could be covered Conformiq is unable to “end the test” (e.g., a return or flow final node) because of model construction, e.g., a condition evaluates unexpectedly and prevents to reach an “end”.

  5. Another target, which happens before the current target in the control flow, has been set to “BLOCK” in Test Targets view, and prevents that the current test target is ever covered.

  6. Test generation has been stopped manually by the user.

  7. A control flow loop is unbounded or having an exit condition that can never be fulfilled.

 The general advice to simplify the narrowing down of the causes for lack of coverage is:

  1. Disable all advanced test generation options to simplify the analysis (see section Use Advanced Test Generation Concepts Only Once Functionality is Complete)

  2. Reduce or even combinatorial data and external spreadsheet data Note: Combinatorial data is not required in a model to reach full coverage of a model. (see section Use Advanced Test Generation Concepts Only Once Functionality is Complete)

  3. Isolate and generate tests from the sub diagrams have the coverage issues (see section

    Generate Tests Often and Keep 100% Coverage)

     

 

 

Related content

Review Testing Target Settings before Analyzing Your Model
Review Testing Target Settings before Analyzing Your Model
More like this
Use Advanced Test Generation Concepts Only Once Functionality is Complete
Use Advanced Test Generation Concepts Only Once Functionality is Complete
More like this
Limit Use of Combinatorial Data to Avoid Test Case Explosion
Limit Use of Combinatorial Data to Avoid Test Case Explosion
More like this
Save Time by (Manually) Stopping Test Generation
Save Time by (Manually) Stopping Test Generation
More like this
Avoid Overuse of State Variables
Avoid Overuse of State Variables
More like this
Computation Server Out of Memory
Computation Server Out of Memory
More like this

Copyright © 2023 Conformiq and its subsidiaries. All rights reserved.