ABOUT US

|

 SUPPORT

|

BLOGS

User    Pass    

 

FEATURES

|

BENEFITS

|

VIDEOS & SCREENS

|

GET STARTED

|

PRICING

 

 

 

 

 

You are here: Home » general » quickstart_junit

 

 

 

 

 

 

 

 

LiquidTest Quick Start Guide for JUnit

Below are the steps for creating your first LiquidTest JUnit test case in Eclipse.

Before you start...

Ensure that you have installed LiquidTest Standalone or the LiquidTest Plugin into Eclipse before continuing to the next steps in this guide.

License Key

If you did not insert your LiquidTest License Key during install, please see Setting your License Key.

Create a Project

LiquidTest requires an Eclipse Project to structure Test Cases. If you have not created a project, create one via the File → New → Project.. menu.

From the many Project options choose JavaJava Project (assuming you are intending to Record JUnit, TestNG or Groovy/LiquidTest Script) test cases.

Check LiquidTest preferences

Click on the LiquidTest/Eclipse Window → Preferences menu option and then select the LiquidTest tab. On this pane the Browser and Test Writer can be changed as well as the timeout and other code generation options. To create JUnit tests make sure you have chosen the appropriate writer for your JUnit library (JUnit 4 in the example below).

Create a LiquidTest Test Case

LiquidTest has a helpful Wizard to help with the creation of LiquidTest test cases. The Wizard imports the necessary LiquidTest library into the project to allow your test cases to replay. Click on the LiquidTest button..

The LiquidTest Wizard provides an interface to create your Test Case and to configure LiquidTest prior to recording.

Select the preferred base package and class name and press the Finish button. This creates the new test class, switches the Workbench to the LiquidTest Perspective and starts the recording using Firefox or Internet Explorer in the LiquidTest browser view. Note: For more screen space you may wish to close the “Welcome” pane (if you have installed the LiquidTest Eclipse Standalone version).

Create a test scenario by navigating to a site and performing a transaction. For instance adding a new record, performing a search or purchasing an item using a shopping cart. When the transaction is complete press the Finish Recording button on the LiquidTest Browser.

This will write out the test into the class selected as a single method.

Run your Test Case!

Running your first Test Case is as simple as right clicking and selecting the appropriate runner. In the example above, if you recorded a JUnit test you would right click and select Run As..JUnit Test.

Watch your Test Case execute: Now that you have executed the Test Case the browser (in the browser view) should repeat the actions you recorded and you should see the Runner stating the results:

Recording another new JUnit Test method

Right click within an Java Editor window (where the script is) and click on the LiquidTest icon with the Record Test Method option. This switches the Workbench to the LiquidTest Perspective and starts the recording using either Firefox or Internet Explorer in the LiquidTest browser.

  • Bookmark "Quickstart junit" at del.icio.us
  • Bookmark "Quickstart junit" at Digg
  • Bookmark "Quickstart junit" at Furl
  • Bookmark "Quickstart junit" at Reddit
  • Bookmark "Quickstart junit" at Google
  • Bookmark "Quickstart junit" at StumbleUpon
  • Bookmark "Quickstart junit" at Newsvine
  • Bookmark "Quickstart junit" 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