如何将soapUI与Jenkins集成?

问题描述:

有人知道向我的CI版本添加soapUI测试的好方法吗?

Anyone know a good way to add soapUI tests to my CI builds ?

soapUI通过Maven或Ant提供测试自动化.在此处中描述了Maven集成.

soapUI offers test automation via Maven or Ant. Maven integration is described HERE.

一个月前我尝试过,但是eviware储存库有一些奇怪的问题...因此,我现在通过Ant运行测试.您要做的是在soapUI bin目录中调用testrunner.bat(或testrunner.sh)脚本.您可以找到可用的参数此处.

I tried it some month ago but had some strange issues with the eviware repository... Therefore I run my tests now via Ant. What you have to do is to call the testrunner.bat (or testrunner.sh) script in the soapUI bin directory. You can find the available arguments HERE.

您必须在Hudson构建服务器上安装soapUI.然后,您只需创建一个通过Ant构建的新作业即可.

You have to install soapUI on your Hudson build server. Then you simply create a new job which is built via Ant.

示例build.xml:

<project name="IntegrationTest" default="soapui-tests" basedir=".">
    <description>Runs the soapUI integration tests</description>
    <property file="build.properties"/>

    <target name="checkos">
        <condition property="testrunner.cmd" value="${soapUI.home}/bin/testrunner.bat">
                <os family="windows" />
        </condition>
        <condition property="testrunner.cmd" value="${soapUI.home}/bin/testrunner.sh">
                <os family="unix" />
        </condition>
    </target>

    <target name="soapui-tests" depends="checkos">
        <exec executable="${testrunner.cmd}"
              failonerror="yes"
              failifexecutionfails="yes"
        >    
            <arg value="-e ${service.endpoint}"/>
            <arg value="-P dbUrl=${db.Url}"/>
            <arg value="-rajf"/>
            <arg path="${report.dir}"/>
            <arg path="${soapui.project.folder}"/>
        </exec>
    </target>
</project>