ErrorCollector in Jbehave story -


The error controller rule allows the execution of a test after the first problem (for example, all the wrong rows are collected To report in a table, and all of them at one time)

I try to use org.junit.rules.ErrorCollector with Jbehave story, but after execution, JBHOW says that "all tests passed" even if some failures and error collectors () Collected them Zabahave should say that some steps have failed.

In JUnit this is correct:

  Public static class UsesErrorCollectorTwice {@Rule Public error organizer collector = new errorman (;); @Test Public Zero Example () {string x = [..] collector.checkThat (x, no (string ("a")); Collector.checkThat (y, included string ("B")); }}  

But in jb heave:

  Scenario: Some looking at S-1  

... .

@ ("Check Some") Public Zero Check Login () {loginSteps.check_that (); }

......

import org.hamcrest.matchers; Import org.junit.rules.ErrorCollector; Import org.junit.Rule;

....

  @ rules public error collector collector = new error collector ();  

....

  @step public zero check_tit () {collector.checkThat ("error example", navigation menu panel.UISIRSISIN (), Mater's lies)); Collector.checkThat ("The user has not been logged in yet!", Navigation menu panel.IsUserSign Inin (), Matter (real)); Collector.address (new throb) ("shutdown error"); Collector.checkThat ("it'wrong", 1, Matchers.equalTo (3)); }  

This story has always been passed.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -