continuous-integration - 如何将 Sahi 测试作为 Hudson 构建的一部分运行?

标签 continuous-integration hudson maven-plugin sahi

absence of a Maven plugin for Sahi ,从 Hudson 运行 Sahi 测试的最简单方法是什么?

最佳答案

你确实有一个 tutorial for integrating Hudson with Sahi , 但它是基于一个自由风格的项目,以及一个 Ant task (如 Pascal Thivent 评论)

alt text

zkdemo.xml and other Sahi ant tasks detailed here :

<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="bids" default="runfftests">
    <property environment="env"/>
    <property name="sahi.home" value="${env.SAHI_HOME}" location="/mnt/sda4/Sahi/sahi/" />
    <property name="user.data" value="${env.SAHI_USERDATA_DIR}" location="/mnt/sda4/Sahi/sahi/userdata"  />
    <property name="urlbase" value="http://www.google.com/"/>
    <taskdef name="sahi" classname="net.sf.sahi.ant.RunSahiTask" classpath="${sahi.home}/lib/ant-sahi.jar"/>
    <target name="runfftests">
        <antcall target="startsahi"/>
        <sleep seconds="4"/>
        <sahi suite="${user.data}/scripts/my.suite"
                      browser="/usr/bin/firefox"
                      baseurl="${urlbase}"
                      sahihost="localhost"
                      sahiport="9999"
                      failureproperty="sahi.failed"
                      haltonfailure="false"
                      browserProcessName="firefox"
                      threads="3">
        </sahi>
        <sleep seconds="4"/>
        <antcall target="stopsahi"/>
        <sleep seconds="4"/>
        <antcall target="failsahi"/>
    </target>
    <target name="failsahi" if="sahi.failed">
        <fail message="Sahi tests failed!"/>
    </target>
    <target name="startsahi" description="start sahi proxy">
        <java classname="net.sf.sahi.Proxy" fork="true" spawn="true" dir="${sahi.home}">
            <!--<env key="MOZ_NO_REMOTE" value="1"/>-->
            <classpath location="${sahi.home}/lib/sahi.jar">
                <fileset dir="${sahi.home}/extlib" includes="**/*.jar"/>
            </classpath>
            <arg value="${sahi.home}" id="basePath"/>
            <arg value="${user.data}" id="userdataPath"/>
        </java>
    </target>
    <target name="stopsahi" description="stop sahi server">
        <sahi stop="true" sahihost="localhost" sahiport="9999"/>
    </target>
</project>

关于continuous-integration - 如何将 Sahi 测试作为 Hudson 构建的一部分运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4140986/

相关文章:

jenkins - 如何限制在构建失败时可以在 jenkins 中接收电子邮件的用户列表?

jetty - 为什么有2个版本的Jetty Maven插件?

java - 当我执行命令release :prepare时,Maven出现问题

c# - 你如何从 Jenkins 运行 NUnit 测试?

git - 如何让 travis-ci 使用本地 git 分支而不是特定的提交?

continuous-integration - Hudson/Jenkins源代码指标?

jenkins - 如何在 Jenkins 中为某些用户级别阻止某些作业?

maven - 在 Maven 中打开/关闭 Atlassian Clover 的开关

CI 服务器上的 WCF 编译错误 : Microsoft. VisualStudio.ServiceModel.targets 未找到

Azure 组变量未选择我的 appsetting.json 文件变量