Overview

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

Using TestNG with SpiraTest

To have TestNG report back to SpiraTest, you simply use the TestNG 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 TestNG script 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 TestNG test, since the built-in TestNG runner for Eclipse doesn't support custom listeners (or not at time of writing).

An example command-line to use would be:

java.exe -classpath "C:\selenium-2.0.0\libs\selenium-java-2.33.0.jar; C:\Program Files\SpiraTestNGListener\TestNGListener.jar; C:\Program Files\TestNG-5.7\testng-5.7\testng-5.7-jdk15.jar" org.testng.TestNG -listener com.inflectra.spiratest.addons.testnglistener.SpiraTestListener com\inflectra\spiratest\addons\testnglistener\samples\unittests.xml

Using RemoteLaunch to Execute

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