How to run testng.xml file from maven commands in linux command line?
I am new to automation. I have created a maven project(java) using Interlij Idea for testing a web page. I can run test groups in testng.xml using Idea.
What I need now is running those test groups from the linux command line.(running the testng xml file)
You would need to download maven on linux and then AFAIK the commands shouldn’t be any different so you can use the surefire plugin in your pom and specify the suiteXmlFile param to mvn test command, something like
mvn test -DsuiteXmlFile=/src/test/resources/yourxml.xmlHope it helps..