Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTMLFormatter Constructor arguments invalid in RC21 #269

Closed
hutchy2570 opened this issue Mar 20, 2012 · 6 comments
Closed

HTMLFormatter Constructor arguments invalid in RC21 #269

hutchy2570 opened this issue Mar 20, 2012 · 6 comments

Comments

@hutchy2570
Copy link
Contributor

I try and run our suite of tests which use the HTMLFormatter output and the following exception is thrown.

Exception in thread "main" cucumber.runtime.CucumberException: class cucumber.formatter.HTMLFormatter must have a single-argument constructor that takes one of the following: [interface java.lang.Appendable, class java.io.File]
        at cucumber.formatter.FormatterConverter.instantiate(FormatterConverter.java:75)
        at cucumber.formatter.FormatterConverter.convert(FormatterConverter.java:49)
        at cucumber.formatter.FormatterConverter.convert(FormatterConverter.java:21)
        at com.beust.jcommander.JCommander.convertToList(JCommander.java:1183)
        at com.beust.jcommander.JCommander.convertValue(JCommander.java:1156)
        at com.beust.jcommander.JCommander.convertValue(JCommander.java:1078)
        at com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:233)
        at com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:200)
        at com.beust.jcommander.JCommander.processFixedArity(JCommander.java:740)
        at com.beust.jcommander.JCommander.parseValues(JCommander.java:622)
        at com.beust.jcommander.JCommander.parse(JCommander.java:274)
        at com.beust.jcommander.JCommander.parse(JCommander.java:257)
        at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:49)
        at cucumber.cli.Main.run(Main.java:18)
        at cucumber.cli.Main.main(Main.java:14)

We run from the maven exec plugin with the following config:

<plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2.1</version>
            <executions>
              <execution>
                <phase>integration-test</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>java</executable>
                  <arguments>
                    <argument>-Denv=${env}</argument>
                    <argument>-classpath</argument>
                    <classpath />
                    <argument>cucumber.cli.Main</argument>
                    <argument>${project.basedir}/target/classes/features/released</argument>
                    <argument>--glue</argument>
                    <argument>com.project.test.acceptance</argument>
                    <argument>--format</argument>
                    <argument>pretty</argument>
                    <argument>--format</argument>
                    <argument>html</argument>
                    <argument>--out</argument>
                    <argument>${project.basedir}/target</argument>
                    <argument>--tags</argument>
                    <argument>~@wip</argument>
                    <argument>--tags</argument>
                    <argument>~@broken</argument>
                    <argument>--tags</argument>
                    <argument>~@broken-${env}</argument>
                    <argument>--tags</argument>
                    <argument>~@ignore</argument>
                    <argument>--tags</argument>
                    <argument>~@deferred</argument>
                    <argument>--tags</argument>
                    <argument>~@sprint1</argument>
                    <argument>--tags</argument>
                    <argument>~@sprint2</argument>
                    <argument>--tags</argument>
                    <argument>~@sprint3</argument>
                    <argument>--tags</argument>
                    <argument>~@sprint4</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>

@aslakhellesoy
Copy link
Contributor

Instead of:

<argument>--format</argument>
<argument>html</argument>
<argument>--out</argument>
<argument>${project.basedir}/target</argument>

Can you try:

<argument>--format</argument>
<argument>html:${project.basedir}/target</argument>

@aslakhellesoy
Copy link
Contributor

If that works, I'll still keep this ticket open - the error message should have told you what you need to do.

@hutchy2570
Copy link
Contributor Author

Yes, that works. Thanks.

@aslakhellesoy
Copy link
Contributor

Related to #148

@aslakhellesoy
Copy link
Contributor

This was fixed in 1.0.0.RC24

@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants