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 9240025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:07:03+00:00 2026-06-18T08:07:03+00:00

I am trying to run jbehave stories in a sequence. My package structure for

  • 0

I am trying to run jbehave stories in a sequence.

My package structure for Integration tests is shown below

src/it/some/package/name/packageA/a.story
src/it/some/package/name/packageB/b.story
src/it/some/package/name/c.story

I want the story to be run in this sequence a.story, b.story, c.story

I tried using GivenStories in jBehave but they didn’t seem to work (may be I am not specifying them correctly). I would very much appreciate it if someone could point to the creation of GivenStories text and also show some insight as to how jbehave creates the ordering when it runs the Integration tests because I see that running stories on my machine and on jenkins seems to be yielding different execution ordering.

Any help on this is greatly appreciated. Thanks!

  • 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-18T08:07:04+00:00Added an answer on June 18, 2026 at 8:07 am

    I actually figured out a work around on this issue which i thought was much convenient than GivenStories

    First i added a maven surefire configuration like this

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>${surefire.version}</version>
      <configuration>
        <includes>
           <include>**/*TesterSequence.java</include>
        </includes>
      </configuration>
    </plugin>
    

    The SampleTesterSequence would be structured like the one shown below

    import org.junit.AfterClass;
    import org.junit.BeforeClass;
    import org.junit.runner.RunWith;
    import org.junit.runners.Suite;
    
    
    
    @RunWith(Suite.class)
    @Suite.SuiteClasses({ A.class,B.class, 
            C.class })
    public class SampleTesterSequence {
        @BeforeClass
        public static void beforeStories() throws Exception {
           //TODO Implement before story steps
        }
    
        @AfterClass
        public static void afterStories() throws Exception {
          //TODO Implement after story steps
        }
    }
    

    As you can see the the suite will run the stories a,b,c in the sequence i mention with the suite, when surefire runs the tests it looks for a pattern ending with TesterSequence and will run that class first and from that class it executes the stories we want to run in that order specified.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to run Jison unit tests, but the command fails. How do I fix
Trying to run this script: <?php $src = ./tmp/image1.jpg; $dest = ./tmp/image1; $out =
Trying to run some sql in a pl/sql procedure. Select field from schema.view; I
Trying to run scrapy crawl command using crontab under virtual environment, and getting below
Trying to run Nunit tests parameterized with TestCase attribute. Something like this: [TestFixture] public
While trying to run a string through PHP's htmlentities function, I have some cases
When I'm trying run below code in Oracle 11g , @?/rdbms/admin/prvtmail.plb I got this
I'm trying run this procedure with generic parameters. If I can't delete because some
I am trying run below command psexec \\remotemachine -u username -p password notepad As
Trying to run the following: JS: $('#my-modal').modal(); markup: <img src=\Images\Browser\file_types\d8d74cae-2186-42ad-a932-3aa4b75e0f12.png title=name: a3 onclick=Attachment_onClick( bfa9ec7e-d781-4523-a4ee-dd587f699c18)=

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.