Reusing Eclipse TestNG Configuration

5 views
Skip to first unread message

pranav

unread,
Dec 16, 2009, 4:02:35 PM12/16/09
to testng-users
List,

In Our Testng TestSuite, I pass a param to all my TestNG classes
through testng.xml as <parameter>. none of my testcase methods will
work till they get that variable, as the setup function makes a call
based on that param value, and if its not there ... it will halt the
test execution.

Now the problem my team is facing is , if we want to debug a single
test function in eclipse, we cant just go and right click on that
function and say run as testng test. As this way we bypass
testng.xml,and setup method never gets that param. The only way to
run it that way is creating a new configuration for that function ,
and pass the param through the configuration setting..... but that
means every time creating a new configuration for each new function,
which is just annoying.....

So I was just wondering if there is some way to create a eclipse
configuration and apply/reuse it to any testng test method ? please
let me know if you guys think its possible ?

otherwise we have some less-elegant solution like giving a unique
group name to that method while debugging, or passing the param
through system properties.... but I would really like to stay with
testng <parameter> way.

any other suggestion/ideas would be appreciated

best,
Pranav
Reply all
Reply to author
Forward
0 new messages