Package dev.aherscu.qa.testrail.reporter
Class TestRailReportModel
- java.lang.Object
-
- dev.aherscu.qa.jgiven.reporter.QaJGivenReportModel<com.tngtech.jgiven.report.model.ScenarioModel>
-
- dev.aherscu.qa.testrail.reporter.TestRailReportModel
-
public class TestRailReportModel extends dev.aherscu.qa.jgiven.reporter.QaJGivenReportModel<com.tngtech.jgiven.report.model.ScenarioModel>
Adds screenshot manipulation functionality.- See Also:
saveScreenshot
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TestRailReportModel.TestRailReportModelBuilder<C extends TestRailReportModel,B extends TestRailReportModel.TestRailReportModelBuilder<C,B>>
-
Nested classes/interfaces inherited from class dev.aherscu.qa.jgiven.reporter.QaJGivenReportModel
dev.aherscu.qa.jgiven.reporter.QaJGivenReportModel.QaJGivenReportModelBuilder<T extends Object,C extends dev.aherscu.qa.jgiven.reporter.QaJGivenReportModel<T>,B extends dev.aherscu.qa.jgiven.reporter.QaJGivenReportModel.QaJGivenReportModelBuilder<T,C,B>>
-
-
Field Summary
Fields Modifier and Type Field Description File
outputDirectory
com.samskivert.mustache.Mustache.Lambda
saveScreenshot
-
Fields inherited from class dev.aherscu.qa.jgiven.reporter.QaJGivenReportModel
asId, datePattern, deleteEOL, isStepFailed, isStepPassed, jgivenReport, nanoToMillis, planDocumentId, planDocumentRev, productName, productVersion, scaleImage, screenshotScale, shorten, simpleName, specDocumentId, specDocumentRev, targetReportFile, testDocumentId, testDocumentRev, traceabilityDocumentId, traceabilityDocumentRev, translateIntroWord
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TestRailReportModel(TestRailReportModel.TestRailReportModelBuilder<?,?> b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TestRailReportModel.TestRailReportModelBuilder<?,?>
builder()
void
saveScreenshot(com.samskivert.mustache.Template.Fragment frag, Writer out)
To be called from Mustache template for saving screenshots as separate PNG files, in a directory matching the name of the test report file.TestRailReportModel.TestRailReportModelBuilder<?,?>
toBuilder()
-
-
-
Field Detail
-
outputDirectory
public final File outputDirectory
-
saveScreenshot
public final com.samskivert.mustache.Mustache.Lambda saveScreenshot
-
-
Constructor Detail
-
TestRailReportModel
protected TestRailReportModel(TestRailReportModel.TestRailReportModelBuilder<?,?> b)
-
-
Method Detail
-
saveScreenshot
public void saveScreenshot(com.samskivert.mustache.Template.Fragment frag, Writer out)
To be called from Mustache template for saving screenshots as separate PNG files, in a directory matching the name of the test report file.These are later picked up by the
TestRailReporter
and attached to the test result in TestRail.- Parameters:
frag
- Mustache fragment to process, assumed to be a screenshot in Base64 PNG formatout
- Mustache output stream; will be written the screenshot file name (currently, a hex representation of its contents hash)
-
builder
public static TestRailReportModel.TestRailReportModelBuilder<?,?> builder()
-
toBuilder
public TestRailReportModel.TestRailReportModelBuilder<?,?> toBuilder()
- Overrides:
toBuilder
in classdev.aherscu.qa.jgiven.reporter.QaJGivenReportModel<com.tngtech.jgiven.report.model.ScenarioModel>
-
-