0
public class Tests{

  @Test
  public void run(){
    sop("this is test method 1");
  }

}

How will Jvm know about entry point of the program? 🤔

1 Answer 1

1

Entry point is always a main method. If you're using command-line to run your tests, you use org.testng.TestNG where there is a main method.

If you're running tests from IDE or from Maven, there are their own main methods and at some point their code calls TestNG API to execute the tests (or call main method of TestNG if they run tests in different JVM)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.