Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9f4b498

Browse filesBrowse 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
Copy full SHA for 9f4b498

File tree

Expand file treeCollapse file tree

4 files changed

+32
-1
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+32
-1
lines changed

‎allure-grpc/build.gradle.kts

Copy file name to clipboardExpand all lines: allure-grpc/build.gradle.kts
+1-1Lines 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

Copy file name to clipboardExpand all lines: allure-karate/src/main/java/io/qameta/allure/karate/AllureKarate.java
+8Lines 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

Copy file name to clipboardExpand all lines: allure-karate/src/test/java/io/qameta/allure/karate/AllureKarateTest.java
+10Lines 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()
+13Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.