[Webtest] Running webtest without xserver->X11

Steve Chikwaya Steve Chikwaya" <stavarotti@gmail.com
Wed, 17 Sep 2008 12:20:14 -0500


------=_Part_5234_12038366.1221672014115
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi everyone,

Is there anyway to run webtest on a Linux server that does not have
xserver->X11 installed?  I am currently using Hudson to manage nightly tests
and would like to run webtest independent of installing a GUI.  The webtest
throws an error, though does not fail on initialization as it is expecting
to launch the initialization window.  The webtest then fails at the end when
trying to launch the test results.  Below is the initial error i receive:

wt.defineMacros: [property] Exception in thread "AWT-EventQueue-0"
org.codehaus.groovy.runtime.InvokerInvocationException:
java.lang.RuntimeException: Failed to create component for 'frame' reason:
java.awt.HeadlessException: [property] No X11 DISPLAY variable was set, but
this program performed an operation which requires it. [property] at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:92)
[property] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
[property] at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:248)
[property] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
[property] at groovy.lang.Closure.call(Closure.java:292) [property] at
groovy.lang.Closure.call(Closure.java:287) [property] at
groovy.lang.Closure.run(Closure.java:368) [property] at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) [property]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) [property] at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
[property] at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
[property] at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
[property] at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
[property] at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
[property] at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
[property] Caused by: java.lang.RuntimeException: Failed to create component
for 'frame' reason: java.awt.HeadlessException:

No X11 DISPLAY variable was set, but this program performed an operation
which requires it. [property] at
groovy.util.FactoryBuilderSupport.createNode(FactoryBuilderSupport.java:354)
[property] at
groovy.util.FactoryBuilderSupport.doInvokeMethod(FactoryBuilderSupport.java:405)
[property] at
groovy.util.FactoryBuilderSupport.invokeMethod(FactoryBuilderSupport.java:207)
[property] at
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:784)
[property] at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758)
[property] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
[property] at WebTestMonitorImpl$_closure1.doCall(WebTestMonitor.groovy:37)
[property] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[property] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[property] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[property] at java.lang.reflect.Method.invoke(Method.java:597) [property] at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
[property] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
[property] at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:248)
[property] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
[property] at WebTestMonitorImpl$_closure1.doCall(WebTestMonitor.groovy)
[property] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[property] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[property] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[property] at java.lang.reflect.Method.invoke(Method.java:597) [property] at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
[property] ... 14 more [property] Caused by: java.awt.HeadlessException:
[property] No X11 DISPLAY variable was set, but this program performed an
operation which requires it. [property] at
java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
[property] at java.awt.Window.<init>(Window.java:407) [property] at
java.awt.Frame.<init>(Frame.java:402) [property] at
java.awt.Frame.<init>(Frame.java:367) [property] at
javax.swing.JFrame.<init>(JFrame.java:163) [property] at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[property] at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
[property] at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
[property] at
java.lang.reflect.Constructor.newInstance(Constructor.java:513) [property]
at
org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaClassHelper.java:535)
[property] at
groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:2356)
[property] at
groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1255)
[property] at
groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1185)
[property] at
org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:809)
[property] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:230)
[property] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNew0(ScriptBytecodeAdapter.java:237)
[property] at
groovy.swing.factory.FrameFactory.newInstance(FrameFactory.groovy:29)
[property] at
groovy.util.FactoryBuilderSupport.createNode(FactoryBuilderSupport.java:344)
[property] ... 34 more [echo] Defining project macros and custom steps (if
any) wt.generateDtd: [groovyScript] Scanning for entities... [groovyScript]
1 entities found [groovyScript] Already uptodate:
/opt/hudson/jobs/Webtest/workspace/webtest/gallupOnlineTest/dtd/Project.dtd
wt.generateDefinitions: [groovyScript] Scanning
/opt/hudson/jobs/Webtest/workspace/webtest/gallupOnlineTest/definitions for
definitions... [groovyScript] 4 definitions found [groovyScript] Already
uptodate:
/opt/hudson/jobs/Webtest/workspace/webtest/gallupOnlineTest/definitions.xml
wt.createReportsFolder: wt.deleteReports: wt.parallel.init:
wt.before.testInWork: wt.testInWork: [echo] Execution allTests.xml in dir
/opt/hudson/jobs/Webtest/workspace/webtest/gallupOnlineTest/tests test:
wt.defineMacros: test: [webtest] Exception in thread "AWT-EventQueue-0"
org.codehaus.groovy.runtime.InvokerInvocationException:
java.lang.NullPointerException [webtest] at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:92)
[webtest] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
[webtest] at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:248)
[webtest] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)
[webtest] at groovy.lang.Closure.call(Closure.java:292) [webtest] at
groovy.lang.Closure.call(Closure.java:287) [webtest] at
groovy.lang.Closure.run(Closure.java:368) [webtest] at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) [webtest]
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) [webtest] at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
[webtest] at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
[webtest] at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
[webtest] at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
[webtest] at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
[webtest] at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
[webtest] Caused by: java.lang.NullPointerException [webtest] at
org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.java:199)
[webtest] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(ScriptBytecodeAdapter.java:506)
[webtest] at
WebTestMonitorImpl$_notifyWebTestAdded_closure2.doCall(WebTestMonitor.groovy:97)
[webtest] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[webtest] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[webtest] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[webtest] at java.lang.reflect.Method.invoke(Method.java:597) [webtest] at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
[webtest] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
[webtest] at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:248)
[webtest] at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
[webtest] at
WebTestMonitorImpl$_notifyWebTestAdded_closure2.doCall(WebTestMonitor.groovy)
[webtest] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[webtest] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[webtest] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[webtest] at java.lang.reflect.Method.invoke(Method.java:597) [webtest] at
org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
[webtest] ... 14 more



Thanks!

------=_Part_5234_12038366.1221672014115
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div dir=3D"ltr">Hi everyone,<br><br>Is there anyway to run webtest on a Li=
nux server that does not have xserver-&gt;X11 installed?&nbsp; I am current=
ly using Hudson to manage nightly tests and would like to run webtest indep=
endent of installing a GUI.&nbsp; The webtest throws an error, though does =
not fail on initialization as it is expecting to launch the initialization =
window.&nbsp; The webtest then fails at the end when trying to launch the t=
est results.&nbsp; Below is the initial error i receive:<br>
<br><font size=3D"3">wt.defineMacros:  [property] Exception in thread &quot=
;AWT-EventQueue-0&quot; org.codehaus.groovy.runtime.InvokerInvocationExcept=
ion: java.lang.RuntimeException: Failed to create component for &#39;frame&=
#39; reason: java.awt.HeadlessException:   [property] No X11 DISPLAY variab=
le was set, but this program performed an operation which requires it.  [pr=
operty] =09at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMeth=
od.java:92)  [property] =09at groovy.lang.MetaMethod.doMethodInvoke(MetaMet=
hod.java:230)  [property] =09at org.codehaus.groovy.runtime.metaclass.Closu=
reMetaClass.invokeMethod(ClosureMetaClass.java:248)  [property] =09at groov=
y.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756)  [property] =09at=
 groovy.lang.Closure.call(Closure.java:292)  [property] =09at groovy.lang.C=
losure.call(Closure.java:287)  [property] =09at groovy.lang.Closure.run(Clo=
sure.java:368)  [property] =09at java.awt.event.InvocationEvent.dispatch(In=
vocationEvent.java:209)  [property] =09at java.awt.EventQueue.dispatchEvent=
(EventQueue.java:597)  [property] =09at java.awt.EventDispatchThread.pumpOn=
eEventForFilters(EventDispatchThread.java:273)  [property] =09at java.awt.E=
ventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)  [prop=
erty] =09at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispat=
chThread.java:173)  [property] =09at java.awt.EventDispatchThread.pumpEvent=
s(EventDispatchThread.java:168)  [property] =09at java.awt.EventDispatchThr=
ead.pumpEvents(EventDispatchThread.java:160)  [property] =09at java.awt.Eve=
ntDispatchThread.run(EventDispatchThread.java:121)  [property] Caused by: j=
ava.lang.RuntimeException: Failed to create component for &#39;frame&#39; r=
eason: java.awt.HeadlessException: </font><br>
<br><font size=3D"3">No X11 DISPLAY variable was set, but this program perf=
ormed an operation which requires it.  [property] =09at groovy.util.Factory=
BuilderSupport.createNode(FactoryBuilderSupport.java:354)  [property] =09at=
 groovy.util.FactoryBuilderSupport.doInvokeMethod(FactoryBuilderSupport.jav=
a:405)  [property] =09at groovy.util.FactoryBuilderSupport.invokeMethod(Fac=
toryBuilderSupport.java:207)  [property] =09at org.codehaus.groovy.runtime.=
InvokerHelper.invokePogoMethod(InvokerHelper.java:784)  [property] =09at or=
g.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:758=
)  [property] =09at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invok=
eMethodN(ScriptBytecodeAdapter.java:170)  [property] =09at WebTestMonitorIm=
pl$_closure1.doCall(WebTestMonitor.groovy:37)  [property] =09at sun.reflect=
.NativeMethodAccessorImpl.invoke0(Native Method)  [property] =09at sun.refl=
ect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  [pro=
perty] =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth=
odAccessorImpl.java:25)  [property] =09at java.lang.reflect.Method.invoke(M=
ethod.java:597)  [property] =09at org.codehaus.groovy.reflection.CachedMeth=
od.invoke(CachedMethod.java:86)  [property] =09at groovy.lang.MetaMethod.do=
MethodInvoke(MetaMethod.java:230)  [property] =09at org.codehaus.groovy.run=
time.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:248)  [p=
roperty] =09at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMeth=
odOnCurrentN(ScriptBytecodeAdapter.java:78)  [property] =09at WebTestMonito=
rImpl$_closure1.doCall(WebTestMonitor.groovy)  [property] =09at sun.reflect=
.NativeMethodAccessorImpl.invoke0(Native Method)  [property] =09at sun.refl=
ect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)  [pro=
perty] =09at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth=
odAccessorImpl.java:25)  [property] =09at java.lang.reflect.Method.invoke(M=
ethod.java:597)  [property] =09at org.codehaus.groovy.reflection.CachedMeth=
od.invoke(CachedMethod.java:86)  [property] =09... 14 more  [property] Caus=
ed by: java.awt.HeadlessException:   [property] No X11 DISPLAY variable was=
 set, but this program performed an operation which requires it.  [property=
] =09at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java=
:159)  [property] =09at java.awt.Window.&lt;init&gt;(Window.java:407)  [pro=
perty] =09at java.awt.Frame.&lt;init&gt;(Frame.java:402)  [property] =09at =
java.awt.Frame.&lt;init&gt;(Frame.java:367)  [property] =09at javax.swing.J=
Frame.&lt;init&gt;(JFrame.java:163)  [property] =09at sun.reflect.NativeCon=
structorAccessorImpl.newInstance0(Native Method)  [property] =09at sun.refl=
ect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl=
.java:39)  [property] =09at sun.reflect.DelegatingConstructorAccessorImpl.n=
ewInstance(DelegatingConstructorAccessorImpl.java:27)  [property] =09at jav=
a.lang.reflect.Constructor.newInstance(Constructor.java:513)  [property] =
=09at org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaC=
lassHelper.java:535)  [property] =09at groovy.lang.MetaClassImpl.doConstruc=
torInvoke(MetaClassImpl.java:2356)  [property] =09at groovy.lang.MetaClassI=
mpl.invokeConstructor(MetaClassImpl.java:1255)  [property] =09at groovy.lan=
g.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1185)  [property] =09a=
t org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelp=
er.java:809)  [property] =09at org.codehaus.groovy.runtime.ScriptBytecodeAd=
apter.invokeNewN(ScriptBytecodeAdapter.java:230)  [property] =09at org.code=
haus.groovy.runtime.ScriptBytecodeAdapter.invokeNew0(ScriptBytecodeAdapter.=
java:237)  [property] =09at groovy.swing.factory.FrameFactory.newInstance(F=
rameFactory.groovy:29)  [property] =09at groovy.util.FactoryBuilderSupport.=
createNode(FactoryBuilderSupport.java:344)  [property] =09... 34 more      =
[echo] Defining project macros and custom steps (if any)  wt.generateDtd: [=
groovyScript] Scanning for entities... [groovyScript] 1 entities found [gro=
ovyScript] Already uptodate: /opt/hudson/jobs/Webtest/workspace/webtest/gal=
lupOnlineTest/dtd/Project.dtd  wt.generateDefinitions: [groovyScript] Scann=
ing /opt/hudson/jobs/Webtest/workspace/webtest/gallupOnlineTest/definitions=
 for definitions... [groovyScript] 4 definitions found [groovyScript] Alrea=
dy uptodate: /opt/hudson/jobs/Webtest/workspace/webtest/gallupOnlineTest/de=
finitions.xml  wt.createReportsFolder:  wt.deleteReports:  wt.parallel.init=
:  wt.before.testInWork:  wt.testInWork:      [echo] Execution allTests.xml=
 in dir /opt/hudson/jobs/Webtest/workspace/webtest/gallupOnlineTest/tests  =
test:  wt.defineMacros:  test:   [webtest] Exception in thread &quot;AWT-Ev=
entQueue-0&quot; org.codehaus.groovy.runtime.InvokerInvocationException: ja=
va.lang.NullPointerException   [webtest] =09at org.codehaus.groovy.reflecti=
on.CachedMethod.invoke(CachedMethod.java:92)   [webtest] =09at groovy.lang.=
MetaMethod.doMethodInvoke(MetaMethod.java:230)   [webtest] =09at org.codeha=
us.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.=
java:248)   [webtest] =09at groovy.lang.MetaClassImpl.invokeMethod(MetaClas=
sImpl.java:756)   [webtest] =09at groovy.lang.Closure.call(Closure.java:292=
)   [webtest] =09at groovy.lang.Closure.call(Closure.java:287)   [webtest] =
=09at groovy.lang.Closure.run(Closure.java:368)   [webtest] =09at java.awt.=
event.InvocationEvent.dispatch(InvocationEvent.java:209)   [webtest] =09at =
java.awt.EventQueue.dispatchEvent(EventQueue.java:597)   [webtest] =09at ja=
va.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:=
273)   [webtest] =09at java.awt.EventDispatchThread.pumpEventsForFilter(Eve=
ntDispatchThread.java:183)   [webtest] =09at java.awt.EventDispatchThread.p=
umpEventsForHierarchy(EventDispatchThread.java:173)   [webtest] =09at java.=
awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)   [webtest=
] =09at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:16=
0)   [webtest] =09at java.awt.EventDispatchThread.run(EventDispatchThread.j=
ava:121)   [webtest] Caused by: java.lang.NullPointerException   [webtest] =
=09at org.codehaus.groovy.runtime.InvokerHelper.setProperty(InvokerHelper.j=
ava:199)   [webtest] =09at org.codehaus.groovy.runtime.ScriptBytecodeAdapte=
r.setProperty(ScriptBytecodeAdapter.java:506)   [webtest] =09at WebTestMoni=
torImpl$_notifyWebTestAdded_closure2.doCall(WebTestMonitor.groovy:97)   [we=
btest] =09at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)   =
[webtest] =09at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcc=
essorImpl.java:39)   [webtest] =09at sun.reflect.DelegatingMethodAccessorIm=
pl.invoke(DelegatingMethodAccessorImpl.java:25)   [webtest] =09at java.lang=
.reflect.Method.invoke(Method.java:597)   [webtest] =09at org.codehaus.groo=
vy.reflection.CachedMethod.invoke(CachedMethod.java:86)   [webtest] =09at g=
roovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)   [webtest] =09at=
 org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(Closur=
eMetaClass.java:248)   [webtest] =09at org.codehaus.groovy.runtime.ScriptBy=
tecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)   [webt=
est] =09at WebTestMonitorImpl$_notifyWebTestAdded_closure2.doCall(WebTestMo=
nitor.groovy)   [webtest] =09at sun.reflect.NativeMethodAccessorImpl.invoke=
0(Native Method)   [webtest] =09at sun.reflect.NativeMethodAccessorImpl.inv=
oke(NativeMethodAccessorImpl.java:39)   [webtest] =09at sun.reflect.Delegat=
ingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)   [webte=
st] =09at java.lang.reflect.Method.invoke(Method.java:597)   [webtest] =09a=
t org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86) =
  [webtest] =09... 14 more</font><br>
&nbsp; <br><br><br>Thanks!<br>
</div>

------=_Part_5234_12038366.1221672014115--