1.monkeyrunner
monkeyrunner is a automation tool which provides us to conduct BlackBox testing on android applications.
The monkeyrunner tool provides a Python API for writing programs that control an Android device or emulator from outside of Android code.
With monkeyrunner, you can write a Python program that installs an Android application or test package, runs it, sends keystrokes to it, takes screenshots of its user interface, and stores screenshots on the workstation.
The monkeyrunner tool is primarily designed to test applications and devices at the functional/framework level and for running unit test suites, but you are free to use it for other purposes.
2.What all we need before we get it started?
We need the below:
1. Windows 7/8 OS
2. Java 6
3. Eclipse
4. Android device running min android version 2.3.4
5. Python
6. Jython
7. Application to be tested
3.How to setup monkeyrunner in Eclipse?
1. First download Python from this site: http://www.python.org/getit/
2. Second download Jython.jar file from this site: http://www.jython.org/downloads.html
3. Download the Jython Installer from this site: https://wiki.python.org/jython/DownloadInstructions
3. After downloading the above files install Python.
4. Basic Install for Jython:
After downloading Jython installer, either double click the jython_installer-
2.5.2.jar
or run java with the -jar option
Quote:
java -jar jython_installer-2.5.2.jar
5. Now after completion of this we will move to Eclipse and download PyDev from Eclipse market place as shown below:
6. When finished install, Go to Window->Preferences->PyDev->Interpreters
- Jython interpreters : Click [new...] and got o the path where you have installed Jython.
For me it is at C:/jython/jython.jar
- Libraries : Click [New Jar/Zip(s)] and enter your ANDROID_SDK_PATH/tools/lib/monkeyrunner.jar
as shown below:
7. After this Go to Window->Preferences->PyDev->Interpreters->
- Python interpreters :
Click [new...] and got o the path where you have installed Python.
For me it is at C:/Python33/python.jar
as shown below:
4. How to write and execute monkeyrunner Script?
1. Go to File-> New -> PyDev Project -> Give any project Name and select Jython as shown below:
2. Now right click on the newly created project -> New -> PyDev Module
3. Give any Name to the project but leave the package field empty as shown below:
Tuesday, December 22, 2015
Friday, December 4, 2015
2015.12.04
I have created the database design document for Employee Management System. The Documentation is attached to my google drive.
2015.12.02/03
I learned about two load testing tools. That are WAPT and WebServer stress tool. I have installed these two tools on my computer easily and I have worked uisng WAPT.
WAPT
WAPT is a load and stress testing tool that lets you easily analyze the performance of your web site. It can be a mobile application, a web service or a customized ERP system. Web solutions of all sizes and technologies can be tested with WAPT just fine.
The test is created in a matter of minutes. A few clicks are required to make thousands virtual users execute concurrent sessions against your web application. In case you need to emulate reach client functionality in the data-driven mode, you can add variables and session-specific values. This is done with help of a convenient user interface that lets you browse and modify your test as a simple sequence of HTTP requests. No script programming is required unless you want to integrate complex calculations into your test.
Descriptive graphs and reports will let you analyze the performance characteristics of your system components under various load conditions, isolate and fix any bottlenecks and optimize your software and hardware configuration.
We help businesses test and adjust their web solutions, run all checks before going to production and eliminate risks of unexpected overload. If you are about to release a new or an updated application, WAPT will answer all the business-critical questions related to it:
How many concurrent users your web site can handle?
What response time your users will experience?
How frequently users will see errors and need to reconnect?
Will your site respond correctly to a stress load?
Can it get back to normal operation after that?
Web Server Stress Tool
Webserver Stress Tool is a powerful HTTP-client/server test application designed to pinpoint critical performance issues in your web site or web server that may prevent optimal experience for your site's visitors.
By simulating the HTTP requests generated by hundreds or even thousands of simultaneous users, you can test your web server performance under normal and excessive loads to ensure that critical information and services are available at speeds your end-users expect.
Detailed test logs and several easy to read graphs make analyzing results a snap. Webserver Stress Tool for Windows (2003 R2, Vista, 7, 2008) can benchmark almost any HTTP server (e.g. static pages, JSPs/ASPs, or CGIs) for performance, load, and stress-tests.
WAPT
WAPT is a load and stress testing tool that lets you easily analyze the performance of your web site. It can be a mobile application, a web service or a customized ERP system. Web solutions of all sizes and technologies can be tested with WAPT just fine.
The test is created in a matter of minutes. A few clicks are required to make thousands virtual users execute concurrent sessions against your web application. In case you need to emulate reach client functionality in the data-driven mode, you can add variables and session-specific values. This is done with help of a convenient user interface that lets you browse and modify your test as a simple sequence of HTTP requests. No script programming is required unless you want to integrate complex calculations into your test.
Descriptive graphs and reports will let you analyze the performance characteristics of your system components under various load conditions, isolate and fix any bottlenecks and optimize your software and hardware configuration.
We help businesses test and adjust their web solutions, run all checks before going to production and eliminate risks of unexpected overload. If you are about to release a new or an updated application, WAPT will answer all the business-critical questions related to it:
How many concurrent users your web site can handle?
What response time your users will experience?
How frequently users will see errors and need to reconnect?
Will your site respond correctly to a stress load?
Can it get back to normal operation after that?
Web Server Stress Tool
Webserver Stress Tool is a powerful HTTP-client/server test application designed to pinpoint critical performance issues in your web site or web server that may prevent optimal experience for your site's visitors.
By simulating the HTTP requests generated by hundreds or even thousands of simultaneous users, you can test your web server performance under normal and excessive loads to ensure that critical information and services are available at speeds your end-users expect.
Detailed test logs and several easy to read graphs make analyzing results a snap. Webserver Stress Tool for Windows (2003 R2, Vista, 7, 2008) can benchmark almost any HTTP server (e.g. static pages, JSPs/ASPs, or CGIs) for performance, load, and stress-tests.
Wednesday, December 2, 2015
2015.11.24/25/26
In these three days i Learned further more about Feature files. There I got to know about script outline and how to set a new driver for script.
27- leave
Monday, November 23, 2015
2015.11.23
Practically use scenario outline
Last Friday I learned about Scenario outline for automation testing. Scenario outline causes to reduces number of feature files which are written for a system. Just assume if we have a feature file with 3 scenarios and each of them are having 5 steps. In that case we have to write 15 feature file step definitions to execute the feature file. But by having scenario outline, there we need to use only 5 feature file steps and 2 step definition files only to execute this by using a data table. Actually, this is the very much of advantage that we can gained from learning about scenario outline.
In that case I execute a feature file by using scenario outline. I have mentioned the scenario and step definition files at below.
Feature file steps
Step definition files
Wednesday, November 18, 2015
2015.11.17/18
In these two days I learned about Feature files more and more. There I got to know
When I am executing those features into my feature file, actually there I have faced many problems. Some times step definition files could not understand what I am saying using parameters. So I have to be careful when selecting parameters. According to my knowledge that I have gained through these materials, I have realized and guessed that we can set parameters for those who have "id" element for meanwhile I am finding web element. Other web elements could not read my step definition files with "class name".
When I am setting drop down list selection for feature file, there I have to import java select 'api' for my step definition file. If not the code will generate an error.
I followed online materials for learn about feature files further more.
http://www.toolsqa.com/selenium-webdriver/checkbox-radio-button-operations/
http://www.toolsqa.com/selenium-webdriver/dropdown-multiple-select-operations/
http://stackoverflow.com/questions/8051402/how-to-check-a-radio-button-in-cucumber
- How to set parameters in to feature files.
- How to set data tables in to feature files.
- How to create step definition files for drop down selection and radio button selection.
- How to create step definition files for quick search button.
When I am executing those features into my feature file, actually there I have faced many problems. Some times step definition files could not understand what I am saying using parameters. So I have to be careful when selecting parameters. According to my knowledge that I have gained through these materials, I have realized and guessed that we can set parameters for those who have "id" element for meanwhile I am finding web element. Other web elements could not read my step definition files with "class name".
When I am setting drop down list selection for feature file, there I have to import java select 'api' for my step definition file. If not the code will generate an error.
I followed online materials for learn about feature files further more.
http://www.toolsqa.com/selenium-webdriver/checkbox-radio-button-operations/
http://www.toolsqa.com/selenium-webdriver/dropdown-multiple-select-operations/
http://stackoverflow.com/questions/8051402/how-to-check-a-radio-button-in-cucumber
Monday, November 16, 2015
2015.11.11/12/13/16
I learned more about feature files by online materials and videos. i have done automation testing from cucumber by using selenium also. I
created feature files using cucumber and then I tested them by using
selenium IDE. There are lots of errors that I faced in this activity. I
refer online materials and corrected them. I have to learn more about
creating feature files. (11)
I learned more about feature files
and automation testing. I created feature files for the website of
SLAAS. I created a new feature file for quick search box and login
form.
I learned about the way of transforming key board actions such as ENTER, ALT from cucumber with selenium IDE by following online materials.(12)
http://stackoverflow.com/questions/1629053/typing-enter-return-key-in-selenium
I used http://seleniumeasy.com/ web site for learning more about selenium IDE with cucumber. There I have easy tips on how to work in cucumber. Actually it seems as a foundation guideline for cucumber beginners. (13)
Also I have learned about cucumber parameter settings. Actually cucumber parameters let the cucumber users to decrease the number of step definitions files.Similar files can be called through parameters which has a unique id. (16)
Following images will be shown the feature file steps and step definition files which I used for automation testing.
Following images will be shown the feature file steps and step definition files before setting parameters in to feature files. Setting parameters also let us to reduce step definition files.
I learned about the way of transforming key board actions such as ENTER, ALT from cucumber with selenium IDE by following online materials.(12)
http://stackoverflow.com/questions/1629053/typing-enter-return-key-in-selenium
I used http://seleniumeasy.com/ web site for learning more about selenium IDE with cucumber. There I have easy tips on how to work in cucumber. Actually it seems as a foundation guideline for cucumber beginners. (13)
Also I have learned about cucumber parameter settings. Actually cucumber parameters let the cucumber users to decrease the number of step definitions files.Similar files can be called through parameters which has a unique id. (16)
Tuesday, November 10, 2015
2015.11.10
Configure Cucumber in Eclips
After installing cucumber in Eclips, we have to configure cucumber to create feature files. First of all, we have to download all the required jar files which are necessary to enable the cucumber works. Those downloaded jar files are saved in a folder and keep it aside. Those files are
- cucumber-core-1.1.5
- cucumber-html-0.2.3
- cucumber-java-1.1.5
- cucumber-junit-1.1.5
- cucumber-jvm-deps-1.0.3
- cucumber-spring-1.1.5
- gherkin-2.12.1
- hamcrest-all-1.3
- junit-4.11
- selenium-server-standalone-2.48.2
After all, u want to create a java project and then a java class inside of the project. Then have to upload those downloaded referenced libraries in to java project. then you will have to create your java class according to your requirements.
After all these, you can create a feature file within the project with the extension of .feature. Then you can write your scenario and steps of its and then can run the feature file. There you can see whether the scenario is properly working or not. Before you run your feature file, it should be deleted the spring jar file from from libraries. If not your feature file will not be working properly and there will be an error.
Also in a feature file, there can be only one Feature and it should be placed at the beginning of the feature file. Then you can enter scenarios for the feature, There is no limitation for scenarios as in features. There can be many scenarios and all the scenarios must have steps. All the steps should be started from a key word like Given,When, And & Then.
After you run your feature file, you will have results for it. If you have undefined steps in your results, it says that your feature file is active. But if you have defined steps in your results, it says that there is no problem for executing the feature file.
2015.11.10
Feature Files
https://hjrlive.wordpress.com/2014/02/15/test-post/
There is a new technology called Feature files which is used to build scenarios about automation testing. Cucumber is a method of feature files. So I have to install cucumber on my computer for further learning. Cucumber is a method of BDD.
Behaviour Driven Development a.k.a BDD is a software development approach being followed by most of the projects across the BBC. One of the key benefits of BDD is improved communication between technical and non-technical people.
BDD has drastically changed the roles of the members of the agile team. It encourages a collaborative way of working between product owners, business analysts, project managers, developers and test engineers. Please read my post on Eurostar blogs explaining how the tester’s role has changed in BDD.
We use Cucumber as a BDD tool to automate acceptance criteria. Feature files are written in the domain specific language ‘Gherkin’.
The feature title is a short description of the story we are talking about. It should be ideally be a sentence that describes the scope of the story. An example of the feature title for the brand page of the BBC Television programmes looks like this:
Feature : BBC Television brand page
A narrative describes the story in detail with role and benefit. There are two most commonly used format of the narrative.
https://hjrlive.wordpress.com/2014/02/15/test-post/
There is a new technology called Feature files which is used to build scenarios about automation testing. Cucumber is a method of feature files. So I have to install cucumber on my computer for further learning. Cucumber is a method of BDD.
Behaviour Driven Development a.k.a BDD is a software development approach being followed by most of the projects across the BBC. One of the key benefits of BDD is improved communication between technical and non-technical people.
BDD has drastically changed the roles of the members of the agile team. It encourages a collaborative way of working between product owners, business analysts, project managers, developers and test engineers. Please read my post on Eurostar blogs explaining how the tester’s role has changed in BDD.
We use Cucumber as a BDD tool to automate acceptance criteria. Feature files are written in the domain specific language ‘Gherkin’.
Quick Introduction to Gherkin
Gherkin is the domain specific language used in BDD for writing software requirements in the form of feature files. Feature files are written in the Given-When-Then [GWT] format. Feature files usually consist of Feature Title, Narrative, Background, Scenarios, Steps, Tags, Example Tables and Doc Strings.Features
Feature is the user story template. A feature has two components; a feature title and a narrative.The feature title is a short description of the story we are talking about. It should be ideally be a sentence that describes the scope of the story. An example of the feature title for the brand page of the BBC Television programmes looks like this:
Feature : BBC Television brand page
A narrative describes the story in detail with role and benefit. There are two most commonly used format of the narrative.
Prerequisites
If you’re running a completely vanilla system you’ll need
to install a Java Development Kit (JDK). You can check if you have a JDK
via control panel-> programs and features.
The screenshot below shows part of the programs and
features window when the JDK is installed (Java components underlined,
ignore the other items in the list) :
However, if you don’t have it, install it via http://www.oracle.com/technetwork/java/javase/downloads/index.html and install the latest JDK for your OS. If you’re unsure whether you’re running 32 or 64 bit windows see : http://windows.microsoft.com/en-GB/windows7/find-out-32-or-64-bit
If you don’t have Firefox on your system, that will need to
be installed along with Selenium IDE. Selenium IDE isn’t required to
run Webdriver, but it can be very useful especially when learning the
Webdriver API.This tutorial uses Selenium IDE later on.
If Firefox isn’t present then follow these instructions :
-
Download firefox and open it. Note that sometimes Selenium and Firefox v.latest do not work together. If you find this is the case then use a known good combination (todo : insert a good combo here)
-
In Firefox go to http://docs.seleniumhq.org/download/ and click on the Selenium IDE latest version link. This should kick off the installation of the XPI file. Click allow then install now to install all of the components of IDE. When all of the IDE constituent add ons are installed, Firefox will need to be restarted.
-
To check that Selenium IDE has installed properly, hit Alt to bring up the menus in Firefox, then select Tools-> Web Developer, then Selenium IDE should be there as an option at the bottom.
Download the Eclipse IDE :
-
Go to http://www.eclipse.org/downloads/ , select the ‘Eclipse IDE for Java Developers’ for your version of windows (32 or 64 bit) . I’m unsure what the difference is between that and the EE version, but this version appears to be twice as popular!
- Note that there is no installation required. Eclipse comes in the form of a Zip file. Simply open the Zip file and copy the Eclipse directory to a suitable location, such as C:/
- Navigate to the Eclipse directory, right click and select copy on Eclipse.exe and go to your desktop. Paste the item as a shortcut.
- Double click on this desktop icon and Eclipse should open!
Setting up Eclipse
Open Eclipse and set the directory of your choice as your workspace.
Close the welcome screen
Then set the encoding to UTF-8 : Go to
Window->preferences->general->workspace. Set text file encoding
by selecting the other radio button and selecting UTF-8, hit apply.
Failure to set the encoding means all sorts of problems with £ signs and such
Set the compiler preferences :
-
Go to Window->Preferences->Java->Compiler, change Compiler compliance level to 1.8 (or the highest level available) if it is not set already.
Install the Cucumber Plugin into Eclipse :
This plug in enables certain features in Eclipse – e.g. a
nice green cucumber icon for feature files. Also when you double click
on a feature file then it will open the feature in Eclipse rather than
opening notepad.
-
In Eclipse, go to help->install new software
-
Paste the URL : http://cucumber.github.com/cucumber-eclipse/update-site into the ‘Work with’ text box. Press enter once you have pasted the link in. Note that if running behind a proxy server and you get a ‘HTTP Proxy Authentication Required’ error you may need to contact a system administrator to set up your proxy server settings. See http://stackoverflow.com/questions/1940984/how-to-specify-eclipse-proxy-authentication-credentials
-
Click the Cucumber Eclipse Plugin checkbox (select the newer version if there is more than one available), hit next, next, accept the licence agreement and finish
When Eclipse has restarted, create a new project :
-
Go to file-> new-> Java project
-
Give the project the required name e.g. TestProject and accept the defaults. Hit finish.
Monday, November 9, 2015
2015.11.09
Selenium IDE
There is necessity to learn about automation testing. Selenium IDE is one of the most applicable automation testing tool with high efficiency. Selenium, an open source automation
testing tool, offers an Integrated Development Environment (IDE) plug-in
that unifies the tool with desirable Web browser-based test features.
Using Selenium IDE provides easy-to-use record and play back features,
giving even those with no programming expertise, the capability to
create simple scripts.
The most impressive aspect of using selenium IDE is that the user is not required to possess any prior programming knowledge. The minimum that the user needs is the little acquaintances with HTML, DOMS and JavaScript to create numerous test scripts using this tool.
Being a Firefox plug-in, Selenium IDE supports only Firefox, thus the created test scripts could be executed only on Firefox. A few more loopholes make this tool inappropriate to be used for complex test scripts. Thus, other tools like Selenium RC, Web Driver comes into the picture.
Selenium IDE Download and Installation
For the ease of understanding, I have bifurcated the entire IDE installation process in the following chunks/steps.Before taking off, there is one thing that needs to be in place prior to the installation; Mozilla Firefox. You can download it from here => Mozilla Firefox download.
Step #1: Selenium IDE download: Open the browser (Firefox) and enter the URL – http://seleniumhq.org/ . This would open the official Selenium head quarter website. Navigate to the “Download” page; this page embodies all the latest releases of all the selenium components. Refer the following figure.
Step #2: Move under the selenium IDE head and click on the link present. This link represents the latest version of the tool in the repository. Refer the following figure.
Step #3: As soon as we click on the above link, a security alert box would appear so as to safeguard our system against potential risks. As we are downloading the plug-in from the authentic website, thus click on the “Allow” button.
Step #4: Now Firefox downloads the plug-in in the backdrop. As soon as the process completes, software installation window appears. Now click on the “Install Now” button.
Step #5: After the installation is completed, a pop up window appears asking to re-start the Firefox. Click on the “Restart Now” button to reflect the Selenium IDE installation.
Step #6: Once the Firefox is booted and started again, we can see selenium IDE indexed under menu bar -> Web Developer -> Selenium IDE.
Step #7: As soon as we open Selenium IDE, the Selenium IDE window appears.
Features of Selenium IDE
Let’s have a look at each of the feature in detail.(Note – Click to enlarge image if you are not able to read the image text – this is applicable for all images)
#1. Menu Bar
Menu bar is positioned at the upper most of the Selenium IDE window. The menu bar is typically comprised of five modules.- File Menu
- Edit Menu
- Actions Menu
- Options Menu
- Help Menu
File Menu is very much analogous to the file menu belonging to any other application. It allows user to:
- Create new test case, open existing test case, save the current test case.
- Export Test Case As and Export Test Suite As in any of the associated programming language compatible with Selenium RC and WebDriver. It also gives the liberty to the user to prefer amid the available unit testing frameworks like jUnit, TestNG etc. Thus an IDE test case can be exported for a chosen union of programming language, unit testing framework and tool from the selenium package.
- Export Test Case As option exports and converts only the currently opened Selenium IDE test case.
- Export Test Suite As option exports and converts all the test cases associated with the currently opened IDE test suite.
- Close the test case.
The Selenium IDE test cases can be saved into following format:
- HTML format
- java (IDE exported in Java)
- rb (IDE exported in Ruby)
- py (IDE exported in Python)
- cs (IDE exported in C#)
Notice that with the forthcoming newer versions of Selenium IDE, the support to formats may expand.
B) Edit Menu
Edit menu provides options like Undo, Redo, Cut, Copy, Paste, Delete and Select All which are routinely present in any other edit menu. Amongst them, noteworthy are:
- Insert New Command – Allows user to insert the new command/test step anywhere within the current test case.
- Insert New Comment – Allows user to insert the new comment anywhere within the current test case to describe the subsequent test steps.
The new command would be inserted above the selected command/test step.
Now the user can insert the actual command action, target and value.
Insert New Comment
In the same way we can insert comments.
The purple color indicates that the text is representing a comment.
C) Actions Menu
Actions Menu equips the user with the options like:
- Record – Record options fine tunes the Selenium IDE into the recording mode. Thus, any action made by the user on the Firefox browser would be recorded in IDE.
- Play entire test suite – The option plays all the Selenium IDE test cases associated with the current test suite.
- Play current test case – The option plays the current Selenium IDE test case that has been recorded/created by the user.
- Pause / Resume – User can Pause/Resume the test case at any point of time while execution.
- Toggle Breakpoint – User can set one or multiple breakpoint(s) to forcefully break the execution at any particular test step during execution.
- Set / Clear Start Point – User can also set start point at any particular test step for execution. This would enable user to execute the test case from the given start point for the subsequent runs.
- To deal with the page/element loads, the user can set the execution speed from fastest to lowest with respect to the responsiveness of the application under test.
Options menu privileges the user to set and practice various settings provided by the Selenium IDE. Options menu is recommended as one of the most important and advantageous menu of the tool.
Options Menu is primarily comprised of the following four components which can be sub-divided into the following:
Options
Selenium IDE Options dialog box
To launch Selenium IDE Options dialog box, follow the steps:
- Click on Options Menu
- Click on the Options
Selenium IDE Options dialog box aids the user to play with the general settings, available formats, available plug-ins and available locators types and their builders.
Let’s have a look at the few important ones.
General Settings
- Default Timeout Value – Default Timeout Value represents the time (in milliseconds) that selenium would wait for a test step to execute before generating an error. The standard timeout value is 30000 milliseconds i.e. 30 seconds. The user can leverage this feature by changing the default time in cases when the web element takes more/less than the specified time to load.
- Extensions – Selenium IDE supports a wide range of extensions to enhance the capabilities of the core tool thereby multiplying its potential. These user extensions are simply the JavaScript files. They can set by mentioning their absolute path in the text boxes representing extensions in the Options dialog box.
- Remember base URL – Checking this option enables the Selenium IDE to remember the URL every time we launch it. Thus it is advisable to mark it checked. Un-checking this option will leave the base URL field as blank and it will be re-filled only when we launch another URL on the browser.
- Record assertTitle automatically – Checking this field inserts the assertTitle command automatically along with the target value for every visited web page.
- Enable experimental features – Checking this field for the first time imports the various available formats into the Selenium IDE.
Formats tab displays all the available formats with selenium IDE. User is levied with the choice to enable and disable any of the formats. Refer the following figure.
Selenium IDE Plugins
Plug-ins tab displays the supported Firefox plug-ins installed on our instance of Selenium IDE. There are a number of plug-ins available to cater different needs, thus we can install these add-ons like we do other plug-ins. One of the recently introduced plug-in is “File Logging”. In the end of this tutorial, we will witness how to install and use this plug-in.With the standard distribution, Selenium IDE comes with a cluster of following plug-ins:
- Selenium IDE: Ruby Formatters
- Selenium IDE: Python Formatters
- Selenium IDE: Java Formatters
- Selenium IDE: C# Formatters
Locator Builders
Locator builders allow us to prioritize the order of locator types that are generated while recording the user actions. Locators are the set of standards by which we uniquely identify a web element on a web page.
Options
Selenium IDE Options dialog box
To launch Selenium IDE Options dialog box, follow the steps:
- Click on Options Menu
- Click on the Options
Selenium IDE Options dialog box aids the user to play with the general settings, available formats, available plug-ins and available locators types and their builders.
Let’s have a look at the few important ones.
General Settings
- Default Timeout Value – Default Timeout Value represents the time (in milliseconds) that selenium would wait for a test step to execute before generating an error. The standard timeout value is 30000 milliseconds i.e. 30 seconds. The user can leverage this feature by changing the default time in cases when the web element takes more/less than the specified time to load.
- Extensions – Selenium IDE supports a wide range of extensions to enhance the capabilities of the core tool thereby multiplying its potential. These user extensions are simply the JavaScript files. They can set by mentioning their absolute path in the text boxes representing extensions in the Options dialog box.
- Remember base URL – Checking this option enables the Selenium IDE to remember the URL every time we launch it. Thus it is advisable to mark it checked. Un-checking this option will leave the base URL field as blank and it will be re-filled only when we launch another URL on the browser.
- Record assertTitle automatically – Checking this field inserts the assertTitle command automatically along with the target value for every visited web page.
- Enable experimental features – Checking this field for the first time imports the various available formats into the Selenium IDE.
Formats tab displays all the available formats with selenium IDE. User is levied with the choice to enable and disable any of the formats. Refer the following figure.
Selenium IDE Plugins
Plug-ins tab displays the supported Firefox plug-ins installed on our instance of Selenium IDE. There are a number of plug-ins available to cater different needs, thus we can install these add-ons like we do other plug-ins. One of the recently introduced plug-in is “File Logging”. In the end of this tutorial, we will witness how to install and use this plug-in.
With the standard distribution, Selenium IDE comes with a cluster of following plug-ins:
- Selenium IDE: Ruby Formatters
- Selenium IDE: Python Formatters
- Selenium IDE: Java Formatters
- Selenium IDE: C# Formatters
Locator Builders
Locator builders allow us to prioritize the order of locator types that are generated while recording the user actions. Locators are the set of standards by which we uniquely identify a web element on a web page.
E) Help Menu
As Selenium has a wide community and user base, thus various documentations, release notes, guides etc. are handily available. Thus, the help menu lists down official documentation and release notes to help the user.
#2. Base URL Bar
Base URL bar is principally same as that of an address bar. It remembers the previously visited websites so that the navigation becomes easy later on.Now, whenever the user uses “open” command of Selenium IDE without a target value, the base URL would be launched on to the browser.
Accessing relative paths
To access relative paths, user simply needs to enter a target value like “/download” along with the “open” command. Thus, the base URL appended with “/downloads” (http://docs.seleniumhq.org/resources) would be launched on to the browser. The same is evident in the above depiction.
#3. Toolbar
Toolbar provides us varied options pertinent to the recording and execution of the test case.
-
Playback Speed – This option allows user to control the test case execution speed from fast to slow.
Play test suite – This option allows user to execute all the test cases belonging to the current test suite sequentially.
Play test case – This option allows user to execute the currently selected test case.
Pause – This option allows user to pause the current execution.
Step – This option allows user to step into the test step.
-
Rollup– This option allows user to combine multiple test steps to act like a single command.
Record – This option allows user to start/stop the recording of user actions. The hollow red ball indicates the start of the recording session whereas the solid red ball indicates the end of the recording session. By default, the Selenium IDE opens in the recording mode.
#4. Editor
Editor is a section where IDE records a test case. Each and every user action is recorded in the editor in the same order in which they are performed.The editor in IDE has two views, namely:
1) Table View
It is the default view provided by Selenium IDE. The test case is represented in the tabular format. Each user action in the table view is a consolidation of “Command”, “Target” and “Value” where command, target and value refers to user action, web element with the unique identification and test data correspondingly. Besides recording it also allows user to insert, create and edit new Selenese commands with the help of the editor form present in the bottom.
2) Source View
The test case is represented in the HTML format. Each test step is considered be a row <tr> which is a combination of command, target and value in the separate columns <td>. Like any HTML document, more rows and columns can be added to correspond to each Selenese command.
Editor Form lets the user to type any command and the suggestions for the related command would be populated automatically. Select button lets the user to select any web element and its locator would be fetched automatically into the target field. Find button lets the user find the web element on the web page against a defined target. Value is the test input data entered into the targets with which we want to test the scenario.
#5. Test case pane
At the instance we open Selenium IDE interface, we see a left container titled “Test case” containing an untitled test case. Thus, this left container is entitled as Test case pane.
Test case pane contains all the test cases that are recorded by IDE. The tool has a capability of opening more than one test case at the same time under test case pane and the user can easily shuffle between the test cases. The test steps of these test cases are organized in the editor section.
Selenium IDE has a color coding ingredient for reporting purpose. After the execution, the test case in marked either in “red” or “green” color.
- Red color symbolizes the unsuccessful run i.e. failure of the test case.
- Green color symbolizes the successful run of the test case
- It also layouts the summary of the total number of test cases executed with the number of failed test cases.
- If we execute a test suite, all the associated test cases would be listed in the test case pane. Upon execution, the above color codes would be rendered accordingly.
#6. Log Pane
Log pane gives the insight about current execution in the form of messages along with the log level in the real time. Thus, log messages enable a user to debug the issues in case of test case execution failures.
The printing methods / log levels used for generating logs are:
- Error – Error message gives information about the test step failure. It may be generated in the cases when element is not found, page is not loaded, verification/assertion fails etc.
- Warn – Warning message gives information about unexpected conditions.
- Info – Info message gives information about current test step execution.
- Debug – Debug messages gives information about the technicalities in the backdrop about the current test step.
Generating Logs in an external medium
Recently introduced “File Logging” plug-in enables the user to save log messages into an external file. File Logging can be plugged in to IDE like any other plug-in. Upon installation, it can be found as a tab named “File Logging” in the footer beside the Clear button.
Reference Pane
Reference Pane gives the brief description about the currently selected Selenese command along with its argument details.
UI-Element Pane
UI – Element Pane allows Selenium user to use JavaScript Object Notation acronym as JSON to access the page elements. More on this can be found in UI-Element Documentation under Help Menu.
Rollup Pane
Rollup Pane allows the user to roll up or combine multiple test steps to constitute a single command termed as “rollup”. The rollup in turn can be called multiple times across the test case.
Subscribe to:
Comments
(
Atom
)






