BAEL-4658: Upgrade to Cucumber 6.8.0 (#10121)
This commit is contained in:
parent
d3744f7694
commit
67e2165bb6
@ -21,27 +21,27 @@
|
|||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>info.cukes</groupId>
|
<groupId>io.cucumber</groupId>
|
||||||
<artifactId>cucumber-core</artifactId>
|
<artifactId>cucumber-core</artifactId>
|
||||||
<version>${cucumber.java.version}</version>
|
<version>${cucumber.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>info.cukes</groupId>
|
<groupId>io.cucumber</groupId>
|
||||||
<artifactId>cucumber-java</artifactId>
|
<artifactId>cucumber-java</artifactId>
|
||||||
<version>${cucumber.java.version}</version>
|
<version>${cucumber.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>info.cukes</groupId>
|
<groupId>io.cucumber</groupId>
|
||||||
<artifactId>cucumber-junit</artifactId>
|
<artifactId>cucumber-junit</artifactId>
|
||||||
<version>${cucumber.java.version}</version>
|
<version>${cucumber.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>info.cukes</groupId>
|
<groupId>io.cucumber</groupId>
|
||||||
<artifactId>cucumber-spring</artifactId>
|
<artifactId>cucumber-spring</artifactId>
|
||||||
<version>${cucumber.java.version}</version>
|
<version>${cucumber.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-io -->
|
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-io -->
|
||||||
@ -53,7 +53,7 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<cucumber.java.version>1.2.5</cucumber.java.version>
|
<cucumber.version>6.8.0</cucumber.version>
|
||||||
<commons-io.version>1.3.2</commons-io.version>
|
<commons-io.version>1.3.2</commons-io.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
@ -4,18 +4,16 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
public class BaeldungController {
|
public class BaeldungController {
|
||||||
|
|
||||||
@GetMapping("/hello")
|
@GetMapping("/hello")
|
||||||
public String sayHello(HttpServletResponse response) {
|
public String sayHello() {
|
||||||
return "hello";
|
return "hello";
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/baeldung")
|
@PostMapping("/baeldung")
|
||||||
public String sayHelloPost(HttpServletResponse response) {
|
public String sayHelloPost() {
|
||||||
return "hello";
|
return "hello";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
package com.baeldung;
|
package com.baeldung;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
public class VersionController {
|
public class VersionController {
|
||||||
|
|
||||||
@RequestMapping(method = { RequestMethod.GET }, value = { "/version" })
|
@GetMapping("/version")
|
||||||
public String getVersion() {
|
public String getVersion() {
|
||||||
return "1.0";
|
return "1.0";
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package com.baeldung;
|
package com.baeldung;
|
||||||
|
|
||||||
|
import io.cucumber.junit.Cucumber;
|
||||||
|
import io.cucumber.junit.CucumberOptions;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
|
|
||||||
import cucumber.api.CucumberOptions;
|
|
||||||
import cucumber.api.junit.Cucumber;
|
|
||||||
|
|
||||||
@RunWith(Cucumber.class)
|
@RunWith(Cucumber.class)
|
||||||
@CucumberOptions(features = "src/test/resources")
|
@CucumberOptions(features = "src/test/resources")
|
||||||
|
@ -4,6 +4,7 @@ import java.io.IOException;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import io.cucumber.spring.CucumberContextConfiguration;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||||
@ -13,9 +14,8 @@ import org.springframework.test.context.ContextConfiguration;
|
|||||||
import org.springframework.web.client.ResponseErrorHandler;
|
import org.springframework.web.client.ResponseErrorHandler;
|
||||||
import org.springframework.web.client.RestTemplate;
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
//@RunWith(SpringJUnit4ClassRunner.class)
|
@CucumberContextConfiguration
|
||||||
@SpringBootTest(classes = SpringDemoApplication.class, webEnvironment = WebEnvironment.DEFINED_PORT)
|
@SpringBootTest(classes = SpringDemoApplication.class, webEnvironment = WebEnvironment.DEFINED_PORT)
|
||||||
@ContextConfiguration
|
|
||||||
public class SpringIntegrationTest {
|
public class SpringIntegrationTest {
|
||||||
static ResponseResults latestResponse = null;
|
static ResponseResults latestResponse = null;
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
package com.baeldung;
|
package com.baeldung;
|
||||||
|
|
||||||
|
import io.cucumber.java.en.And;
|
||||||
|
import io.cucumber.java.en.Given;
|
||||||
|
import io.cucumber.java.en.Then;
|
||||||
|
import io.cucumber.java.en.When;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
|
||||||
import static org.hamcrest.MatcherAssert.assertThat;
|
import static org.hamcrest.MatcherAssert.assertThat;
|
||||||
import static org.hamcrest.Matchers.is;
|
import static org.hamcrest.Matchers.is;
|
||||||
|
|
||||||
import cucumber.api.java.en.Given;
|
|
||||||
import org.springframework.http.HttpStatus;
|
|
||||||
|
|
||||||
import cucumber.api.java.en.And;
|
|
||||||
import cucumber.api.java.en.Then;
|
|
||||||
import cucumber.api.java.en.When;
|
|
||||||
|
|
||||||
public class StepDefsIntegrationTest extends SpringIntegrationTest {
|
public class StepDefsIntegrationTest extends SpringIntegrationTest {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user