A
A
Antonio2020-01-14 11:48:28
Automation
Antonio, 2020-01-14 11:48:28

What is the best maven command to use to run a single autotest class in Jenkins?

Good afternoon!
There is a test automation project in which a certain set of autotests in Java using Maven. When integrating these tests with Jenkins, the question arose of how to create jobs to run tests.
Now a job has been created, in which the path to the remote project repository is specified. Job is configured to run the test with the command "mvn test surefire:test -Dtest=Test" , but errors are falling with "No tests to run", because apparently maven does not see the tests to run with TestNG.
Which Maven command is better to use in this case? So far, Google hasn't come up with any results. I would be grateful for advice and recommendations.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2020-01-14
@vitaly_il1

Use the same command as manually.
All Jenkins does is pull the code from the repo into the current directory.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question