Sunday 30 March 2014

Selenium IDE features

Before starting with test case creation using selenium IDE one should get to know some of the basic features and functionalities of the integrated development environment itself.

The selenium IDE is compromised of the menu bar, base URL bar, toolbar, test case pane and the log/reference/UI-element/rollup pane.

image

 

Menu bar

The menu bar comprises of the File, Edit, Actions, Options and Help menu.

File Menu

image

The menu bar is usually used for performing the very basic functionalities such as creating new test cases, opening existing test cases, saving them, closing them, etc. The tests are saved in HTML format. These operations can also be done for test suits as well which are collection of test cases.

Besides these basic functionalities there are options to export the particular test case or test suit to the particular language of choice that can be run in selenium RC or web driver. For example if one is to choose the ‘C# / Nunit / Remote Control’ format for exporting a test case, the test case will be exported as a C# script written in accordance with the unit testing framework of Nunit and using the selenium RC API.

Edit Menu

image

The edit menu is mainly used for editing the test cases created in the IDE.

The undo and redo commands are used to undoing and redoing a particular command. Similarly the user can cut, copy, paste and delete commands accordingly using the options in the edit menu.

The insert new command can be used for inserting commands in between the commands of a test case. Similarly the insert comment is used for inserting comments in between. The inserted command or comment will be placed above the selected command.

 

image

Actions Menu

image

The actions menu has options to help a user to record, execute and debug test cases.

Using these options the user can either execute the entire test case or an entire test suite. Also during the course of the execution of a test case the user can either pause, resume or step through each of the steps.

For debugging purpose the user can set start point and breakpoints anywhere within the test case flow.

The actions menu also provides the user the option to set the execution speed for test cases. This could help the user to analyse the execution flow of the particular test case or test suit.

image

Options Menu

image

The options menu helps the user in configuring the various settings of the selenium IDE. About how to set the basic configuration settings were explained in the earlier post Configuring selenium IDE options.

Besides this the options menu also allows the user to configure the clipboard format for copying commands. So when copies one of the commands from the test case pane to a code editor tool, it gets copied in the specified language and API format.

image

Base URL bar

The base URL bar is used for specifying the web application’s base URL. Selenium IDE remembers the previously used base URLs. User can select from these or give a base URL of ones choice.

image

Toolbar

speed control  Used to adjust test case execution speed.

image  Plays the entire test suite executing each of the test cases in sequential order.

image  Executes the test case which the user has selected.

imagePauses / resumes the test case execution.

image Used to step through the commands one at a time in a test case. Useful for debugging.

image Advanced feature of selenium IDE allowing repetitive steps to be grouped under a single action.

image Used for recording browser actions.

 

Test Case Pane

image

The test case pane is used for tracking all the test cases currently active during a particular instance of the selenium IDE. It can list more than one test case at a time. A user can also open a test suite which would list all the test cases pertaining to the particular test suite in the test case pane. Once a test case is executed it will marked in green or red depending on the status of the test case. The failed ones will be marked in red and those passed will be marked in green. At the bottom of the test case pane the overall status of all the currently open test cases will be given including the total number of test cases executed and the total number of failed test cases.

Editor Pane

The editor pane is where test cases are written.User can view the test cases in either of the two views available: table view or source view.

imageThe table view is where selenese instructions are entered. Here the three columns command, target and value together form a complete selenese command. The user selects the command of his choice from the command drop down, the locator object on which the command is to be performed in the target area and the value to be verified in the value area. For example if a user is to perform the action of typing a particular word or sentence into a text box locator object he may do so as illustrated in the below figure:

image 

image

The source displays the corresponding HTML code of the corresponding test case written in the table view. The source tab is by default displayed in HTML format. By changing the format to a scripting language of the user’s choice this can be changed.

 

Log pane

image

The log pane displays the various log reports during execution of a test case. The most commonly displayed log messages are: info, error, warning and messages. The info message shows the command currently being executed. The warning message displays warnings and the error message is displayed when a command fails. Together the log messages helps a user to debug the test case that is currently executed. The log pane in selenium IDE also allows filtering based on the type of log and also allows the user to clear all log messages.

Reference pane

image

The reference pane gives a brief description of the particular command that is currently selected by the user. It specifies the various parameters that must be used for a particular command. It is a very handy feature that helps a user to understand new commands.

No comments:

Post a Comment