Dans le absence of a Maven plugin for Sahi, quel est le moyen le plus simple d'exécuter des tests Sahi auprès d'Hudson?Comment exécuter les tests Sahi dans le cadre d'une build Hudson?
Répondre
Vous avez un tutorial for integrating Hudson with Sahi, mais il est basé sur un projet de style libre, et un Ant task (comme Pascal Thivent commenté)
avec 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>
Je ne peux pas ne pas partager cela. –
@Pascal: argh, doubles négations, ils me jettent toujours;) – VonC
+1 si vous préférez :) –
vous pouvez utiliser maven Surefire plugin appeler sahi cas de test junit, puis intégré avec le serveur Jenkin
Avez-vous envisagé d'utiliser la tâche ant? –
FYI: "sahi" s'avère être le mot indien pour "correct": http://translate.google.com/#en|hi|sah%20hee – Zabba
+1 pour la traduction correcte :) – Sagar