Skip to content

Commit 15ecc52

Browse files
committed
fixes #139
1 parent 121fa60 commit 15ecc52

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/main/java/com/aventstack/extentreports/model/context/TestAttributeTestContext.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.aventstack.extentreports.Status;
88
import com.aventstack.extentreports.model.Attribute;
99
import com.aventstack.extentreports.model.Test;
10+
import com.aventstack.extentreports.model.context.filter.TestAttributeContextFilters;
1011

1112
public class TestAttributeTestContext<T extends Attribute> implements Serializable {
1213

@@ -29,6 +30,8 @@ public void setTest(Test test) {
2930
}
3031

3132
private void updateTestStatusCounts(Test test) {
33+
if (!TestAttributeContextFilters.testHasStatusIncrEligibility(test))
34+
return;
3235
if (test.getStatus() == Status.PASS) {
3336
passed++;
3437
} else if (test.getStatus() == Status.FAIL || test.getStatus() == Status.FATAL) {
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package com.aventstack.extentreports.model.context.filter;
2+
3+
import com.aventstack.extentreports.model.Test;
4+
5+
public class TestAttributeContextFilters {
6+
7+
public static boolean testHasStatusIncrEligibility(Test test) {
8+
return test.isBehaviorDrivenType() && test.getBehaviorDrivenTypeName().equalsIgnoreCase("feature") ? false
9+
: true;
10+
}
11+
12+
}

0 commit comments

Comments
 (0)