In this article, we explain how TestNG works in the background and what is TestNG architecture. We will see examples creating the TestNG object and run the test class from code, It also adds a TestListener.