how to change method description dynamically

23 views
Skip to first unread message

SPS

unread,
Jul 10, 2016, 8:49:53 AM7/10/16
to testng-users
I want to collect method description for reporting purpose.Can I get some help please?

TestClass A {

private String manualScriptName = "ABC"


@Test ABC( description ="test1"){

    your code here.

   

}

@Test ABC( description ="test2"){

    your code here.

   

}

in my listener I would like to get description as "test1-ABC", "test2-abc"

how can I do that?



⇜Krishnan Mahadevan⇝

unread,
Jul 10, 2016, 9:00:25 AM7/10/16
to testng...@googlegroups.com
Sneha,
Can you please help share a working example ?
The example you shared is not proper java code. So there's not much anyone can do here.

If you are looking at clubbing the method name and its description, then you should be able to get access to it via ITestNGMethod interface that is exposed in most of TestNG provided listeners.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages