What is the correct set up for Spring Boot Testing using CucumberSerenity?
The rest end point is not accessible and returning null.
@ContextConfiguration(classes = AppConfig.class,
loader = SpringApplicationContextLoader.class)
public class UserSteps {
@Before
public void configurePorts() {
RestAssured.rootPath = "http://localhost";
RestAssured.port = 8080;
RestAssured.basePath = "/";
}
@Given("^a user$")
public void a_user() throws Throwable {
Response response = rest().given().get("/users"); //this returning null
}
}
@RunWith(CucumberWithSerenity.class)
@CucumberOptions(features="src/test/resources/features/users")
public class Users {
}