In the Test Execution View Page, each row of the table represents a Test being executed by this Test Execution.
One of the default columns is #Def which represents the number of defects created during execution of each Test.
Rule of counting
The rule for counting defects for each Test is to sum
- all defects created during execution plus
- all defects linked with issue link type "created"
- all defects linked with issue link type "tested by"
Each defect will only be count once.
Example 1 (defects linked with Test):
Test 1 is executed in Test Execution A and Test Execution B
We can see that there were 3 defects originated by Test Execution A (TWWB-6, TWWB-6 (Step #1), TWWB-7 (Step #2)) and 5 defects Test Execution B (TWWB-6, TWWB-8,TWWB-9 (Step #2), TWWB-7 (Step #1), TWWB-10 (Step #2)).
Now if we go to each of this Test Execution, we will see that each Test count 5 defects.
Example 2 (Defects not link to Test):
Test 2 is executed in Test Execution A and Test Execution B
We can see that there were 3 defects originated by the execution Test Execution A1 (TWWB-6, TWWB-6 (Step #1), TWWB-7 (Step #2)) and 5 defects from Test Execution B1 (TWWB-6, TWWB-8,TWWB-9 (Step #2), TWWB-7 (Step #1), TWWB-10 (Step #2)).
Now if we go to each of this Test Execution, we will see that each one Test has 3 and the other 5 defects.
Results explanation
The only differences between those two examples is that we removed the link creation between Test and Defect, so when Xray count the bugs from Test Execution A and Test Execution A1 the differences resides in the links Test 1 and Test 2 have to defects created on other Test Executions.