Hi
For my tests requirement to get current story data dynamically , I have
extended NullStoryReporter as MyStoryReporter , and used it in existing
JBehave Configuration .
My existing JBehave Configuration already had SerenityReporter , so I am
using both reporters simultaneously .
But now , even though my JBehave Test is failing, Serenity Report is
showing it as PASSED . *Please let me know how can I add custom reporter
to existing Serenity Reporter . *
Below is my Configuration :
public static Configuration
defaultConfiguration(net.thucydides.core.webdriver.Configuration
systemConfiguration,
List<Format> formats,
Embeddable embeddable)
{
Class<? extends Embeddable> embeddableClass = embeddable.getClass();
Properties viewResources = new Properties();
viewResources.put("decorateNonHtml", "true");
MyStoryReporterBuilder myStoryReportBuilder = new
MyStoryReporterBuilder();
------------------------------------------------------------> Initializing
MY Custom Reporter
TableTransformers tableTransformers = new TableTransformers();
UTF8StoryLoader utf8StoryLoader = new UTF8StoryLoader();
return new ParanamerConfiguration()
.useTableTransformers(tableTransformers)
.useParameterConverters(
new ParameterConverters(utf8StoryLoader,
tableTransformers).addConverters(
new ParameterConverters.DateConverter())
.useStoryReporterBuilder(myStoryReportBuilder)
-------------------------------------------------------------->
Initializing My Custom Reporter
.useStoryReporterBuilder(
new StoryReporterBuilder()
.withDefaultFormats()
.withFormats((Format[]) formats.toArray())
// .withCrossReference(xref)
.withCodeLocation(CodeLocations.codeLocationFromClass(embeddableClass))
.withViewResources(viewResources)
.withPathResolver(new
FilePrintStreamFactory.ResolveToPackagedName())
.withFailureTrace(true).withFailureTraceCompression(true)
//.withReporters(new
SerenityReporter(systemConfiguration)))
.withReporters(new
SerenityReporter(systemConfiguration),myStoryReportBuilder.getMyStoryReporter()))
---------------------------> Using Two Reporters Here
.useStoryLoader(utf8StoryLoader)
.useFailureStrategy(new IgnoreAssumptionViolations());
--
You received this message because you are subscribed to the Google Groups
"JBehave User" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send an email to [email protected].
To view this discussion on the web, visit
https://groups.google.com/d/msgid/jbehave-user/2ca3e653-070c-44de-9e40-9357c5f37a6e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.