18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Help Needed: Error While Integrating with Jenkins

SreekanthSreekanth Members
edited April 2013 in Sahi - Open Source
Hello All,

I am trying to run a SAHI suite after Integrating with Jenkins. After building from Jenkins and checking console I find a null pointer exception there. Have tried out things but I am not coming out of this error. Can someone look into it?
These are the details.
SAHI version: V4.3, 2013-02-06
Browser type and version: FireFox 19
OS: Windows8
Jenkins version: 1.509


Snippet jenkins-sample.xml

<project name="SAHI3" default="ff">
<property name="userdata.dir" value="${basedir}/userdata"/>
<property environment="env" />
<property name="urlbase" value="11.100.101.11:9090"/>
<taskdef name="sahi" classname="net.sf.sahi.ant.RunSahiTask" classpath="lib/ant-sahi.jar"/>
<target name="ff" description="start the server and run sahi tests">
<parallel>
<sequential>
<waitfor maxwait="3" maxwaitunit="minute" checkevery="100">
<http url="http://localhost:9999/logs/"/>;
</waitfor>
<antcall target="SahiTest"/>
</sequential>
</parallel>
</target>
<target name="SahiTest">
<sahi suite="../userdata/scripts/SAHI_Installer/sahi.suite"
browserType="Firefox"
baseurl="http://11.100.101.11:9090/";
sahihost="localhost"
sahiport="9999"
failureproperty="sahi.failed"
haltonfailure="false"
threads="6">
</sahi>
<antcall target="failsahi"/>
</target>
<target name="failsahi" if="sahi.failed">
<fail message="Sahi tests failed!"/>
</target>
</project>





Error in Jenkins Console

[java] >>>> Sahi started. Listening on port: 9999
[java] >>>> Configure your browser to use this server and port as its proxy
[java] >>>> Browse any page and CTRL-ALT-DblClick on the page to bring up the Sahi Controller
[java]
[java] Reading browser types from: D:\Jenkins\jobs\SAHI3\workspace\userdata\config\browser_types.xml
[java] Firefox 4 was not found at C:\Program Files (x86)\Mozilla Firefox 4.0 Beta 7\firefox.exe
[java]
[java] Apr 5, 2013 10:32:49 AM net.sf.sahi.ssl.SSLHelper getKeyManagerFactoryForRemoteFetch
[java] INFO: No SSL Client Cert specified

SahiTest:
[sahi]
[sahi] suiteName = ../userdata/scripts/SAHI_Installer/sahi.suite
[sahi] base = http://11.100.101.11:9090/
[sahi] sahiHost = localhost
[sahi] port = 9999
[sahi] threads = 6
[sahi] browserType = Firefox
[sahi] this.isSingleSession == false
[sahi] Added shutdown hook.
[sahi] http://localhost:9999/_s_/dyn/Suite_start?suite=../userdata/scripts/SAHI_Installer/sahi.suite&amp;base=http://11.100.101.11:9090/&amp;threads=6&amp;sahisid=sahi_11a4b5e50178c047c609f1607b1513d6302f&amp;browserType=Firefox&amp;html=&amp;junit=../userdata/temp/junit
[java] Apr 5, 2013 10:32:49 AM net.sf.sahi.command.CommandExecuter execute
[java] WARNING: commandClass = >net.sf.sahi.command.Suite< commandMethod = >start<
[java] Apr 5, 2013 10:32:49 AM net.sf.sahi.command.CommandExecuter execute
[java] WARNING: java.lang.reflect.InvocationTargetException
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:597)
[java] at net.sf.sahi.command.CommandExecuter.execute(CommandExecuter.java:55)
[java] at net.sf.sahi.LocalRequestProcessor.handleDyn(LocalRequestProcessor.java:67)
[java] at net.sf.sahi.LocalRequestProcessor.getLocalResponse(LocalRequestProcessor.java:40)
[java] at net.sf.sahi.ProxyProcessor.processLocally(ProxyProcessor.java:209)
[java] at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:86)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[java] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[java] at java.lang.Thread.run(Thread.java:662)
[java] Caused by: java.lang.NullPointerException
[java] at net.sf.sahi.command.Suite.getPreconfiguredBrowserSuite(Suite.java:97)
[java] at net.sf.sahi.command.Suite.getSuite(Suite.java:73)
[java] at net.sf.sahi.command.Suite.start(Suite.java:60)
[java] ... 12 more
[java]





Any Idea on what is causing the error ?

Answers

  • SreekanthSreekanth Members
    edited April 2013
    got it working.
    browserType="Firefox" should have been browserType="firefox" in the xml.

    but, i need to have sahi running now, i thought sahi would have started automatically.

This discussion has been closed.