Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into package-annotations
  • Loading branch information
TikhomirovSergey authored and s.tikhomirov committed Jan 23, 2025
2 parents ea39035 + 5dc185e commit 9f4b498
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion allure-grpc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "Allure gRPC Integration"
val agent: Configuration by configurations.creating

val grpcVersion = "1.57.2"
val protobufVersion = "4.27.2"
val protobufVersion = "4.27.3"

dependencies {
agent("org.aspectj:aspectjweaver")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ public boolean beforeStep(final Step step,
return true;
}

if (step.getText().startsWith("call") || step.getText().startsWith("callonce")) {
return true;
}

final String uuid = parentUuid + "-" + step.getIndex();
final io.qameta.allure.model.StepResult stepResult = new io.qameta.allure.model.StepResult()
.setName(step.getText());
Expand All @@ -191,6 +195,10 @@ public void afterStep(final StepResult result,
}

final Step step = result.getStep();
if (step.getText().startsWith("call") || step.getText().startsWith("callonce")) {
return;
}

final String uuid = parentUuid + "-" + step.getIndex();

final Result stepResult = result.getResult();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,16 @@ void shouldCreateAttachments() {
.isGreaterThan(Long.parseLong(firstAttachmentDateCreated));
}

@Test
void shouldSkipCallAndCallOnceStepsInBeforeStep() {
final AllureResults results = runApi("classpath:testdata/call-callonce.feature");

assertThat(results.getTestResults())
.flatExtracting(TestResult::getSteps)
.extracting(StepResult::getName)
.doesNotContain("call", "callonce");
}

@Test
void buildTest() {
Runner.builder()
Expand Down
13 changes: 13 additions & 0 deletions allure-karate/src/test/resources/testdata/call-callonce.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Feature: Call & Call once Feature
This feature calls another feature and demonstrates Allure reporting issue.

@smoke
Scenario: Main Scenario with a call
Given url 'https://jsonplaceholder.typicode.com'
When method GET
Then status 200

* call read('classpath:testdata/apiResponse.feature')
* callonce read('classpath:testdata/api.feature')

Then print 'Main scenario completed.'

0 comments on commit 9f4b498

Please sign in to comment.