-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/consider_rest_assured_blackliste…
…d_headers' into consider_rest_assured_blacklisted_headers
- Loading branch information
Showing
20 changed files
with
1,859 additions
and
988 deletions.
There are no files selected for viewing
466 changes: 271 additions & 195 deletions
466
allure-cucumber4-jvm/src/main/java/io/qameta/allure/cucumber4jvm/AllureCucumber4Jvm.java
Large diffs are not rendered by default.
Oops, something went wrong.
233 changes: 151 additions & 82 deletions
233
allure-cucumber4-jvm/src/test/java/io/qameta/allure/cucumber4jvm/AllureCucumber4JvmTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
83 changes: 83 additions & 0 deletions
83
...re-cucumber4-jvm/src/test/java/io/qameta/allure/cucumber4jvm/samples/RuntimeApiSteps.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
* Copyright 2016-2024 Qameta Software Inc | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.qameta.allure.cucumber4jvm.samples; | ||
|
||
import io.cucumber.java.Before; | ||
import io.cucumber.java.en.And; | ||
import io.cucumber.java.en.Then; | ||
import io.cucumber.java.en.When; | ||
import io.qameta.allure.Allure; | ||
|
||
/** | ||
* @author charlie (Dmitry Baev). | ||
*/ | ||
public class RuntimeApiSteps { | ||
|
||
@Before("@beforeScenario") | ||
public void beforeScenario(){ | ||
// nothing | ||
} | ||
|
||
@Before("@beforeFeature") | ||
public void beforeFeature(){ | ||
// nothing | ||
} | ||
|
||
@When("^step 1$") | ||
public void step1() { | ||
Allure.step("step1 nested"); | ||
Allure.link("step1", "https://example.org/step1"); | ||
Allure.getLifecycle().getCurrentTestCase().ifPresent(uuid -> { | ||
System.out.println("step1: " + uuid); | ||
}); | ||
} | ||
|
||
@When("^step 2$") | ||
public void step2() { | ||
Allure.step("step2 nested"); | ||
Allure.link("step2", "https://example.org/step2"); | ||
Allure.getLifecycle().getCurrentTestCase().ifPresent(uuid -> { | ||
System.out.println("step2: " + uuid); | ||
}); | ||
} | ||
|
||
@And("^step 3$") | ||
public void step3() { | ||
Allure.step("step3 nested"); | ||
Allure.link("step3", "https://example.org/step3"); | ||
Allure.getLifecycle().getCurrentTestCase().ifPresent(uuid -> { | ||
System.out.println("step3: " + uuid); | ||
}); | ||
} | ||
|
||
@Then("^step 4$") | ||
public void step4() { | ||
Allure.step("step4 nested"); | ||
Allure.link("step4", "https://example.org/step4"); | ||
Allure.getLifecycle().getCurrentTestCase().ifPresent(uuid -> { | ||
System.out.println("step4: " + uuid); | ||
}); | ||
} | ||
|
||
@And("^step 5$") | ||
public void step5() { | ||
Allure.step("step5 nested"); | ||
Allure.link("step5", "https://example.org/step5"); | ||
Allure.getLifecycle().getCurrentTestCase().ifPresent(uuid -> { | ||
System.out.println("step5: " + uuid); | ||
}); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
allure-cucumber4-jvm/src/test/resources/features/runtimeapi.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@beforeFeature | ||
Feature: Should support runtime API in all steps | ||
|
||
@beforeScenario | ||
Scenario: Scenario with Runtime API usage | ||
When step 1 | ||
When step 2 | ||
And step 3 | ||
Then step 4 | ||
And step 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.