-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#1 Update pom.xml + several dependencies: Cucumber, Spring, ...
-> Updating several dependencies... -> New Annotation needed to use Cucumber + Spring: --> See CucumberSpringConfiguration.class for the configuration --> Add the testconfiguration-folder to the glue list (in TestRunnerTestNG.class) -> New Configuration: Use UTF-8 for Source Encoding
- Loading branch information
Showing
4 changed files
with
44 additions
and
19 deletions.
There are no files selected for viewing
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
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
23 changes: 23 additions & 0 deletions
23
src/test/java/testconfiguration/CucumberSpringConfiguration.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,23 @@ | ||
package testconfiguration; | ||
|
||
import io.cucumber.java.Before; | ||
import io.cucumber.spring.CucumberContextConfiguration; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
|
||
/** | ||
* Class to configure Cucumber to use SpringBoot to manage the application context. | ||
* | ||
* @author helk | ||
* | ||
*/ | ||
@CucumberContextConfiguration | ||
@SpringBootTest(classes = TestConfiguration.class) | ||
public class CucumberSpringConfiguration { | ||
|
||
@Before | ||
public void setupCucumberSpringContext(){ | ||
// Dummy method so cucumber will recognize this class as glue | ||
// and use its context configuration. | ||
} | ||
|
||
} |
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