if you run with -X you'll get more help. Most likely, you are forking
the unit tests and system properties are not passed on. I'm not sure
why the xml files doesn't reflect that.
maven.junit.sysproperties in the test plugin will help if they are not
being passed through.
- Brett
On Thu, 23 Dec 2004 14:06:13 -0800, Tim Brazil <[EMAIL PROTECTED]> wrote:
> I'm trying to add a new property in the project.properties file in order
> to build in different levels of debug output for my junit tests. It's a
> very basic idea however I cannot seem to get the correct "modified"
> property using the System.getProperty() method. Am I missing something?
> The following explains my problem. - Thanks in advance for any pointers.
> - Tim
>
> 1) I added a new property to my project.properties file called
> smi.appliance.functest.debugLevel and set it to 0:
>
> i.e.
> smi.appliance.functest.debugLevel=0
>
> 2) I run my junit test using a -D properties modifier flag:
>
> i.e.
> smimav -Dsmi.appliance.functest.debugLevel=2
> -Dtestcase=com.sendmail.appliance.functest.syscfg.AccountNegFuncTest
> test:single
>
> 3) Now the output in my <testname>.xml file indicates that the value for
> smi.appliance.functest.debugLevel has been indeed modified to 2:
>
> <property name="smi.appliance.functest.debugLevel" value="2"></property>
>
> 4) However my method within the test still thinks it the default
> "project.properties" value.
>
> String debugLevel =
> System.getProperty("smi.appliance.functest.debugLevel");
> System.out.print("DEBUG:
> "+debugLevel+"\n"); <----- this will still
> print 0 and not the 2 "modified" value
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]