The Artima Developer Community
Sponsored Link

SuiteRunner Forum
beta7 Bug: "Invalid configuration option: F" (ReporterFactory)

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Sakura J

Posts: 1
Nickname: sakuraj
Registered: Nov, 2004

beta7 Bug: "Invalid configuration option: F" (ReporterFactory) Posted: Nov 19, 2004 9:32 AM
Reply to this message Reply
Advertisement
When I run my tests, which call Runner.main, in beta7, I get the error

Error parsing command line arguments.
Invalid configuration option: F
Problem arg: -oFBAR


I traced this back to org.suiterunner.ReporterFactory

The problem appears to be that the method parseConfigSet depends on static variable allConfigs which is not initialized until an instance is constructed, because the block that initializes it is not static.

The simple fix is to add static before that block.

Alternatively, avoid the block all together by initializing the value as follows:
  private static List allConfigs = 
    Arrays.asList(new Config[]{
        Config.REPORT_RUN_STARTING,
        Config.REPORT_TEST_STARTING,
        Config.REPORT_TEST_FAILED,
        Config.REPORT_TEST_SUCCEEDED,
        Config.REPORT_SUITE_STARTING,
        Config.REPORT_SUITE_ABORTED,
        Config.REPORT_SUITE_COMPLETED,
        Config.REPORT_INFO_PROVIDED,
        Config.REPORT_RUN_STOPPED,
        Config.REPORT_RUN_ABORTED,
        Config.REPORT_RUN_COMPLETED
    });

Strangely, the bad code worked in beta6. Maybe somehow a ReporterFactory was constructed before the config options were parsed.

Thanks for SuiteRunner!

SakuraJ

p.s. I also found an incompatible change not listed in the change notes on page http://www.artima.com/suiterunner/download.jsp
The Report constructors in beta6 all have a 'source' parameter that has been removed in beta7.

p.p.s. The Preview button on the "Post new topic" web page does not format text as described in the "Formatting Your Post" instructions --- the preview displays the submitted text as one run-on paragraph.

Topic: Eclipse Plugin? Previous Topic   Next Topic Topic: The way to use Artima SuiteRunner tool

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use