Posted By:
m_dunne
Posted On:
Thursday, March 7, 2002 06:21 AM
I have a problem trying to access command line arguments from a constructor What I am trying to do is run a JUnit test framework from within ANT. I have this working- the test runner uses reflection to run every java class from a test directory down to run all test methods. The problem arises when I want to pass in command line arguments. I have written a runAnt build script which passes in these arguments, And then ANT accesses them and passes them into the junit testrunner Via the following: using the jvmarg tags. From within the constructor of one of the *Test.java classes
More>>
I have a problem trying to access command line arguments
from a constructor
What I am trying to do is run a JUnit test framework from
within ANT. I have this working- the test runner uses reflection
to run every java class from a test directory down to run all
test methods.
The problem arises when I want to pass in command line arguments.
I have written a runAnt build script which passes in these arguments,
And then ANT accesses them and passes them into the junit testrunner
Via the following:
using the jvmarg tags.
From within the constructor of one of the *Test.java classes,
How do I access the 2 command lines? Or do I have to have a
Main method?
TIA.
<<Less