Ioan
Ioan

Reputation: 5187

Testng : how to get all asserts within a test method?

I am trying to build a report for some tests made with TestNG framework. Is there any way to get all asserts used within a test method?

Upvotes: 0

Views: 119

Answers (2)

Cedric Beust
Cedric Beust

Reputation: 15608

The latest version of TestNG allows you to create your own assertions, details here.

Upvotes: 1

niharika_neo
niharika_neo

Reputation: 8531

AFAIK, nope. What you can do is to have your defined assertions, which you can use in your tests and which, when executed would increment some counter or get added to some collection which you can reference in your report listeners.

Upvotes: 1

Related Questions