java - JBehave doesn't seem to execute the tests -


so it's first time jbehave , i'm trying create first jbehave in project appears test doesn't execute steps. in end test says test cases went through without problems in fact not executed @ all. set break points in every step method , debugger doesn't stop me @ not mention exceptions these steps throw.

this scenario:

narrative: in order user start using application, first needs register , log in  scenario: successful registration     given user email 'test@test.com'     when user specifies password 'aaaaaa'     user should registered email 'test@test.com' , hashed password 'aaaaaa' 

the steps:

public class userregistrationsteps extends steps {      @given("a user email '$email'")     public void addnewuser(@named("email") string email) {         user u = new user();         u.setemail(email);         throw new runtimeexception("test");     }      @when("the user specifies password '$password'")     public void setpassword(@named("password") string password) {         system.out.println("test");         throw new runtimeexception("test");     }      @then("the user should registered email '$email' , hashed password '$password'")     public void verifysuccessfulregistration(@named("email") string email, @named("password") string password) {         system.out.println("test");         throw new runtimeexception("test");     } } 

and test executor:

public class userregistrationtest extends junitstories {      public userregistrationtest() {         super();         this.configuredembedder().candidatesteps().add(new userregistrationsteps());     }      @override     protected list<string> storypaths() {         return arrays.aslist("bdd/users/user_registration.story");     } } 

any idea wrong it?

i'm not sure if simple formatting issue in stackoverflow, can see, indented steps in story file 4 whitespaces. think jbehave not find steps way.

so, .story file should this:

narrative: in order user start using application, first needs register , log in  scenario: successful registration given user email 'test@test.com' when user specifies password 'aaaaaa' user should registered email 'test@test.com' , hashed password 'aaaaaa' 

Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -