[jbosstools-dev] Re: Pass @Parameter value to a TestNG test from Eclipse?
Max Rydahl Andersen
max.andersen at redhat.com
Thu Jun 18 10:07:31 EDT 2009
or in testng.xml or via your dataproviders as described in TestNG docs:
http://testng.org/doc/documentation-main.html#parameters
Funny enough the system properties trick does not seem to be documented ;)
/max
Galder Zamarreno wrote:
> Actually, simply passing a system property worked!! I.e.
>
> -Dbasedir=/home/galder/tmp
>
> Galder Zamarreno wrote:
>> According to this message:
>> http://markmail.org/message/n2gh4tjzzg5vozxy
>>
>> This is not doable :( but wanted to check whether anyone got it to work.
>>
>> Galder Zamarreno wrote:
>>> Hi,
>>>
>>> I've got a question regarding TestNG and Eclipse. Does anyone know
>>> how to pass the value of a @Parameter to a test from Eclipse? I've
>>> got a test that has:
>>>
>>> @Parameters({"basedir"})
>>> protected void setUpTempDir(String basedir) {
>>> ...
>>>
>>> But I can't execute it from Eclipse cos it didn't get the basedir
>>> parameter. So, I was wondering if there's any way to pass such
>>> parameter from Eclipse.
>>>
>>> Cheers,
More information about the jbosstools-dev
mailing list