About this question
UTF-8 io.rest-assured rest-assured 4.1.2 test org.testng testng 6.14.3 ************************************************** TestNg.xml
UTF-8 io.rest-assured rest-assured 4.1.2 test org.testng testng 6.14.3 ************************************************** TestNg.xml
Log in to share your answer and help other learners.
Log in to answerBest Answer · By JanBask QA Expert
Answered on Apr 26, 2022
Your pom.xml has to include maven surefire plugin inside
... tags: ...
org.apache.maven.plugins
maven-surefire-plugin
2.19.1
src/test/testng.xml
...
Then you can execute your tests by running mvn tests.
Bear in mind it will pick up every class that has a ...test suffix and look for methods annotated with @Test only in such classes.
How to execute a single test (question in comments):
You can provide method name in testng.xml file, like this:
Or simply run it via maven:
mvn test -Dtest=className#methodName
When executing a single test via maven, you might need to add -DfailIfNoTests=false so that maven does not fail and you won't receive the message of - no tests found, when multiple modules exist.
Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step QA Testing guides from industry experts
Common QA Testing interview questions, answered
Guides, tips and career advice on QA Testing from JanBask experts.
QA Testing Quality Assurance Analyst Job Demand: Where the Jobs Are and Where They’re Headed
Are quality assurance analysts in demand? See BLS job growth, yearly openings, pay by state, and what employers want from QA…
QA Testing Manual Tester Job Demand in 2026: What the Numbers Really Say
Are manual testers in demand? See what jobs data says, where hiring is shrinking and holding, and what to learn so you stay…
Selenium Selenium Tutorial: Complete Guide to Automation Testing for Beginners
The Selenium tutorial covers both fundamental & advanced Selenium concepts. It is for individuals at all levels. Learn about…