TestNG is a testing framework created as an annotation driven alternative for JUnit 3 in times when “extends TestCase” was…