How to add network drive path as testOutputDirectory in pom.xml file?

Hi All,
I am generating reports thru ReportNG _+Maven  .These reports are getting stored under “target/surefire-reports/html” folder.But I just want to save these reports under different folder of different machine(Network driver like 192.168.1.1//D//reports//).
How can I achieve this? I tried to change the path of outputDirectory tag in pom.xml .But didn’t work.
Please can anyone give me the syntax ASAP.

Add Comment
1 Answer(s)

\\192.168.1.1\D\reports\ these are network paths.

In program you would write this path like this \\\\192.168.1.1\\D\\reports\\

Virender

Virender Singh Professor Answered on March 9, 2015.

Sorry @Virender,
It’s not working. I am doing like this in pom.xml file


<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-surefire-report-plugin</artifactId>

<version>2.14</version>

<configuration>

<reportsDirectory>\\\\192.168.1.1\\d$\\reports\\</reportsDirectory>

<outputDirectory>\\\\192.168.1.1\\d$\\reports\\</outputDirectory>

</configuration>

</plugin>

Is there any other way,please let me know ?? :(

on March 9, 2015.

I don’t know the answer, but I have some trouble shoot approaches for this. Please ignore if you have already tried these

1.  Make sure when u r running  test case the network path is accessible by the user who is executing the test cases.

2. Make sure user have permission to store the report file’s on network drive.
3. Try to print the reportsDirectory,outputDirectory path added inside pom.xml on console to make sure path is correctly added and executed by code. It will be difficult to perform this step, u need to find some command in maven like as given below

mvn validate

on March 12, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.