What is AbstractTestNGSpringContextTests

I have a TestNG class that looks like this:

public class WebAPITestCase extends AbstractTestNGSpringContextTests{.....} 

I tried to understand what this means extends AbstractTestNGSpringContextTests .

How does it work and what is its use?

+6
source share
1 answer

Please read javadoc:

An abstract base test class that integrates the Spring TestContext Framework with explicit ApplicationContext testing support in the TestNG environment.

Basically, the Spring application context will be set for the test class.

If this still does not make sense, I would recommend that you read Chapter 11 of the Spring Testing Guide .

+5
source

All Articles