Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » view the result in HTML format
view the result in HTML format [message #549848] Wed, 28 July 2010 04:31 Go to next message
Marou is currently offline Marou
Messages: 11
Registered: July 2010
Junior Member
Hi,

I'm getting started with SWTBot, and my test work fine in command line and i get the result in XML format.

Is there any method to view the result in HTML format (using xslt for example)?

I'm working with the command line

/prj/spg_sand/haddadm/newinstance/vsctd/bin/vsocstudio -application org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication -data /prj/spg_sand/haddadm/newinstance/vsctd/bin/resultat formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,/prj/spg_sand/haddadm/newinstance/vsctd/bin/TestNewFlow.xml formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter -testPluginName com.st.testcosimcockpit -className com.st.testcosimcockpit.alltests.TestNewFlow -os linux -ws gtk -arch x86 -consoleLog -debug


This is my XML file
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="0" failures="0" hostname="tunlx082" name="com.st.testcosimcockpit.alltests.TestNewFlow" tests="12" time="61.755" timestamp="2010-07-28T07:38:18">
  <properties>
    <property name="java.vendor" value="Sun Microsystems Inc." />
    <property name="sun.java.launcher" value="SUN_STANDARD" />
    <property name="org.osgi.supports.framework.extension" value="true" />
    <property name="sun.management.compiler" value="HotSpot Tiered Compilers" />
    <property name="osgi.framework.beginningstartlevel" value="1" />
    <property name="os.name" value="Linux" />
    <property name="sun.boot.class.path" value="/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/lib/resources.jar:/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/lib/rt.jar:/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/lib/sunrsasign.jar:/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/lib/jsse.jar:/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/lib/jce.jar:/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/lib/charsets.jar:/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/classes" />
    <property name="osgi.ws" value="gtk" />
    <property name="sun.desktop" value="gnome" />
    <property name="java.vm.specification.vendor" value="Sun Microsystems Inc." />
    <property name="java.runtime.version" value="1.6.0_17-b04" />
    <property name="osgi.instance.area" value="file:/prj/spg_sand/haddadm/newinstance/vsctd/bin/resultat/" />
    <property name="user.name" value="haddadm" />
    <property name="sun.java2d.pmoffscreen" value="false" />
    <property name="org.osgi.framework.system.packages" value="javax.accessibility,javax.activation,javax.activity,javax.annotation,javax.annotation.processing,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.jws,javax.jws.soap,javax.lang.model,javax.lang.model.element,javax.lang.model.type,javax.lang.model.util,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.script,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,javax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.tools,javax.transaction,javax.transaction.xa,javax.xml,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.bind.helpers,javax.xml.bind.util,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.soap,javax.xml.stream,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stax,javax.xml.transform.stream,javax.xml.validation,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.portable,org.omg.CORBA.TypeCodePackage,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.PortableServer.ServantLocatorPackage,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,org.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.stylesheets,org.w3c.dom.traversal,org.w3c.dom.views ,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers" />
    <property name="eclipse.launcher" value="/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/stworkbench" />
    <property name="org.osgi.framework.language" value="en" />
    <property name="user.language" value="en" />
    <property name="org.osgi.framework.processor" value="x86" />
    <property name="osgi.syspath" value="/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins" />
    <property name="sun.boot.library.path" value="/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/lib/i386" />
    <property name="osgi.manifest.cache" value="/home/haddadm/.vsocstudio/dp_201007271639/org.eclipse.osgi/manifests" />
    <property name="osgi.compatibility.bootdelegation" value="true" />
    <property name="eof" value="eof" />
    <property name="org.osgi.framework.bootdelegation" value="*" />
    <property name="java.version" value="1.6.0_17" />
    <property name="org.osgi.framework.os.name" value="Linux" />
    <property name="user.timezone" value="Africa/Tunis" />
    <property name="sun.arch.data.model" value="32" />
    <property name="osgi.bundles" value="org.eclipse.equinox.common@2:start, org.eclipse.update.configurator@3:start, org.eclipse.core.runtime@start" />
    <property name="java.endorsed.dirs" value="/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/lib/endorsed" />
    <property name="sun.cpu.isalist" value="" />
    <property name="sun.jnu.encoding" value="UTF-8" />
    <property name="eclipse.application" value="org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication" />
    <property name="file.encoding.pkg" value="sun.io" />
    <property name="org.osgi.framework.vendor" value="Eclipse" />
    <property name="file.separator" value="/" />
    <property name="osgi.debug" value="" />
    <property name="java.specification.name" value="Java Platform API Specification" />
    <property name="java.class.version" value="50.0" />
    <property name="user.country" value="US" />
    <property name="org.eclipse.equinox.launcher.splash.location" value="/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/com.st.platform_4.1.1.0/splash.bmp" />
    <property name="osgi.configuration.cascaded" value="true" />
    <property name="java.home" value="/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre" />
    <property name="osgi.os" value="linux" />
    <property name="eclipse.commands" value="-os
linux
-ws
gtk
-arch
x86
-showsplash
-launcher
/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/stworkbench
-name
Stworkbench
--launcher.library
/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805/eclipse_1115.so
-startup
/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/org.eclipse.equinox.launcher_1.0.102.1.jar
-exitdata
440007
-application
org.eclipse.swtbot.eclipse.junit4.headless.swtbottestapplication
-data
/prj/spg_sand/haddadm/newinstance/vsctd/bin/resultat
formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,/prj/spg_sand/haddadm/newinstance/vsctd/bin/TestNewFlow.xml
formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter
-testPluginName
com.st.testcosimcockpit
-className
com.st.testcosimcockpit.alltests.TestNewFlow
-consoleLog
-debug
-vm
/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/bin/java
" />
    <property name="java.vm.info" value="mixed mode" />
    <property name="osgi.splashLocation" value="/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/com.st.platform_4.1.1.0/splash.bmp" />
    <property name="os.version" value="2.6.9-89.ELsmp" />
    <property name="osgi.arch" value="x86" />
    <property name="osgi.sharedConfiguration.area" value="file:/prj/spg_sand/haddadm/newinstance/vsctd/configuration/" />
    <property name="path.separator" value=":" />
    <property name="java.vm.version" value="14.3-b01" />
    <property name="org.osgi.supports.framework.fragment" value="true" />
    <property name="osgi.framework.shape" value="jar" />
    <property name="java.awt.printerjob" value="sun.print.PSPrinterJob" />
    <property name="osgi.instance.area.default" value="file:/home/haddadm/workspace/" />
    <property name="sun.io.unicode.encoding" value="UnicodeLittle" />
    <property name="org.osgi.framework.version" value="1.4.0" />
    <property name="osgi.install.area" value="file:/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/" />
    <property name="osgi.framework" value="file:/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar" />
    <property name="user.home" value="/home/haddadm" />
    <property name="osgi.bundlestore" value="/home/haddadm/.vsocstudio/dp_201007271639/org.eclipse.osgi/bundles" />
    <property name="osgi.splashPath" value="platform:/base/plugins/com.st.platform" />
    <property name="eclipse.consoleLog" value="true" />
    <property name="java.specification.vendor" value="Sun Microsystems Inc." />
    <property name="osgi.nl" value="en_US" />
    <property name="java.library.path" value="/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/lib/i386/server:/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/lib/i386:/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/../lib/i386:/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0/jre/lib/i386/:/sw/st_division/spg/spg_tools/SPG_INSTALL/fesoc_tools/1.6/Linux-i686/lib:/sw/st_division/spg/x86_64-rhel4/lib64:/sw/st_division/spg/x86_64-rhel4/lib:/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.5.0_06/jre/lib/i386/:/sw/platform/lsf/7.0/linux2.6-glibc2.3-x86_64/lib:/usr/X11R6/lib/:/lib:/usr/lib:/usr/lib/X11:/usr/local/lib:/usr/java/packages/lib/i386:/lib:/usr/lib" />
    <property name="java.vendor.url" value="http://java.sun.com/" />
    <property name="eclipse.startTime" value="1280302687690" />
    <property name="org.osgi.framework.os.version" value="2.6.9.ELsmp" />
    <property name="java.vm.vendor" value="Sun Microsystems Inc." />
    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment" />
    <property name="java.class.path" value="/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/org.eclipse.equinox.launcher_1.0.102.1.jar" />
    <property name="osgi.requiredJavaVersion" value="1.6.0_11" />
    <property name="eclipse.vm" value="/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/bin/java" />
    <property name="java.vm.specification.name" value="Java Virtual Machine Specification" />
    <property name="java.vm.specification.version" value="1.0" />
    <property name="sun.os.patch.level" value="unknown" />
    <property name="sun.cpu.endian" value="little" />
    <property name="java.io.tmpdir" value="/tmp" />
    <property name="java.vendor.url.bug" value="http://java.sun.com/cgi-bin/bugreport.cgi" />
    <property name="eclipse.product" value="com.st.platform.st_ide" />
    <property name="eclipse.home.location" value="file:/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/" />
    <property name="java.awt.graphicsenv" value="sun.awt.X11GraphicsEnvironment" />
    <property name="os.arch" value="i386" />
    <property name="java.ext.dirs" value="/sw/st_division/spg/ext_tools/jdk/Linux-i686/jdk1.6.0_17/jre/lib/ext:/usr/java/packages/lib/ext" />
    <property name="user.dir" value="/prj/spg_sand/haddadm/newinstance/vsctd/bin/result" />
    <property name="org.osgi.supports.framework.requirebundle" value="true" />
    <property name="line.separator" value="
" />
    <property name="java.vm.name" value="Java HotSpot(TM) Server VM" />
    <property name="eclipse.ee.install.verify" value="false" />
    <property name="file.encoding" value="UTF-8" />
    <property name="osgi.framework.version" value="3.4.3.R34x_v20081215-1030" />
    <property name="eclipse.vmargs" value="-Xms256m
-Xmx512m
-XX:MaxPermSize=512m
-Dsun.java2d.pmoffscreen=false
-Dorg.osgi.framework.bootdelegation=*
-Dosgi.configuration.cascaded=true
-Dosgi.sharedConfiguration.area=/prj/spg_sand/haddadm/newinstance/vsctd/configuration
-Dosgi.configuration.area=@user.home/.vsocstudio/dp_201007271639
-jar
/sw/st_division/spg/st_tools/STWorkbench/4.1.1/Linux-i686/plugins/org.eclipse.equinox.launcher_1.0.102.1.jar
" />
    <property name="java.specification.version" value="1.6" />
    <property name="org.osgi.framework.executionenvironment" value="OSGi/Minimum-1.0,OSGi/Minimum-1.1,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6" />
    <property name="osgi.configuration.area" value="file:/home/haddadm/.vsocstudio/dp_201007271639/" />
    <property name="osgi.logfile" value="/prj/spg_sand/haddadm/newinstance/vsctd/bin/resultat/.metadata/.log" />
  </properties>
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithOutInputConfiguration" name="canCreateANewProject" time="1.6" />
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithOutInputConfiguration" name="canEnterProjectName" time="0.08" />
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithOutInputConfiguration" name="canConfigureGlobalProject" time="22.099" />
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithOutInputConfiguration" name="canConfigureInterface" time="0.989" />
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithOutInputConfiguration" name="canModifyParameter" time="3.332" />
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithOutInputConfiguration" name="canCheckWithOutInputDesign_streamer_top" time="5.669" />
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithOutInputConfiguration" name="canCheckWithOutInputTlmComponent_streamer_top" time="3.781" />
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithInputConfiguration" name="canCreateANewProject" time="0.532" />
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithInputConfiguration" name="canEnterProjectName" time="0.063" />
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithInputConfiguration" name="canConfigureFlobalProject" time="8.833" />
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithInputConfiguration" name="canCheckWithInputDesign_streamer_top" time="4.068" />
  <testcase classname="com.st.testcosimcockpit.testnewflow.testBridgeFlowWithInputConfiguration" name="canCheckWithInputTlmComponent_streamer_top" time="4.559" />
  <system-out><![CDATA[]]></system-out>
  <system-err><![CDATA[]]></system-err>
</testsuite>


Thank you in advance

[Updated on: Wed, 28 July 2010 04:51]

Report message to a moderator

Re: view the result in HTML format [message #549896 is a reply to message #549848] Wed, 28 July 2010 07:36 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael Istria
Messages: 720
Registered: July 2009
Location: Grenoble, France
Senior Member
Hi,

You can use the JUNIT.XSL to transform your XML reports to an HTML file. http://dev.eclipse.org/viewsvn/index.cgi/org.eclipse.test/JU NIT.XSL?revision=1.6&view=markup
Or, far better, you can set up Hudson to trigger your build, and show report on the job dashboard ;)

Regards,
--
Mickael Istria -- BonitaSoft S.A.
http://www.bonitasoft.com/products/downloads.php
Re: view the result in HTML format [message #549899 is a reply to message #549848] Wed, 28 July 2010 08:15 Go to previous messageGo to next message
Marou is currently offline Marou
Messages: 11
Registered: July 2010
Junior Member
Hi,

Thank you for responding,

I tried ti use the JUNIT.XSL by adding
<?xml-stylesheet type="text/xsl" href="JUNIT.XSL"?>
in my XML reports but the result is unreadable.

And about automatism, i don't use Hudson only code command line.

Any other ideas?
Re: view the result in HTML format [message #549919 is a reply to message #549899] Wed, 28 July 2010 09:01 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan Padegaonkar
Messages: 873
Registered: July 2009
Senior Member
On 7/28/10 5:15 AM, Marou wrote:
> Hi,
>
> Thank you for responding,
>
> I tried ti use the JUNIT.XSL by adding <?xml-stylesheet type="text/xsl"
> href="JUNIT.XSL"?> in my XML reports but the result is unreadable.
>
> And about automatism, i don't use Hudson only code command line.
>
> Any other ideas?

May I suggest a <style/> ant tag at the end of the test execution,
you'll need to tweak the variables as per your need:

<style
style="${junit.xsl}"
in="{swtbot-junit-report.xml}"
out="${swtbot-junit-report.html}" />

--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot
Re: view the result in HTML format [message #550224 is a reply to message #549919] Thu, 29 July 2010 10:50 Go to previous message
Marou is currently offline Marou
Messages: 11
Registered: July 2010
Junior Member
Ketan Padegaonkar wrote on Wed, 28 July 2010 09:01
On 7/28/10 5:15 AM, Marou wrote:
> Hi,
>
> Thank you for responding,
>
> I tried ti use the JUNIT.XSL by adding <?xml-stylesheet type="text/xsl"
> href="JUNIT.XSL"?> in my XML reports but the result is unreadable.
>
> And about automatism, i don't use Hudson only code command line.
>
> Any other ideas?

May I suggest a <style/> ant tag at the end of the test execution,
you'll need to tweak the variables as per your need:

<style
style="${junit.xsl}"
in="{swtbot-junit-report.xml}"
out="${swtbot-junit-report.html}" />

--
Ketan
http://ketan.padegaonkar.name | http://eclipse.org/swtbot


Hi Ketan,

Using an ant script with style tag or xslt tag i got the same result --> no style in my HTML report

is there any problem with my Xml report?? any suggestions?

[Updated on: Thu, 29 July 2010 10:51]

Report message to a moderator

Previous Topic:CheckboxTableViewer problem
Next Topic:SWTBot tests under buckminster
Goto Forum:
  


Current Time: Fri Apr 18 19:35:35 EDT 2014

Powered by FUDForum. Page generated in 0.01667 seconds