Defects

Defects

Defects or the way we implemented it is the one of the coolest things, and here is why.

Defect is an acknowledgement that a failed test is analysed, understood and is being processed. So, the users of the system can focus on analysis of the problems - if there is a defect linked to a failed test, this test becomes Resolved so only tests without resolution need to be analysed and processed by your team.

Let’s find out how this is managed in Allure TestOps.

Launches

Work with Defects starts in the Launches section in a specific Launch that you’ve created.

if you see this write to support.qameta.io

Quick failures analysis

In a Launch you can quickly check the following:

  1. Allure ID of a test with problems.
  2. Affected feature.
  3. Affected package and class.

Analysis of a failing test

In Unresolved test results click a failing test to drop deeper into the analysis.

You can also manually locate the failing test.

Generally, the analysis goes as follows.

  1. Jump to Launches.
  2. Jump to the test results tree.
  3. Select test result with a failure in the test results tree.
  4. Check the error message from your test.
  5. Check the full trace if needed.
  6. Check the steps of the test if you implemented steps in your tests.
  7. After the root cause is clear for you, you can Link defect.

if you see this write to support.qameta.io

Creating a defect

Creation of a defect goes as follows:

  1. Name a defect.
    • create a name which will ensure everyone in your team understands what is the problem linked to the defect.

if you see this write to support.qameta.io

  1. Click Create automation rule.

if you see this write to support.qameta.io

  1. Decide what is the marker that 100% defines the error and create the automation rule using regexp.
    1. either in message or in full trace.
    2. Name the automation rule ensuring everyone will understand what is the marker you are using to create automation rule.
    3. Create regexp.
    4. Click View matching results

if you see this write to support.qameta.io

  1. Check if your regexp is working, i.e. if you see any test results in the modal dialogue, then it is working for you.
    1. Click Back to form to finalise the creation of the defect - finally click on Link defect button.

if you see this write to support.qameta.io

  1. In your test result you will see that there is defect linked to this test result.

if you see this write to support.qameta.io

Back to the Launches

Now, if you jump to the launches section you will see the following.

For the defect you’ve just created, Allure will show Defects: +1 for the launch you’ve been analysing.

if you see this write to support.qameta.io

Inside the launch you’ve been analysing, you will see that there is no more unresolved issues.

if you see this write to support.qameta.io

You can close the launch.

Defects’ lifecycle

There are two states of a defect - Open or Closed.

Open means that an error, bug or an event (Selenium cluster is down is not a bug in your software or in your test but an unfortunate event on your infrastructure) still persists..

Closed means that an issue linked to a defect is resolved. If a defect is closed then the automation rule won’t be processed and all failed tests with the same error message or trace will be considered as Unresolved again. So you need either to reopen the existing defect or create a new one.

Automatic update of the defect’s status

You can link your defect to an issue in your favourite issue tracker and the lifecycle of the defect will be updated accordingly to the status of the linked issue.

Linking can be done when you create a defect or in the Defects section of your project by selecting a defect and clicking Defect actions button.

if you see this write to support.qameta.io

  1. Go to Defects.
  2. Select a Defect you want to manage.
  3. You can see the list of Launches where this defect appears.
  4. Click Defects actions button.
  5. Select Create issue or Link issue.

Creating new issue from Allure TestOps

You need to have an Issue tracker integrated with Allure TestOps to be able to perform these actions.

Select one of your configured issue trackers with enabled issue creation option.

if you see this write to support.qameta.io

Fill all the needed fields suggested by Allure TestOps and then click Submit.

if you see this write to support.qameta.io

Issue will be created on an issue tracker side and link will be added to the defect. The status of the defect will be synced with the resolution status of the issue from an issue tracker.

if you see this write to support.qameta.io

Linking existing issue to a defect

You need to have at least one Issue tracker integrated with Allure TestOps to be able to perform these actions.

When linking an existing issue you need to specify the issue tracker you are going to use and select an issue from the list of available issues.

if you see this text, report to support.qameta.io

After the defect is successfully linked to an issue, its lifecycle will be managed as per the status of the issue you’ve just linked to the defect.

if you see this text, report to support.qameta.io