kushan
kushan

Reputation: 785

testng running on linux maven command line

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)

Upvotes: 2

Views: 3560

Answers (1)

niharika_neo
niharika_neo

Reputation: 8531

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.xml

Hope it helps..

Upvotes: 3

Related Questions