prc
prc

Reputation: 43

Printing the custom testcase name in the report using testng

I am using data provider to pass parameters in testng and want to print custom testcase name (it will be based on the type of data I am passing to the testcase). How do i do it?

Upvotes: 0

Views: 377

Answers (1)

patrungel
patrungel

Reputation: 841

Parameters in Dataproviders looks like what you want.

If you declare your @DataProvider as taking a java.lang.reflect.Method as first parameter, TestNG will pass the current test method for this first parameter.

That bit of documentation also provides an example.

Upvotes: 1

Related Questions