All test cases running even if only a few are added to the testng.xml file in Selenium with TestNG

Modified on Tue, 28 Mar, 2023 at 4:29 PM

Causes: 

testng.xml file path is not being provided in the build.gradle file. By default, TestNG runs all test cases marked with the “@Test” annotation. 

Debugs:

make sure the path of the testng.xml file is present in the build.gradle file and is correct.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article