Skip to content

Commit 80f1fa9

Browse files
core: return noStep console capture (#1371)
1 parent e71db76 commit 80f1fa9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

webtau-core/src/main/java/org/testingisdocumenting/webtau/documentation/CoreDocumentationConsole.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,20 @@ public void capture(String textFileNameWithoutExtension, ConsoleOutputGenerating
4343
});
4444
}
4545

46+
/**
47+
* capture the output of a provided code into the file with provided artifact name without using WebTau step.
48+
* only one capture code will run at a time in multithreaded environment
49+
*
50+
* @param textFileNameWithoutExtension artifact name
51+
* @param codeToProduceOutput code to run and capture output
52+
*/
53+
public void captureNoStep(String textFileNameWithoutExtension, ConsoleOutputGeneratingCode codeToProduceOutput) {
54+
captureStep(textFileNameWithoutExtension, () -> {
55+
codeToProduceOutput.runAndGenerate();
56+
return null;
57+
});
58+
}
59+
4660
/**
4761
* capture the output of a provided code into the file with provided artifact name.
4862
* only one capture code will run at a time in multithreading environment

0 commit comments

Comments
 (0)