This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6972 - Command-line: possibility to specify different configuration settings
Summary: Command-line: possibility to specify different configuration settings
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 enhancement
Target Milestone: ---
Assignee: fd
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-28 07:48 UTC by fd
Modified: 2009-05-29 14:14 UTC (History)
0 users

See Also:


Attachments

Description fd 2009-05-28 07:48:25 UTC
Description
-----
When the library is used as a real library and plugged into some other application, it's easy to change the TesterConfiguration instance used by the Checker prior to calling the Tester.runTests(...) method.

When the library is used as a stand-alone application through the command-line, there is currently no way to change the configuration that the Checker will use. The Checker defaults to the mobileOK configuration, period.


Solutions
-----
The long-term solution is to define all configuration settings in an XML configuration file and specify the configuration file using some parameter on the command-line, but that requires some time, so that's not a priority IMHO.

One possible short-to-mid-term solution is to specify the name of a class that returns the TesterConfiguration instance, i.e. something like:

 "-c org.myorg.myConfiguration"

... and this class would be used through Java reflexion to instantiate the appropriate configuration settings.

Obvsiously, the library in itself only contains one such class:

 org.w3c.mwi.mobileok.basic.MobileOKConfiguration

... so the parameter would be a bit moot in practice when the code is not extended. But then it's harmless and makes it possible to extend the library while still using the same command-line.
Comment 1 fd 2009-05-29 14:14:05 UTC
Yeliz updated the Tester class consequently, implementing the proposed solution.