Skip to content

Commit 9f4b498

Browse files
TikhomirovSergeys.tikhomirov
authored and
s.tikhomirov
committed
Merge branch 'main' of https://github.com/allure-framework/allure-java into package-annotations
2 parents ea39035 + 5dc185e commit 9f4b498

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

allure-grpc/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ description = "Allure gRPC Integration"
99
val agent: Configuration by configurations.creating
1010

1111
val grpcVersion = "1.57.2"
12-
val protobufVersion = "4.27.2"
12+
val protobufVersion = "4.27.3"
1313

1414
dependencies {
1515
agent("org.aspectj:aspectjweaver")

allure-karate/src/main/java/io/qameta/allure/karate/AllureKarate.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ public boolean beforeStep(final Step step,
173173
return true;
174174
}
175175

176+
if (step.getText().startsWith("call") || step.getText().startsWith("callonce")) {
177+
return true;
178+
}
179+
176180
final String uuid = parentUuid + "-" + step.getIndex();
177181
final io.qameta.allure.model.StepResult stepResult = new io.qameta.allure.model.StepResult()
178182
.setName(step.getText());
@@ -191,6 +195,10 @@ public void afterStep(final StepResult result,
191195
}
192196

193197
final Step step = result.getStep();
198+
if (step.getText().startsWith("call") || step.getText().startsWith("callonce")) {
199+
return;
200+
}
201+
194202
final String uuid = parentUuid + "-" + step.getIndex();
195203

196204
final Result stepResult = result.getResult();

allure-karate/src/test/java/io/qameta/allure/karate/AllureKarateTest.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,16 @@ void shouldCreateAttachments() {
322322
.isGreaterThan(Long.parseLong(firstAttachmentDateCreated));
323323
}
324324

325+
@Test
326+
void shouldSkipCallAndCallOnceStepsInBeforeStep() {
327+
final AllureResults results = runApi("classpath:testdata/call-callonce.feature");
328+
329+
assertThat(results.getTestResults())
330+
.flatExtracting(TestResult::getSteps)
331+
.extracting(StepResult::getName)
332+
.doesNotContain("call", "callonce");
333+
}
334+
325335
@Test
326336
void buildTest() {
327337
Runner.builder()
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Feature: Call & Call once Feature
2+
This feature calls another feature and demonstrates Allure reporting issue.
3+
4+
@smoke
5+
Scenario: Main Scenario with a call
6+
Given url 'https://jsonplaceholder.typicode.com'
7+
When method GET
8+
Then status 200
9+
10+
* call read('classpath:testdata/apiResponse.feature')
11+
* callonce read('classpath:testdata/api.feature')
12+
13+
Then print 'Main scenario completed.'

0 commit comments

Comments
 (0)