Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8409975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:03:35+00:00 2026-06-10T00:03:35+00:00

The scenario is this: We are using JBehave and Selenium for system, integration and

  • 0

The scenario is this:

We are using JBehave and Selenium for system, integration and end to end testing.
I am checking the results of a calculation on a page with in excess of 20 values to validate.
Using Junit Assert the entire test will fail on the first instance of one of the values being incorrect. What I wanted to do was that if an assertion failure is met then the test continues to execute so that I can then collate all of the values that are incorrect in one test run rather than multiple test runs.

To do this I capture the assertions and write out to a log file anything that fails the validation. This has left me with a couple of issues:

1) The log file where I write out the assertions failures do not contain the name of the JBehave Story or Scenario that was being run when the exception occurred.

2) The JBehave Story or Scenario is listed as having ‘Passed’ and I want it to be listed as ‘Failed’.

Is there any way that I can either log the name of the Story and Scenario out to the additional log file OR get the additional logging written to the JBehave log file?

How can I get the Story / Scenario marked as failed?

In the JBehave configuration I have:

configuredEmbedder()
    .embedderControls()
    .doIgnoreFailureInStories(true)
    .doIgnoreFailureInView(false)
    .doVerboseFailures(true)
    .useStoryTimeoutInSecs(appSet.getMaxRunningTime());

and

.useStoryReporterBuilder(
    new StoryReporterBuilder()
    .withDefaultFormats()
    .withViewResources(viewResources)
    .withFormats(Format.HTML, Format.CONSOLE)
    .withFailureTrace(true)
    .withFailureTraceCompression(true)
    .withRelativeDirectory("jbehave/" + appSet.getApplication())
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T00:03:36+00:00Added an answer on June 10, 2026 at 12:03 am

    Yes, you can create your own StoryReporter:

     public class MyStoryReporter implements org.jbehave.core.reporters.StoryReporter{
         private Log log = ...
    
         @Override
         public void successful(String step) {
            log.info(">>successStep:" + step);
         }
    
        @Override
        public void failed(String step, Throwable cause) {
            log.error(">>error:" + step + ", reason:" + cause);
        }
    
         ...
     }
    

    and register it like this:

    .useStoryReporterBuilder(
        new StoryReporterBuilder()
             .withReporters(new MyStoryReporter())
    ..
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider this scenario: Using Javascript/E4X, in a non-browser usage scenario (a Javascript HL7 integration
I'm trying to implement this scenario using Unity and i can't figure out how
I have this scenario where I would like to redirect my domains using the
Let's assume this scenario in Visual C++ 2010: #include <iostream> using namespace std; struct
Detailed scenario is like this : I am creating 10 buttons using a loop
Hey, This is my scenario: Using visual studio 2008. Project is in c# Using
I have a scenario that looks like this: #include <algorithm> using namespace std; //
How to load flex components using XML. The scenario is simple as like this,
Scenario 1 This involves using one gateway route in app.yaml and then choosing the
I found this answer using xp_cmdshell SQL Server Agent Job - Export results to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.