-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
type: bugA general bugA general bug
Milestone
Description
Section 9.12.3 of the documentation describes that a test can be started with Live Server.
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class MockMvcGraphQlTests {
@Autowired
private WebGraphQlTester graphQlTester;
}But the autoconfiguration of WebGraphQlTesterAutoConfiguration is then not active and no WebGraphQlTester is created. I get the error message that the WebGraphQlTester bean cannot be found. That only works if the annotation @AutoConfigureWebGraphQlTester is set.
It would be nice if this worked like it did with REST.
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class MockMvcRestTests {
@Autowired
private TestRestTemplate testRestTemplate;
}I don't understand why the @Autoconfiguration .. has to be added there.
However, the documentation may not be correct like this?
Metadata
Metadata
Assignees
Labels
type: bugA general bugA general bug