Knowledge Base Article

Home Page > Knowledge Base > Spira Platform > RemoteLaunch

Article Running Selenium WebDriver Scripts using RemoteLaunch and JUnit

by Sarah T. on Tuesday, March 3, 2015

This article explains the process for running Selenium WebDriver test scripts written in Java using JUnit, RemoteLaunch and SpiraTest.

Overview

Unlike running Selenium IDE scripts through WebDriver, You don't use the Selenium plugin for RemoteLaunch, instead you should use the JUnit plugin (see http://www.inflectra.com/SpiraTest/Downloads.aspx) that will let Selenium tests written in Java / JUnit report back to SpiraTest and then use the Command-Line plugin for RemoteLaunch to actually initiate the execution of the test scripts.

Using JUnit with SpiraTest

To have JUnit report back to SpiraTest, you simply use the JUnit listener that comes with our extension and use that in conjunction with the special @SpiraTestCase attribute on the Java class to denote which test case in SpiraTest the results should be associated with.

You can then run this JUnit from the command line using Java.exe or use an IDE such as Eclipse. If you are using Eclipse, make sure to execute as a Java application not a JUnit test, since the built-in JUnit runner for Eclipse doesn't support custom listeners (or not at time of writing)

Using RemoteLaunch to Execute

Once you have the basic JUnit setup in place reporting back to SpiraTest, you can simply use the Command-Line plugin for RemoteLaunch to kick off the JUnit test harness. All of the reporting back to SpiraTest is usually left to the JUnit test fixtures themselves.

Attachments
Article Info
Last Updated: 3/3/2015
Article ID: KB140
# Views: 1245
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.