genxgeek
genxgeek

Reputation: 13367

How to assert for valid HTML per jUnit

I have a junit test that I need to validate for valid html.

Is there an assertValidHtml() or will I have to use something like jsoup then validate on that return value?

Upvotes: 3

Views: 2057

Answers (1)

Marsh
Marsh

Reputation: 8145

Junit does not include an HTML parser or validator by itself. So yes, use something like jsoup to parse and validate your html and then do asserts on the result.

Upvotes: 4

Related Questions