Sai
Sai

Reputation: 389

test-output folder is not created when i execute maven project in jenkins

I have selenium project created using Maven. I have included surefire plugin also . When i execute the "mvn test" command using jenkins . I am not able to see the test-output folder . Could you please help me to fix it

Upvotes: 1

Views: 3269

Answers (3)

Pragati Khangar
Pragati Khangar

Reputation: 1

Go to pom.xml file--> right click on pom.xml file --> click on Run As --> click on - 3 maven clean Done check Maven project folder test-output folder Added

Upvotes: 0

Krishnan Mahadevan
Krishnan Mahadevan

Reputation: 14746

TestNG would create the output folder as test-output only when running it via the IDE such as eclipse or IntelliJ.

When you run TestNG tests via Maven using surefire plugin, then the output folder is controlled by surefire plugin which is passed on to TestNG as part of the initialization.

By default surefire reports are available under target/surefire-reports folder where target folder is the default build output folder.

You can customize or change this folder value via https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#reportsDirectory

Upvotes: 1

Vaibhav Khachane
Vaibhav Khachane

Reputation: 45

After executing test script then Right click on your project folder into eclipse and click on refresh button. test-output folder will appear in TestNG

Upvotes: 0

Related Questions