Forum Discussion

Soffia's avatar
Soffia
New Contributor
3 years ago
Solved

Unable to run testrunner.bat via Command Prompt.

Hi,   I'm using SoapUI 5.5.0 OS version and the problem is: To get a extent report I have created a build file and triggering via cmd, but getting following error Execute failed: java.io.IOExcepti...
  • Soffia's avatar
    3 years ago

    Solution for java.io.IOException: Cannot run program "testrunner.bat" while running build.xml via command prompt.

     

    Small change need to be done in build.xml file, below is the altered script highlighted in red:

    <project name="accounts" default="testreport" basedir=".">
    <property name="test.suite" value="TestSuite 1"/>
    <property name="test.case" value="DataDriven Demo2" />
    <property name="soapui.project" value="F:\Profile\SoapProjects\accounts.xml"/>
    <property name="soapui.home" value="C:\ProgramFiles\SmartBear\SoapUI-5.5.0\bin" />
    <property name="soapui.settings" value="F:\Profile\soapui-settings.xml" />
    <property name="results.dir" value="F:\SoapProjects"/>
    <property name="reports.dir" value="${results.dir}/Reports"/>
    <property name="html.dir" value="${reports.dir}/html"/>
    <target name="execute.project">
    <exec dir="." executable="${soapui.home}\testrunner.bat">
    <arg line="-s ${test.suite} -c ${test.case} -r -f ${results.dir} -t ${soapui.settings} ${soapui.project}" />
    </exec>
    </target>
    <target name="testreport" depends="execute.project">
    <mkdir dir="${reports.dir}" />
    <junitreport todir="${reports.dir}">
    <fileset dir="${results.dir}">
    <include name="Test-*.xml"/>
    </fileset>
    <report format="noframes" todir="${html.dir}" />
    </junitreport>
    </target>
    </project>