ST 8
ST 8
Test Automation is the use software to execute tests rather than executing them manually.
Test Automation sets up the preconditions executes the test compares the actual outcomes to
expected outcomes and reports the results without human interaction. Test automation is
often used to automate regression tests (tests that are run on each iteration of a software
build) to ensure basic functionalities remain stable.
Automated testers must follow the following guidelines to get the benefits of automation:-
HP QTP uses Visual Basic Scripting (VBScript) for automating the applications. The
Scripting Engine need not be installed exclusively, as it is available as a part of the Windows
OS. The Current version of VBScript is 5.8, which is available as a part of Win 7. VBScript
is NOT an object-oriented language but an object-based language.
Advantages of QTP
Disadvantages of QTP
Rational Robot
Rational Robot is a complete set of components for automating the testing of Microsoft
Windows client/server and Internet applications. (Rational Robot user guide)
Bugzilla Tool
Bugzilla is a Defect tracking tool, however it can be used as a test management tool as such
it can be easily linked with other Test Case management tools like Quality Center, Testlink
etc.
This open bug-tracker enables users to stay connected with their clients or employees, to
communicate about problems effectively throughout the data-management chain.
Key features of Bugzilla includes
Step 1) To create a new bug in Bugzilla, visit the home-page of Bugzilla and click
on NEW tab from the main menu
1. Enter Product
2. Enter Component
3. Give Component description
4. Select version,
5. Select severity
6. Select Hardware
7. Select OS
8. Enter Summary
9. Enter Description
10. Attach Attachment
11. Submit
NOTE: The above fields will vary as per your customization of Bugzilla
Summary
Description
Are mandatory
If you do not fill them you will get a screen like below
Step 4) Bug is created ID# 26320 is assigned to our Bug. You can also add additional
information to the assigned bug like URL, keywords, whiteboard, tags, etc. This extra-
information is helpful to give more detail about the Bug you have created.
Loadrunner tool
HP LoadRunner is an automated performance and test automation product for application
load testing: examining system behaviour and performance, while generating actual load. A
software testing tool, HP LoadRunner works by creating virtual users who take the place of
real users' operating client software, such as Internet Explorer, sending requests using the
HTTP protocol to IIS or Apache web servers. HP LoadRunner can simulate thousands of
concurrent users to put the application through the rigors of real-life user loads, while
collecting information from key infrastructure components (Web servers, database servers
etc.) The results can then be analyzed in detail to explore the reasons for particular behavior.
Broadly, LoadRunner supports RIA (Rich Internet Applications), Web 2.0 (HTTP/HTML,
Ajax, Flex and Silverlight etc.), Mobile, SAP, Oracle, MS SQL Server, Citrix, RTE, Mail
and above all, Windows Socket. There is no competitor tool in the market which could offer
such wide variety of protocols vested in single tool.
What is more convincing to pick LoadRunner for performance testing is the credibility of
this tool. LoadRunner has long established reputation as often you will find clients cross
verifying your performance benchmarks using LoadRunner. You'll find relief if you're
already using LoadRunner for your performance testing needs.
LoadRunner is tightly integrated with other HP Tools like Unified Functional Test (QTP) &
ALM (Application Lifecycle Management) with empowers you to perform your end to end
Testing Processes.
LoadRunner Architecture
In a real life situation, these all these 5000 users will not be at homepage but in different
section of the websites. How can we simulate different
VUGen:
So considering the above example, VUGen can record to simulate following business
processes:
Controller
Once a VUser script is finalized, Controller is the main component which controls the Load
simulation by managing, for example:
How many VUsers to simulate against each business process or VUser Group
Behaviour of VUsers (ramp up, ramp down, simultaneous or concurrent nature etc.)
Nature of Load scenario e.g. Real Life or Goal Oriented or verifying SLA
Which injectors to use, how many VUsers against each injector
Collate results periodically
IP Spoofing
Error reporting
Transaction reporting etc.
Taking analogy from our example controller will add following parameter to the VUGen
Script
4) 250 Users are Checking MyAccount Page ONLY after 500 users have done Payment
Processing
Even more complex scenarios are possible
1. Initiate 5 VUsers every 2 seconds till a load of 3500 VUsers (surfing Amzon product
page) is achieved.
2. Iterate for 30 minutes
3. Suspend iteration for 25 VUsers
4. Re-start 20 VUSers
5. Initiate 2 users (in Checkout, Payment Processing , MyAccounts Page) every second.
6. 2500 VUsers will be generated at Machine A
7. 2500 VUsers will be generated at Machine B
As a general practice, Controller resides on a different machine and load is simulated from
other machines. Depending upon the protocol of VUser scripts and machine specifications, a
number of Load Injectors may be required for full simulation. For example, VUsers for an
HTTP script will require 2-4MB per VUser for simulation, hence 4 machines with 4 GB
RAM each will be required to simulate a load of 10,000 VUsers.
Taking Analogy from our Amazon Example, the output of this component will be
Analysis:
Once Load scenarios have been executed, the role of "Analysis" component comes in.
During the execution, Controller creates a dump of results in raw form & contains
information like, which version of LoadRunner created this results dump and what were
configurations.
All the errors and exceptions are logged in a Microsoft access database, named, output.mdb.
The "Analysis" component reads this database file to perform various types of analysis and
generates graphs.
These graphs show various trends to understand the reasoning behind errors and failure
under load; thus help figuring whether optimization is required in SUL, Server (e.g. JBoss,
Oracle) or infrastructure.
Below is an example where bandwidth could be creating bottleneck. Let's say Web server
has 1GBps capacity whereas the data traffic exceeds this capacity causing subsequent users
to suffer. To determine system caters to such needs, Performance Engineer needs to analyse
application behaviour with abnormal load. Below is a graph LoadRunner generates to elicit
bandwidth.
Advantages of loadrunner:
1. No need to install it on the server under test. It uses native monitors. For Ex: perfmon for
windows or rstatd daemon for Unix
2. Uses ANSI C as the default programming language1 and other languages like Java and
VB.
3. Excellent monitoring and analysis interface where you can see reports in easy to
understand colored charts and graphics.
4. Supports most of the protocols2.
5. Makes correlation3 much easier. We will dig into correlation through a series of posts
later.
6. Nice GUI generated script through a one click recording, of course you would need to
modify the script according to your needs.
7. Excellent tutorials, exhaustive documentation and active tool support from HP.
Disadvantages of loadrunner:
1. Programming/Scripting language is used to represent the captured protocol data and
manipulate the data for play-back.
2. Protocol is simply a language that your client uses to communicate with the system.
3. Correlation is a way to substitute values in dynamic data to enable successful playback.
Silk Test
Silk Test is a tool specifically designed for doing REGRESSION AND
FUNCTIONALITY testing. It is developed by Segue Software Inc.
SilkTest is powerful software testing automation tool for running automated test cases on the
front end. It is a tool for testing Web based applications across different browsers. Silk Test
is the industry’s leading functional testing product for e-business applications, whether
Window based, Web, Java, or traditional client/server-based. Silk Test also offers test
planning, management, direct database access and validation, the flexible and robust 4Test
scripting language, a built in recovery system for unattended testing, and the ability to test
across multiple platforms, browsers and technologies.
Mostly anything you can do in a Web browser. You can enter text in text fields, click
buttons, check boxes, get files, and clear your cache with SilkTest.
During SilkTest testing, it interacts with the GUI to submit operations to the application
automatically. Thus SilkTest can simulate the actions of a person who is exercising all the
capabilities of an application and verifying the results of each operation. The simulated user
(SilkTest) is said to be driving the application. The application under test reacts to the
simulated user exactly as it would react to a human user.
SilkTest consists of two software components that execute in separate processes: They are
SilkTest Host Software: This host software is the SilkTest component you use to develop,
edit, compile, run and debug your test scripts and test plans. The machine that runs this
component is often referred to as the host machine.
4Test Agent Software: This SilkTest Agent is the component of SilkTest that interacts with
the GUI of your application. This Agent translates the commands in your 4Test scripts into
GUI specific commands, driving and monitoring the application you are testing. The Agent
can run locally on the same machine on which the Host is running or, in a networked
environment, any number of Agents can run on remote machines. In a networked
environment, the machine that runs the Agent is often referred to as the remote machine
SilkTest compliments the Segue Testing Methodology. This methodology consists of six
phases:
1.Plan.
2.Capture.
3.Create.
4.Run.
5.Report.
6. Track.
1. Plan: You begin the automated testing process by creating a test plan. A test plan is a
document that helps you to plan and manage the testing of your application. You develop test
plans in SilkTest’s test plan editor.
2. Capture: In this capture phase, you introduce SilkTest to the AUT by building a
framework for your testing. First you record a test frame, which is a central repository for
information about your application.
3. Create: After you have defined your test requirements and created a framework for testing
your application, you can begin creating test cases.
4. Run: This run phase consists of selecting one or more test cases and executing them
against your application. You have the option of running individual test scripts, a collection
of test scripts called a suite, or selecting specific test cases (using attributes) in a test plan, or
the entire test plan.
5. Report: During reporting phase, you review statistical information about the running of
each test case. SilkTest automatically records the statistics in a results file when the test case
is executing. From this results file, you can generate pass/fail reports.
6. Track: This is the final phase to identify defects in the application you are testing. If you
want to implement a defect-tracking system, to monitor your application as it progresses
through development and testing to ensure that the application is performing as expected.
SilkTest Features
SilkTest offers a complete solution for the automated testing of Web and client/server
applications.
Selenium is not just a single tool but a suite of software's, each catering to different testing
needs of an organization.
At the moment, Selenium RC and WebDriver are merged into a single framework to
form Selenium 2. Selenium 1, by the way, refers to Selenium RC.
Selenium IDE
Selenium Integrated Development Environment (IDE) is the simplest framework in the
Selenium suite and is the easiest one to learn. It is a Firefox plugin that you can install as
easily as you can with other plugins. However, because of its simplicity, Selenium IDE
should only be used as a prototyping tool. If you want to create more advanced test cases,
you will need to use either Selenium RC or WebDriver.
Java
C#
PHP
Python
Perl
Ruby
WebDriver
The WebDriver proves itself to be better than both Selenium IDE and Selenium RC in
many aspects. It implements a more modern and stable approach in automating the browser's
actions. WebDriver, unlike Selenium RC, does not rely on JavaScript for Automation. It
controls the browser by directly communicating with it.
The supported languages are the same as those in Selenium RC.
Java
C#
PHP
Python
Perl
Ruby
Selenium Grid
Selenium Grid is a tool used together with Selenium RC to run parallel tests across
different machines and different browsers all at the same time. Parallel execution means
running multiple tests at once.
Features:
Advantages of Selenium
2. Selenium IDE -a Firefox plugin that lets testers to record their actions as
they follow the workflow that they need to test.
3. Selenium RC-was the flagship testing framework that allowed more than
simple browser actions and linear execution. It makes use of the full power
of programming languages such as Java, C#, PHP, Python, Ruby and PERL
to create more complex tests.
5. Selenium Grid-is a tool used to run parallel tests across different machines
and different browsers simultaneously which results in minimized execution
time.
Disadvantages of Selenium