I am searching for the best approach to write negative tests using Serenity 
BDD and JBehave.

I have published the same topic 
<https://groups.google.com/forum/#!topic/thucydides-users/7MEOni_aHNc> in 
Serenity BDD google groups - but I then realized that this might be the 
proper place.

My current idea is to implement something similar to the JUnit 
ExpectedException rule 
<http://junit.org/javadoc/latest/org/junit/rules/ExpectedException.html>.

For example:

Given the next step should throw com.nokia.cb.nfvo.mistral.client.exception.
MistralHttpException while message contains ActionExecution not found
Then I update the Action Execution Id 12345 with state ERROR


I think I am missing an afterStep hook that is invoked on the Given / When 
/ Then steps.
For example, afterStep(null) will be invoked if no exception was thrown or 
afterStep(e) 
if an exception was thrown.

-- 
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 jbehave-user+unsubscr...@googlegroups.com.
To post to this group, send an email to jbehave-user@googlegroups.com.
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/jbehave-user/6ffa51b5-ddfa-4d2f-8537-d9991c75d79c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to