-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Description
A common use case for @ExtendWith(OutputCaptureExtension.class) is to wait for some text to appear in logs, signifying that something happened in the app under test, but not accessible to direct monitoring via an API. It would be useful to have methods or utilities that directly knew about how to do this as quickly as possible, e.g.
@Test
public void contextLoads(CapturedOutput output) throws Exception {
output.waitFor("bar", Duration.ofSeconds(10));
assertThat(output.getErr()).doesNotContain("foo");
}Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement