Stark
Stark

Reputation: 481

Ant Script for SoapUI generating no output

I have to use ant script for generating report through Soap UI

SoapUi installation dir: C:\SmartBear\SoapUI-5.2.1

soapui project dir: C:\Users\st\Documents\LoginTestCase-soapui-project.xml

output directory(where logs to be generated): C:\Users\st\Desktop\logs

when I am running it from soapUI testsuite pane it is working properly. In the output directory final output are getting generated. From the soapui i have copied the command: cmd.exe /C testrunner.bat -sTestSuite -r -a -j -J -fC:\Users\st\Desktop\logs C:\Users\st\Documents\LoginTestCase-soapui-project.xml.

On using the same command on the ant script, it is not working, it only showing

main:
     [exec] Microsoft Windows [Version 6.1.7601]
     [exec] Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
     [exec] C:\SmartBear\SoapUI-5.2.1\bin>
BUILD SUCCESSFUL
Total time: 749 milliseconds

but nothing get is generated in the output folder. This Ant script i am using in eclipse:

<?xml version="1.0"?>

<project default="main" basedir="C://SmartBear//SoapUI-5.2.1//bin"> 
    <target name="main">
       <exec executable="cmd">
          <arg value="cmd.exe //C testrunner.bat -s TestSuite -r -a -j -J -f C://Users//st//Desktop//logs C://Users//st//Documents//LoginTestCase-soapui-project.xml" />       
       </exec>
    </target>  
</project>

Along with this i have also tried:

<?xml version="1.0"?>

<project default="main" basedir=".">    
    <target name="main">
       <exec executable="cmd">
          <arg value="cmd.exe //C 'C://SmartBear//SoapUI-5.2.1//bin//testrunner.bat' -s TestSuite -r -a -j -J -f C://Users//st//Desktop//logs C://Users//st//Documents//LoginTestCase-soapui-project.xml" />       
       </exec>
    </target>  
</project>

But nothing is generating in output directory.

Upvotes: 0

Views: 237

Answers (1)

P.A. Cros
P.A. Cros

Reputation: 511

you should remove extra / (you can also remove cmd.exe as it is redundant with executable attribute).:

<exec executable="cmd">
    <arg value="/C testrunner.bat -s TestSuite -r -a -j -J -f C:/Users/st/Desktop/logs C:/Users/st/Documents/LoginTestCase-soapui-project.xml"/>
</exec>

Upvotes: 1

Related Questions