GithubHelp home page GithubHelp logo

concordionplus-junit4-spring-runner's Introduction

ConcordionPlusSpringJUnit4ClassRunner
=====================================

Implements and demonstrates the use of a junit runner that integrates
Concordion+ (http://www.agileinsider.org/concordion-plus/) and
Spring-Test (http://static.springsource.org/spring/docs/current/spring-framework-reference/html/testing.html#integration-testing)

The runner comes with following features:

1) integrates Concordion+ with Spring-Test

you can annotate test classes the same way as normal spring-test classes


2) apply standard junit annotations to scenarios

to apply annotations like Spring's @Timed or junit's own @Test(timeout=1000) you can use @ScenarioAnnotations to mark
a method where the runner should obtain those annotations from:

    @ScenarioAnnotations
    @Test(timeout = 1000)
    @Transactional
    public void apply_annotations_to_all_scenarios() {}

this allows to use any annotations understood by JUnit or Spring


3) improves failure output

the original Concordion and Concordion+ runners don't output any useful stacktraces or error information (e.g. which
element in the concordion specification triggered the error). This runner improves that and instead of just

java.lang.AssertionError: Specification has failure(s). See output HTML for details.
	at org.concordion.internal.FixtureState$3.assertIsSatisfied(FixtureState.java:60)

you get

org.junit.ComparisonFailure: Error in element
	<span concordion:assertEquals="execute()" class="failure fail"><del class="expected">unexpected</del>
<ins class="actual">dummyBean</ins></span>
Expected :unexpected
Actual   :dummyBean
 <Click to see difference>
	at org.oakinger.concordion.ConcordionPlusSpringJUnit4ClassRunner$ScenarioNotifier.failureReported(ConcordionPlusSpringJUnit4ClassRunner.java:416)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

4) Summary reporter

although there's a maven plugin http://bassman5.github.com/maven-concordion-reporting-plugin/ that generates
an index file of all individual concordion html reports, this plugin requires to run mvn:site.
"ConcordionSummaryReporter" can instead be used standalone, this project's pom demonstrates it's use with the ant plugin.


concordionplus-junit4-spring-runner's People

Contributors

eeichinger avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.