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.
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…
QA Testing Software Testing Basics: Fundamentals, Principles, Lifecycle & Best Practices
Learn software testing basics, including key principles, lifecycle stages, types of testing, and best practices. A complete…
QA Testing You Can’t Miss the Top 20 Security Testing Interview Questions
Are you getting ready for your information security interview? Get a hold of the top 20 information security interview questions…