0

I'd like to be able to run by Jenkins a series of test from Selenium. I've see a lot of topic about the subject but it's not clear to me.

Do I need to call maven to run the project or can I directly call Testng ?

Also do I need with Jenkins to call my project using maven or using Ant ?

What is the best practice. Is there specific plugin that I need.

2 Answers 2

1

Do I need to call maven to run the project or can I directly call Testng ?

You can call testng through maven or ant. There is no direct runner plugin for Jenkins.

What is the best practice. Is there specific plugin that I need.

You might need the TestNG plugin to show the results inside Jenkins, but it is optional. Best practice is to use maven or ant. You can find a nice ant example here

Sign up to request clarification or add additional context in comments.

Comments

0

You can use run TestNG scripts in Jenkins with or without Maven. Maven as a build tool, in my opinion, looks more robust and gives you more flexibility than Ant.

To run pure TestNg script in Jenkins, enter the following in the 'build' section:

D:>java -cp "Pathtolibfolder\lib\*;Pathtobinfolder\bin" org.testng.TestNG testng.xml 
  • Click on Save button.
  • Note: The actual path of lib and bin folder need to add the in above command.
  • After saving the command, Jenkins will build project in predefined time, and this command will run using TestNG.
  • The result will be stored in custom report HTML file that can be sent via email with a small Jenkins configuration

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.