documentst

24

Upload: sathvik

Post on 04-Dec-2015

310 views

Category:

Documents


0 download

DESCRIPTION

st

TRANSCRIPT

Aim :Description : Selenium is a free automated testing suite for web applications across differentbrowsers and platforms. It is quite similar to HP QTP only that Selenium focuses on automating web-based applications.

Procedure: Selenium is not just a single tool but a suite of softwares, each catering to different testingneeds of an organization. It has four components.

Selenium Integrated Development Environment (IDE) Selenium Remote Control (RC) Web Driver Selenium Grid

Selenium Remote Control (Selenium RC): Selenium RC was the flagship testing framework of thewhole Selenium project for a long time. This is the first automated web testing tool that allowed users touse a programming language they prefer.As of version 2.25.0, RC can support the followingprogramming languages:

Java C# PHP Python Perl Ruby

Selenium Grid :Selenium Grid was developed by Patrick Lightbody to address the need of minimizingtest execution times as much as possible. It was capable of capturing browser screenshots duringsignificant stages, and also of sending out Selenium commands to different machines simultaneously.

Selenium IDE :Shinya Kasatani of Japan created Selenium IDE, a Firefox extension that can automatethe browser through a record-and-playback feature. He came up with this idea to further increase thespeed in creating test cases.

Selenium Web Driver :

To use a certain programming language in designing your test case. To test applications that are rich in AJAX-based functionalities. To execute tests on the HtmlUnit browser. To create customized test results.

Advantages of Selenium: Very easy to use and install No programming experience is required ,though knowledge of HTML and COM is

required Provides support for extensions Communicates directly to the browser etc.,

Summary

Selenium is more advantageous than QTP in terms of costs and flexibility. It also allows youto run tests in parallel, unlike in QTP where you are only allowed to run tests sequentially.

5. Create a test plan document for any application (e.g. Library Management System)

Library Management SystemTest Plan

Version 1.0

Document Control

Prepared by : Name Designation:

Date : Signature:

Reviewed : Name Designation:

Date : Signature:

Approved by : Name Designation:

Date : Signature:

Revision History

Date Version Description Author

25th November, 2013 1.0 First version Test Team

Table of Contents1. Introduction

2. Purpose

3. Scope

4. References

5. Document overview

6. Software Testing Strategies

a. Unit testing

b. Integration testing

c. Validation testing

d. System testing

7. Features to be tested

9. Features not to be tested

INTRODUCTIONThe Library Management System is an online application for assisting a librarian in managing a

book library in a University. The system would provide basic set of features to add/update clients,add/update books, search for books, and manage check-in / checkout processes. Our test group testedthe system based on the requirement specification.

2.Purpose

To test the Library Management Functionality

2.1Test Scope

To verify the functionality of different features of the Library management system

2.2.Test Milestones

S.no Activity Output Date(dd/mm/yyyy)

1 Test Planning Test plan 1 week

2 Pre Acceptance Test case Dsigning Re acceptance testspecification

2 weeks

3 Syatem test case designing System test casespecification

3 weeks

4 Integration Test case Desigining Integration test casespecification

2 weeks

5 Execute Integration test cases Integration test report 1 week

6 Execute system test cases System test report 1 week

7 Execute Pre Acceptance test cases Pre Acceptance testreport

1 week

3.Project Reference Documents

The Requirements document will be considered as reference document

4.Entry Criteria

4.1 Integration testing

4.2 System testing

4.3 Pre-Acceptance testing

5. Test strategy

Test types Required(Y/N)

Integration testing

Functional testing Yes

System testing

Functional testing Yes

Performance testing No

Load testing No

Stress testing No

GUI testing Yes

Pre Acceptance testing

Functional testing Yes

Performance testing No

Load testing No

Stress testing No

GUI testing Yes

5.1 .Integration Testing

5.1.1 Types of testing : Functional testing

Test Objective Verifying the librarymanagement system

Technique Black box Testing

Completion criteria NA

Special considerations NA

5.2 System testing

5.2.1 Types of testing

Test Objective

Technique

Completion criteria

Special considerations

1 ENVIRONMENTAL used1.1 Hardware: Core2Duo

1.2 Software: Microsoft Windows XP

6.Aim: Study of Any Automation Testing Tool. (Ex:QTP)

Aim:To learn about automation testing tool

Introduction :

Quick Test Professional , popularly know by its acronym QTP is the functional automationtesting tool from Mercury Interactive now acquired by HP. It is now called as HP FunctionalTest

It is an icon based tool, which automates the functional & regression testing of an application

QTP is easier to use and implement for both technical & non technical testers in comparison toother functional testing tools available.

QTP's Scripting Language is VB Script which is easy to use , understand and program

Quick Test Professional enables Business Process Testing (BPT)

Supports large pool of software development environments like SAP , Web , Oracle etc.

Flight Reservation

Flight Reservation Application comes pre-installed with QTP

Using Flight Reservation , you can book a flight between two cities, even modify or deleteand existing booking.

The application has been designed to help learn all the features provided by QTP

QTP IDE

To launch QTP, In Start Menu, Choose Programs > Quick Test Professional Folder > QuickTest Professional

The first time you start QTP, the Add-in Manager dialog box opens.It Displays list of allinstalled add-in along with license expiry date.

It is recommended to select only the add-ins required for your particular testing session .

The Start Page describes the new features in this release—including links to moreinformation about these features.

Title Bar Displays the name of the active document. If changes have been made since it waslast saved, an asterisk (*) is displayed next to the document name in the title bar.

Menu Bar Displays menus of QTP commands.

Toolbars Contains buttons to assist you in managing your document

Document Tabs Enables you to navigate open documents

Keyword View Displays test steps in a graphical representation

Expert View Displays test steps as a VB Script line.

Active Screen Provides a snapshot of your application as it appeared when you performed acertain step during the recording session.

Data Table Assists you to parametrize your test.

Test Flow Displays the hierarchy of actions and action calls in the current test, and shows theorder in which they are run.

Below are Tabs For Other Panes.

You can change the look and feel of the main QTP window, as required

In the QTP window, select View > Window Theme, and then select the way the windowshould appear from the list of available themes.

TEST STEPS

Lets Record Our First Script.For Our Application Under Test i.e. Flight Reservation - letsvalidate a simple test scenario out of possible manyThe Scenario Would Be"Check that user successfully logs in to the application on inputtingvalid Agent Name & Password"Test Steps required to validate this scenario would beStep 1) Open Flight Reservation ApplicationStep 2) Enter Valid Agent NameStep 3) Enter Valid PasswordStep 4) Press OkStep 5) Close Application After Successful Login.

Record A QTP script

In QTP click the record button.The Record and Run settings Dialog Box Opens.This box opensautomatically each time you begin recording a new test.Record & Run settings shows a tabs corresponding to add-ins installed and loaded for yourtest.

The Windows Application tab is always available and be used for environments, such asVisual Basic, ActiveX, and terminal emulators.

For any Environment, the Record and Run settings can be classified into two generic groups1) Record & Run on ANY window belonging to that particular environment2) Record & Run on a SPECIFIC window belonging to that particular environment - which is

the recommended OptionQTP Starts Recoding ModeStep # 1 is to Open Flight Reservation ApplicationClick Start Menu > Program Files > Quick Test Professional > Sample Applications > FlightReservationStep # 2 Enter a Valid Agent Name greater than 4 characters say GuruStep # 3 Enter a Valid Password which is by default MERCURYStep # 4 Click OkayStep # 5 Check that the Flight Reservation opens successfully which it is . Click the closebutton.All the 5 steps are now recordedIn QTP , Stop recordingSave the script as "LogIn"

Expert View

In the Expert View , each line represents a Test Step in VB Script

To understand expert view better , lets analyze Step # 2 from our TEST recorded earlier

An Object's Name is displayed in parentheses following the Object Type.Here the ObjectName is Login and Object Type is Dialog

Objects in Object Hierarchy are separated by a "dot".Here Dialog and WinEdit are fall inthe same Object Hierarchy

The Operation performed on the object is always displayed at the end of the statementfollowed by any values associated with the operation.Here the word "Guru" is inserted in theAgentName Edit Box using the Set Method

Syntax for a statement in expert view is GUI object

Keyword view and expert view

The Keyword View is comprised of a table-like view where

Each step is a separate row in the table and

Each column represents different parts of the steps.

Item Column contains the item on which you want to perform the step. This column usesicons displays the hierarchy of the GUI object on which operation is performed

Operation Column contains the operation to be performed on the item.

Value Column contains the argument values for the selected operation,

QTP automatically documents each step for easy understanding in the DocumentationColumn

Keyword & Expert view contain the same data but arranged in different format.

In fact you can perform all operations like create , modifying a step . using the KeywordView but to gain mastery over the tool we will restrict ourselves to the Expert View

Understanding the scripts

Now , Lets go ahead and understand our recorded test.

The first step is the SystemUtil.Run Command which is used by default by QTP to open aapplication.

Step No 2 is Setting Agent Name as Guru as shown in the Active Screen

Step no 3 is Pressing the Tab key on keyboard to bring Focus from Agent Name Field ToPassword Field , which is exactly this step.

Next Step is Setting the Password as Mercury. QTP automatically encrypts passwordsentered while recording to avoid security breaches.

Next is clicking the okay button

Next is closing the application after successful log on

So the 5 steps mentioned in our test script are recorded in QTP

Replay in qtp

Now , lets go ahead and REPLAY the script to ensure the test steps have recorded correctly.

Click the Run Button.

The Run Dialog Box Opens which enables you to specify the location in which you wantto save the run session results.

This option displays the default path and folder name in which results are stored. By defaultresults are stored in Test Folder .

You may accept the default settings or specify a folder of your choice

Temporary run results folder options saves the run results in a temporary folder. This optionoverwrites any results previously saved in this folder.

Its recommended that while developing your test script choose the Temporary optionand once the script is baseline you can use the new folder option window you can see ayellow marker pointing at the step which is currently being executed.

During Replay the script performed exactly the same 5 steps that were recorded whichsignifies that there were no errors in recording.

Test results in qtp

Lets understand the Test Results generated by QTP

Right Hand Side shows Test Results Summary

Left Hand Side is Test Results Tree - an icon-based view of the test steps that wereperformed while the test was running. Similar to the test tree in Keyword View

You can capture Movie / Screenshots of entire Test Run using Tools > Options > Run Tab

You can print/export full/part of results in HTML , Word or PDF format.

You can exports the results to Quality Center

You can change the format of Results by using Results.xml and creating a XSL

Parameters in qtp

You may be wondering why take the Herculean effort to automate this simple scenario

Check that user successfully logs in to the application on inputting valid Agent Name &Password

The need becomes obvious if we extend the scope of the scenario to include a Combination ofvalid ALPHANUMERIC Agent Name & Password

In this case , the Test Steps Will Remain the Same. But we will have more combinations ofData To TEST. We will restrict to just 3 of possible 8 combinations

To achieve this you can either copy the six steps and give different data values which is infact something you would do manually. Or you can use Parametrization

The easiest way to parametrize an argument , in our case Guru is in Keyword view , Clickthe Parametrization Icon

Value Configuration Dialog Box Opens. Currently the value is set to a Constant. Click onParameter Radio Button. QTP assigns a default name to these parameter. You can give a name ofyour choice. Click Okay

In the Global Sheet , a column with Header "Agent Name" and value Guru is created. You canenter more values for this parameter

Likewise you can also parameterize the argument Password and enter different test data sets.

What this Data sheet means is QTP will iterate the same 6 steps that we have recorded 3 times.During first iteration it will use the data in the first row. During second it will use data in thesecond row and so on

Now lets run the script. This is the first iteration. This is the second iteration

In the status bar QTP gives information of the row, it is currently using as test data andhighlights the corresponding row in the data sheet. The results will show summary of the 3iterations.

Output values in qtp

An output value step ,is a step in which a object property value is captured at a specificpoint in your test and stored at a desired location. The stored values can be used as input at adifferent points in test script. Multiple properties of an object can be selected and outputted.

QTP provides 2 type of datasheets 1) Global & 2) Local

GLOBAL Datasheet : It is Unique for the entire test. Any Action can access and write datainto Global Datasheet. Sheet is named “GLOBAL”

LOCAL Datasheet : Equal to number of Actions in the sheet. An Action can read and writedata into its own local Datasheet only. Sheet name = “ACTION NAME”

Result:

Experiment 9Aim: Study of Any Test Management Tool ( TestDirector)Test Director is a global test management solution which provides communication, organization,

documentation and structure to the testing project.

Test Director is used for Mapping Requirements to User acceptance test cases Test Planning by placing all the test cases and scripts in it. Manual testing by defining test steps and procedures Test Execution status Defect Management

The TestDirector Testing ProcessTestDirector guides through the requirements specification, test planning, test execution, and

defect tracking phases of the testing process.The TestDirector testing process includes four phases:

Specifying Requirements

Requirements are linked to tests and defects to provide complete traceability and aid thedecision-making process .

See what percent of requirements are covered by tests Each requirement in the tree is described in detail, and can include any relevant attachments.

The QA tester assigns the requirement a priority level which is taken into consideration whenthe test team creates the test plan

Import from Microsoft Word or third party RM tool

Planning TestsThe Test Plan Manager enables to divide application according to functionality. Application

can be divided into units, or subjects, by creating a test plan tree.

Define subjects according to: Application functionality-such as editing, file operations, and reporting Type of testing-such as functional, user interface, performance, and load

As the tests are also linked to defects, this helps ensure compliance with testing requirementsthroughout the testing process

Running TestsAs the application constantly changes, using test lab, run manual and automated tests in the

project in order to locate defects and assess quality. By creating test sets and choosing which tests to include in each set, test suite can be created.

A test set is a group of tests in a TestDirector project database designed to achieve specifictesting goals.

Tests can be run manually or scheduled to run automatically based on applicationdependencies.

Tracking Defects

Locating and repairing application defects efficiently is essential to the testing process.Defects can be detected and added during all stages of the testing process. In this phase you performthe following tasks: This tool features a sophisticated mechanism for tracking software defects, enabling Testing

Team and the project Team to monitor defects closely from initial detection until resolution By linking TestDirector to e-mail system, defect tracking information can be shared by all

Development and Management Teams, Testing and Wipro Software Quality Assurancepersonnel

System Requirements for TestDirectorServer System configuration : 128 MB of RAM , 500 MB of free disk space, Win NT server,

Win 2K server, IIS 5.0, MSAccess/Oracle 7.x,8.x,9/MS SQL Server Client System configuration : 64MB of RAM , 10 MB of free disk space, Win 95/98/NT/2K/XP, IE 5 , Netscape 4.7.

TEST LINK

Aim:

Description:

TestLink is a web-based test management system that facilitates software quality assurance. It isdeveloped and maintained by Teamst. The platform offers support for test cases, test suites, testplans, test projects and user management, as well as various reports and statistics.

Procedure:

Requirements

Because TestLink is web-based software an administrator needs access to a web server and adatabase in order to install and run it. TestLink has support for the MySQL and PostgreSQLdatabases. In order to use TestLink, a user only requires a web browser.

Usage

The basic units used by TestLink are: Test Case, Test Suite, Test Plan, Test Project and User

Test Plan

Test Plans are the basic unit for executing a set of test on an application.

Test Plan definition consists from title, description and status "Active" check-box. Descriptionshould include the next information with respect to company processes:

Summary/Scope Features to be tested Features to not be tested Test criteria (to pass tested product) Test environment, Infrastructure Test tools Risks References (Product plan or Change request, Quality document(s), etc.)

Test Plans may be deleted by users with lead privileges.

Test Case

A Test Case describes a simple task in the workflow of an application. After a tester runs a testcase it can either pass, fail or block it. Test cases are organized in test suites. Test Cases have thefollowing parts:

Identifier of a Test Case is assigned automatically by TestLink, and cannot be changed byusers. This ID composes from Test Project prefix and a counter related to the Test Projectin which the Test Case is created.

Title: could include either short description or abbreviation (e.g. TL-USER-LOGIN) Summary: should be really short; just for overview, introduction and references. Steps: describe test scenario (input actions); can also include precondition and clean-up

information here. Expected results: describe checkpoints and expected behaviour of a tested product or

system. Attachments: could be added if configuration allows it. Importance: Test designer could set importance of the test [HIGH, MEDIUM and LOW]. Execution type: Test designer could set automation support of the test

[MANUAL/AUTOMATED] Custom fields: Administrator could define own parameters to enhance Test Case

description or categorization.

User

Each TestLink user has an assigned Role that defines the features available. The default typesare: Guest, Test Designer, Senior tester, Tester, Leader and Administrator but custom roles canalso be created.

Test Projects

Test Projects are the basic organizational unit of TestLink. Test Project includes requirementsdocumentation, Test Specification, Test Plans and specific user rights.

Execution : Test Status

Execution is the process of assigning a result (pass, fail, blocked) to a Test Case for aspecific Build. A 'Blocked' Test Case is not possible to test for some reason (e.g. a problemin configuration disallows to run a tested functionality).

Features

user roles and management grouping of test cases in test specifications test plans platforms requirements with versioning and revisioning support for testing different builds of the software reports, charts and monitors bug tracking system integration (Mantis, JIRA, Bugzilla, FogBugz, Redmine, and others)

Result: