Squish Test Center is a lightweight web database which aggregates and analyzes test results generated from Squish GUI tests. This article will introduce three Test Center concepts — batches, reports and labels — to help you better investigate failures in your test outcomes.
Batch and Reports: What Are They?
Squish Test Center views a collection of one or more test results as a report. A batch is a group of one or more reports. Reports can be tagged with and grouped by labels. For example, if the test executions within a report share common factors like product version, operating system and compiler, then a useful set of labels might be:
version=2.5.2 OS=windows10 compiler=msvc17
The Test Center documentation explains these concepts in more depth. Armed with this conceptual knowledge, we can now dive into using labels to investigate failures in our test results.
Labels to the Rescue
To understand how helpful labels are, let’s first have a look at what happens when we don’t set any. The screenshot of Test Center’s Explore page, pictured below, shows a batch where we uploaded test results of two different runs of the same test suite.
One report indicates that the test suite execution encountered failures. Clicking on the failure icon brings us to the Verifications page, which tells the specific test case that failed and even from which line of the test script the failure originated.
The failure occurs in line 8 of the test script:
import subprocess def main(): command = "TASKLIST" try: subprocess.check_call([command], shell=True) except: test.fail(command + " returned non-zero value")
Finding out exactly what triggered the failure will require more investigation, as it is unclear based on the current information what the issue is.
Now let’s see if tagging the reports with labels provides more information. We’ll again have a look the batch’s Explore page with the same test results uploaded, but this time with labels.
A quick glance reveals that the error is occurring in a test execution tagged with the value “Linux” for the “OS” label. Since “TASKLIST” is a Windows command, the explanation for the failure is clear, and no additional investigation is needed.
Labels provide information on the context in which tests are run and can help find the root cause of an issue: