Package at.willhaben.willtest.util
Class TestReportFile
- java.lang.Object
-
- at.willhaben.willtest.util.TestReportFile
-
public class TestReportFile extends java.lang.ObjectDecides where are the report files saved. By default report files are saved into "surefire-reports", which can be overridden by "willtest.reportFolder" system property. File names will generated using the following schema:""TR_" + PREFIX_IF_ANY + CLASS_NAME + METHOD_NAME + TIMESTAMP + POSTFIX_IF_ANY
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTestReportFile.Builder
-
Constructor Summary
Constructors Constructor Description TestReportFile()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TestReportFile.BuilderforTest(org.junit.jupiter.api.extension.ExtensionContext context)static TestReportFile.BuilderforTest(org.junit.runner.Description testDescription)Starts building of a test report filejava.io.FilegetFile()Gives back theFileobject, which can be used as target for report.java.lang.StringgetGeneratedName()static java.lang.StringgetReportFolderDir()
-
-
-
Method Detail
-
forTest
public static TestReportFile.Builder forTest(org.junit.runner.Description testDescription)
Starts building of a test report file- Parameters:
testDescription-- Returns:
- this builder
-
forTest
public static TestReportFile.Builder forTest(org.junit.jupiter.api.extension.ExtensionContext context)
-
getFile
public java.io.File getFile()
Gives back theFileobject, which can be used as target for report.- Returns:
- the file which can be used as report file
-
getReportFolderDir
public static java.lang.String getReportFolderDir()
-
getGeneratedName
public java.lang.String getGeneratedName()
-
-