java - How does all annotations work in TestNg without main() method -
i have doubt in testng java. completly new testng. doubt is, how test cases executing using testng in java without having main() method? please suggest me if have ideas. following code example of sample test case using testng in java. if notice, can find 1 thing there no main() method in code. then, how testcases executing? i have doubt. main() method needed selenium webdriver , testng combination execute script? or can execute testcases without main() method? if can execute testcases without main(), how possible? package com.first.example; import org.testng.annotations.test; public class demoone { @test public void firsttestcase() { system.out.println("im in first test case demoone class"); } @test public void secondtestcase() { system.out.println("im in second test case demoone class"); } } this valid doubt many testers have. because main() method needed run java program , while writing tests in tes...