ABOUT US

|

 SUPPORT

|

BLOGS

User    Pass    

 

FEATURES

|

BENEFITS

|

VIDEOS & SCREENS

|

GET STARTED

|

PRICING

 

 

 

 

 

 

 

 

 

 

 

 

Quick Start

 

 

Steps to run Selenium tests with the LiquidTest Server component

There are several reasons to use LiquidTest to run Selenium tests on a server. One compelling reason comes due to base architecture. LiquidTest utilizes deep hooks into the browser (rather than Javascript injection) which produce more consistent and stable test runs than Selenium RC/Server. The LiquidTest Server is developed to be deliberately fault-tolerant and not as timing sensitive as Selenium. Our experience is that many tests that fail in Selenium due to timing complications work without issue in LiquidTest.

This tutorial runs through running Selenium HTML Test Suites with LiquidTest. If you have Selenium JUnit tests please see our Integrations page.

Get the LiquidTest Server

Get the liquidtest-nodeps-<version>.jar at least version 3.0

Create your LiquidTest license file

1 - Get a LiquidTest Server license
2 - Create a new file called 'liquidtest.properties' and place the license key within.
The contents of the file should look like the following:

licenseKey=AAAAgF67uGXUl4t....

3 - Create a new JAR file called 'license.jar' containing the liquidtest.properties file as it's sole contents. From the command line you can create a JAR file with the following command:

jar -cf license.jar liquidtest.properties

Prepare a Selenium Test Suite

A Selenium Test Suite describes to the test runner what tests should be executed. A Selenium Test Suite can be as large or small as you wish. For simplicity we will create a Selenium Test Suite (IESuite.html) to run a single Test.

<html>
	<head>
		<title>My Test Suite</title>
	</head>
	<body>
 
		<table> 
			<tr><td><b>Suite Of Tests</b></td></tr> 
			<tr><td><a href="./Test1.html">Test Example</a></td></tr>
		</table> 
 
	</body>
</html>

Run your Selenium tests

Your tests (described in the Test Suite created above) can be executed from the command line with a few simple parameters. The first parameter is the location you wish for the report to be output to (-report). The second parameter is the location of the Test Suite or Test file. Below is an example of how to execute a Selenium Test Suite from the command line:

java -cp liquidtest-nodeps-3.0.0.jar;C:\license.jar com.jadeliquid.liquidtest.selenium.remote.RemoteSeleniumRunner -report c:\report.xml -test "C:\runtime-New_configuration(2)\LiquidTestProject\src\IESuite.html"

This will run the tests specified without a visible browser window. An XML report is written that contains the test execution results.

Test Execution Report

After running the test suite above the following test execution report is written in XML.

<testrun tests="8" errors="2" started="2011-03-22 13:44:20.828 EST" time="53765" hostname="foobar">
  <testcase name="SeleniumBase.html" fullpath="C:/runtime-New_configuration(2)/LiquidTestProject/src/SeleniumBase.html" browser="MSIE8.0" time="3031" started="2011-03-22 13:44:20.828 EST"/>
  <testcase name="NewHtmlRecorder7.html" fullpath="C:/runtime-New_configuration(2)/LiquidTestProject/src/NewHtmlRecorder7.html" browser="Firefox" time="17625" started="2011-03-22 13:44:24.281 EST">
    <error line="20" message="No such element to click: &apos;//*[@value=&apos;Google Search&apos;]/../../../DIV/IN&apos;" type="com.jadeliquid.liquidtest.TestError">com.jadeliquid.liquidtest.TestError: No such element to click: &apos;//*[@value=&apos;Google Search&apos;]/../../../DIV/IN&apos;&#xd;
	at com.jadeliquid.liquidtest.model.impl.TestBrowserImpl.getNodeOrFail(TestBrowserImpl.java:509)&#xd;
	at com.jadeliquid.liquidtest.model.impl.TestBrowserImpl.clickInternal(TestBrowserImpl.java:535)&#xd;
	at com.jadeliquid.liquidtest.model.impl.TestBrowserImpl.clickWithModifiers(TestBrowserImpl.java:714)&#xd;
	at com.jadeliquid.liquidtest.selenium.SeleniumImpl.click(SeleniumImpl.java:181)&#xd;
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&#xd;
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&#xd;
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&#xd;
	at java.lang.reflect.Method.invoke(Method.java:597)&#xd;
	at com.jadeliquid.liquidtest.selenium.runners.SeleniumRunner.executeCommand(SeleniumRunner.java:118)&#xd;
	at com.jadeliquid.liquidtest.selenium.runners.SeleniumRunner.runSingleTest(SeleniumRunner.java:87)&#xd;
	at com.jadeliquid.liquidtest.selenium.runners.SeleniumRunner.run(SeleniumRunner.java:50)&#xd;
	at com.jadeliquid.liquidtest.selenium.remote.RemoteSeleniumRunner.connectAndRun(RemoteSeleniumRunner.java:117)&#xd;
	at com.jadeliquid.liquidtest.selenium.remote.RemoteSeleniumRunner.run(RemoteSeleniumRunner.java:39)&#xd;
	at com.jadeliquid.liquidtest.selenium.remote.RemoteSeleniumRunner.main(RemoteSeleniumRunner.java:31)&#xd;
</error>
  </testcase>
  <testcase name="Assert3.html" fullpath="C:/runtime-New_configuration(2)/LiquidTestProject/src/Assert3.html" browser="Firefox" time="1578" row="1" started="2011-03-22 13:44:42.15 EST"/>
  <testcase name="Assert3.html" fullpath="C:/runtime-New_configuration(2)/LiquidTestProject/src/Assert3.html" browser="Firefox" time="1078" row="2" started="2011-03-22 13:44:43.687 EST"/>
  <testcase name="Assert3.html" fullpath="C:/runtime-New_configuration(2)/LiquidTestProject/src/Assert3.html" browser="Firefox" time="1109" row="3" started="2011-03-22 13:44:44.875 EST"/>
  <testcase name="Assert3.html" fullpath="C:/runtime-New_configuration(2)/LiquidTestProject/src/Assert3.html" browser="Firefox" time="1093" row="4" started="2011-03-22 13:44:46.78 EST"/>
  <testcase name="IE Google" fullpath="C:/runtime-New_configuration(2)/LiquidTestProject/src/IESuite.html" browser="MSIE8.0" time="9656" started="2011-03-22 13:44:47.265 EST"/>
</testrun>

Test Runner Options

The following options can be passed to the LiquidTest Selenium Test Runner.

 usage: ?
 -host <host>       the host is written into the report
 -port <port>       TCP port to connect to and report status
 -quiet             do not output test run progress
 -report <report>   xml report file to create
 -test <test>       selenium test file or suite of tests to run (can specify multiple times)

Running Selenium JUnit Tests

Note: This article shows how to run Selenium HTML and Selenium HTML Test Suites, not JUnit. For steps to run JUnit tests on a server see here..

  • Bookmark "Running selenium tests with liquidtest server" at del.icio.us
  • Bookmark "Running selenium tests with liquidtest server" at Digg
  • Bookmark "Running selenium tests with liquidtest server" at Furl
  • Bookmark "Running selenium tests with liquidtest server" at Reddit
  • Bookmark "Running selenium tests with liquidtest server" at Google
  • Bookmark "Running selenium tests with liquidtest server" at StumbleUpon
  • Bookmark "Running selenium tests with liquidtest server" at Newsvine
  • Bookmark "Running selenium tests with liquidtest server" at DZone


   News / Events

 

 > LiquidTest EOL Announcement - Info
 > LiquidTest Release 3.0! - Available
 > Visual Studio Plugin Released! - Release
 > Cruise Control .NET Integration - Info
 > Automate your Dev/Test Process - Webinar
 > Is manual testing crippling your project? - Blog
 > Testing complex Ajax content - Blog
 
   Recently Added Content  
 
 > Run LiquidTest's on Selenium RC/Server - Info
 > Setting up LiquidTest with Maven - Blog
 > Officially Supported Ajax Frameworks - Info
 > Atlassian Bamboo Integration - Tech
 > Setting up LiquidTest with SVN and Hudson - Blog
 > Creating Data-Driven Functional Tests - Blog
 > Reducing Test Maintenance - Blog


 © JadeLiquid, LiquidTest and WebRenderer are trademarks of JadeLiquid, all rights reserved.  Privacy Policy  |  Disclaimer

 

Dev Guide

 

 

Integrations

 

 

Updates

 

 

Contact Us