Skip to content

Test Case Weights

In our testing framework, each test case can be assigned a weight to indicate its relative importance within a test suite. By default, all test cases start with a weight of 1, but this value can be adjusted to reflect their significance in the context of your project.

Importance of Weights

Weights allow you to specify the importance of a test case. A higher weight means the test case has a larger impact on the overall results. The total weight of all test cases in a suite is normalized to 100%, allowing you to clearly see the proportionate importance of each case.

For example, if there are four test cases, and each has a default weight of 1, they each contribute equally to the suite, meaning each will have a 25% impact on the final test results.

How to Adjust Weights

To modify the weight of a test case:

  1. Navigate to the Test Suite Detail Page: Start by selecting the test suite that contains the test cases you want to modify.

  2. Locate the Weight Control: Each test case will display a weight in a rectangular box, labeled as W:1 by default. This box is interactive.

  3. Modify the Weight: Click on the weight box to access a control where you can increase or decrease the weight value. Adjust the weight according to the importance of the test case within the suite.

  4. Total Weights Display: The total weight of all test cases is displayed at the top of the table, allowing you to see the overall distribution of importance.

  5. Execution Results: The weighted execution results are reflected numerically, showing the impact each test case has based on its assigned weight.

Example

Consider a scenario where you have four test cases with weights distributed as follows:

  • Test Case 1: Weight = 6 (66.7%)
  • Test Case 2: Weight = 1 (11.1%)
  • Test Case 3: Weight = 1 (11.1%)
  • Test Case 4: Weight = 1 (11.1%)

In this example, Test Case 1 is significantly more important than the others, contributing two-thirds of the weight to the overall test suite results.

Conclusion

By effectively utilizing weights, you can prioritize test cases that are more critical, ensuring that they have a greater influence on the test suite's outcome. Adjusting weights is a straightforward process, yet it can greatly enhance the accuracy and relevance of your testing efforts