Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Rerun formatter doesn't work (can't find class) #495

ShardPhoenix opened this Issue Apr 2, 2013 · 2 comments


None yet
3 participants

I would like to use the rerun formatter so that I can see failed tests on the command line (I believe this is what it does - if not, how do I see a list of failed test names/lines on the command line output as I did with cuke4duke?) However, when I try to use it I get the following error:

[java] Exception in thread "main" cucumber.runtime.CucumberException: Couldn't load formatter class: rerun
     [java]     at cucumber.runtime.formatter.FormatterFactory.loadClass(FormatterFactory.java:145)
     [java]     at cucumber.runtime.formatter.FormatterFactory.formatterClass(FormatterFactory.java:136)
     [java]     at cucumber.runtime.formatter.FormatterFactory.create(FormatterFactory.java:63)
     [java]     at cucumber.runtime.RuntimeOptions.parse(RuntimeOptions.java:90)
     [java]     at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:44)
     [java]     at cucumber.api.cli.Main.run(Main.java:16)
     [java]     at cucumber.api.cli.Main.main(Main.java:12)
     [java] Caused by: java.lang.ClassNotFoundException: rerun
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
     [java]     at cucumber.runtime.formatter.FormatterFactory.loadClass(FormatterFactory.java:143)
     [java]     ... 6 more

I'm using ant like follows (irrelevant lines removed):

<java classname="cucumber.api.cli.Main" fork="true" failonerror="false" resultproperty="cucumber.exitstatus">
                    <classpath refid="classpath"/>
                        <arg value="--strict"/>
                        <arg value="--format"/>
                        <arg value="junit:cucumber-junit-report/allcukes.xml"/>
                        <arg value="--format"/>
                        <arg value="pretty"/>

I have the 1.1.3 jars of cucumber-core, cucumber-java and cucumber-junit on my classpath.


aslakhellesoy commented Apr 2, 2013

Cucumber-JVM doesn't have a rerun formatter yet. Want to help us implement it?


ggili commented May 19, 2013

Please find the pull request for this feature #524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment