Skip to content

Commit ab8964b

Browse files
committed
doc: add a warning about @EnableAutoConfiguration
1 parent df8d831 commit ab8964b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ public void testSomethingThatRequiresMyTestProcess() {
121121
}
122122
```
123123

124+
> **Warning**
125+
> Make sure to enable AutoConfiguration in your Spring test context (e.g. by making sure you have `@EnableAutoConfiguration` declared).
126+
124127
There are a couple of ways to reference a `TestProcessDefinition`. Referencing it by its class will have TestProcesses look into the Spring Test Context to find a bean of that type (that's why we added `@Component` on `MyTestProcess` above).
125128

126129
It is also possible to use the Spring bean name (note that when using `@Component`, Spring uses the lowercased classname as bean name, which is what we use here):
@@ -183,6 +186,7 @@ The `TestProcessesRegistry` has methods for starting and stopping test processes
183186
import static io.github.netmikey.testprocesses.TestProcessDefinitionBy.*;
184187

185188
@SpringBootTest
189+
@EnableAutoConfiguration
186190
public class MyTest {
187191

188192
@Autowired

0 commit comments

Comments
 (0)