Hudson/Jenkins integration in Eclipse

Now, that the hudson-eclipse plugin seems dead for quite a while (not anything since 2009) i was briefly thinking about writing my own update with the xml-api by Jenkins.
But then i discovered that the mylyn project did what i wanted and even more ! With mylyn 3.5 there is an Jenkins/Hudson connector that will allow you to see the status of each job, see the test results, check the Jenkins console in eclipse, even provide a clickable changelog !

Check out the new features of http://www.eclipse.org/mylyn/new/ !

Posted in buildmanagement, java | Tagged | Leave a comment

Logback Console in Eclipse

Recently i did find there is a console plugin for logback in eclipse. Unfortunately its based on a very old version of logback (0.9.9), so i searched for the sources, bumped the logback/slf4j versions to 0.9.28 and 1.6.1 and fixed various things in the plugin. Now there’s a new version of this plugin available here, i’ll post the sources to github soon.

This version is compiled with jdk 1.6 and has eclipse 3.6 as target platform. If you’ll need something else, drop a comment ..

The documentation at http://logback.qos.ch/consolePlugin.html is still valid, just unzip the file in your plugins folder and select the logback view. After you did configure logback to use the console in logback(-test).xml things should start to show up in eclipse.
The neat thing is, that you can click on each logentry in the console to see where that specific logentry was created. Like linked stacktraces but for logfile enties.

*Update* Version 1.1.2 fixes an overlooked bug while viewing a stacktrace: logback eclipse Plugin 1.1.2

Posted in java, logging | Tagged , , , | 2 Comments

Running SoapUI Integration Tests in Hudson

Recently i’ve been wondering how to automate webservice(SOAP) integration tests. My first idea was to use soamoa, but it seems a bit buggy at the moment and the last version seems quite a while ago.

But SoapUI does offer a native maven plugin, which can run SoapUI testcases directly. So I set up a small maven project, and add a soapUI testcase like this:

<build>
 <plugins>
   <plugin>
     <groupId>eviware</groupId>
     <artifactId>maven-soapui-plugin</artifactId>
     <version>3.6.1</version>
     <executions>
       <execution>
         <id>SoapUITest1</id>
         <configuration>
           <projectFile>src/test/soapui/SoapUITest1-project.xml</projectFile>
           <outputFolder>${project.build.directory}/surefire-reports</outputFolder>
           <junitReport>true</junitReport>
           <exportAll>true</exportAll>
           <printReport>false</printReport>
         </configuration>
         <goals>
           <goal>test</goal>
         </goals>
         <phase>test</phase>
       </execution>
     </executions>
    </plugin>
  </plugins>
 </build>

Now, when i run “mvn test” from the command line, everything looks fine and the tests get correctly executed. But after I import the project in Hudson, i can’t see the test results :( This seems to be a bug in Hudson, the only workaround at this point seems to create a freeform project in hudson instead of a maven2 one, add a maven2 step (mvn test), then add “**/target/surefire-reports/*.xml” under “Publish junit test results”. Now Hudson correctly does display all test results on the project page.

The only point left is to run multiple SoapUI projects from one maven project, for this one needs to add multiple <execution> tags, maybe the future versions of the soapui-maven-plugin will support easier configuration.

Continuous Integration mit Hudson: Grundlagen und Praxiswissen für Einsteiger und Umsteiger Webservice-Programmierung mit SOAP SOA in der Praxis: System-Design für verteilte Geschäftsprozesse

Posted in java, Testing | Tagged , , , | Leave a comment

Running selenium-hub inside Tomcat

The usual process of starting selenium-hub seems to be an ant goal that does run an integrated jetty server. While this is easy to run it is not so easy to run in a server enviromnent. Also, as i have an existing tomcat already running and the hub does not do that much i was wondering if i can run the server inside tomcat.

The first look was dissapointing, everything is bundeled in jar files, no war file in sight. Fortunately selenium-hub is just a bunch of servlets with some logic behind, so it should be easy to add some maven scripts to create a war file.

Selenium-hub also depends on selenium-core, which is also included in the selenium-hub distribution. So i created a fork of selenium-grid on github and add some maven scripts. You can see the results here: https://github.com/mglauche/selenium-grid . Right now only the core and the hub part are mavenized.

A complete war-file can be found here: selenium-core-hub-1.0.8-SNAPSHOT

Selenium. Web-Applikationen automatisiert testen

Handbuch zum Testen von Web-Applikationen: Testverfahren, Werkzeuge, Praxistipps (Xpert.Press)

Posted in Testing | Tagged , , | Leave a comment