Aim :

Description ::SeleniumSelenium is a free automatedautomated testing suite for web applications across different browsers and platforms. It is quite similar to HP QTP only that Selenium focusesfocuses on automating web- based applications.

Procedure: Selenium is not just a single tool but a suite of softwares,softwares, each catering to different testing needs of an orgorganizaanizationtion..ItIt 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 the whole Selenium project for a long time. This is the first automated web testing tool that allowed users to use a programming language they prefer.As of version 22.25.0,.25.0,RC can support the following programming languages:

•• Java •• C#C# •• PHP •• Python •• Perl •• Ruby SelenSeleniumium Grid ::Selenium Grid was developed by Patrick Lightbody to address the need of minimizing test execution times as much as possible. It was capablecapable of capturing browser screenshotsscreenshots during significant 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 automate the browser through a record-and-playback feature. He came up with this idea to further increase the speed in creating test cases.

SeSelenleniuiummWeWebbDrDriviverer ::

•• To use a certain programming lanlanguageguage 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 programmingexperience is required ,though knowledge of HTML and COM isis 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 you toto run tests in paralparallellel, unlike in QTP where you are only allowed to run teststests sequentially.

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

Library Management System Test Plan

Version 1.0

Document Control

PPrreeppaarreeddbby y:: NNaammee DDeessiiggnnaattiioonn::

DDaattee:: SSiiggnnaattuurree::

RReevviieewweedd:: NNaammee DDeessiiggnnaattiioonn::

DDaattee:: SSiiggnnaattuurree::

AApppprroovveeddbby y:: NNaammee DDeessiiggnnaattiioonn::

DDaattee:: SSiiggnnaattuurree::

Revision History

DDaattee VVeerrssiioonn DDeessccrriippttiioonn AAuutthhoorr

2525thth NNoovveemmbbeerr,,22001133 11..00 FFiirrssttvveer rssiioonn TTeessttTTeeaamm

Table of Contents

1.1.Introduc Introductiontion

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

INTRODUCTION The 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 processesprocesses.. OuOurr test grougroupp tested the system bbasedased on therequirement specification.specification.

22.Purpose

To test the Library Management Functionality

2.1Test Scope

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

2.2.Test Milestones

SS..nnoo AAccttiivviittyy OOuuttppuutt DDaattee((dddd//mmmm//yyyyyyyy))

11 TTeessttPPllaannnniinngg TTeessttppllaann 1wweeeekk

22 PPrree AAcccceeppttaannccee TTeesstt ccaassee DDssiiggnniinngg Re acceptance test 2 weeks specification

33 SSyyaatteemm tteesstt ccaassee ddeessiiggnniinngg System test case 3 weeks specification

44 IInntteeggrraattiioonn TTeesstt ccaassee DDeessiiggiinniinngg Integration test case 2 weeks specification

55 EExxeeccuuttee IInntteeggrraattiioonn tteesstt ccaasseess IInntteeggrraattiioonn tteesstt rreeppoorrtt1 wweeeekk

66 EExxeeccuutteessyysstteem mtteesst tccaasseess SSyysstteemmtteesst trreeppoorrtt 1 wweeeekk

77 EExxeeccuuttee PPrree AAcccceeppttaannccee tteesstt ccaasseess Pre Acceptance test 1 week report

3.Project Reference Documents

The Requirements document will be considered as refereerencence document

4.Entry Criteria

4.1 Integration testing

4.2 System testing

4.3 Pre-Acceptance testing

5. Test strategy

TTeessttttyyppeess RReeqquuiirreedd((YY//NN))

Integration testing

FFuunnccttiioonnaalltteessttiinngg YYeess

System testing

FFuunnccttiioonnaalltteessttiinngg YYeess

PPeerrffoorrmmaannccee tteessttiinngg NNoo

LLooaaddtteessttiinngg NNoo

SSttrreesssstteessttiinngg NNoo

GGUUIItteessttiinngg YYeess

Pre AccAccepteptanancecetestintingg tes

FFuunnccttiioonnaalltteessttiinngg YYeess

PPeerrffoorrmmaanncceetteessttiinngg NNoo

LLooaaddtteessttiinngg NNoo

SSttrreesssstteessttiinngg NNoo

GGUUIItteessttiinngg YYeess

5.1 .Integration Testing

5.1.1 Types of testing : Functional testing

Test Objective Verifying the library management system

TTeecchhnniiqquuee BBllaacckkbboox xTTeessttiinng g

CCoommpplleettiioonnccrriitteerriiaa NNAA

SSppeecciiaallccoonnssiiddeerraattiioonnss NNAA

5.2 System testing

5.2.1 Types of testing

Test Objective

Technique

Completion criteria

Special considerations

11 EENNVVIIRROONNMMEENNTTAALL usseeddu 11..11 HHaarrddwwaarree:: Corere22DDuuooCo

1.1.22 SoSoftftwawarere:: MicrcrososofoftMi t WindndowWi owss XP

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

Aim:To learn about automation testing tool

Introduction :

Quick Test Professional , popularly know by its acronym QTP is the functional automation testing tool from Mercury IntInteractiveeractive now acquired by HP. ItIt is now called as HP Functional Test

•• 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 comparisoncomparison to other functional testing tools available.

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

•• Quick Test ProfessiProfessionalonalenabless enable Business Process Testing (BPT)

•• SupporSupportsts largeepoollarg pool ofsoftware software developmendevelopmentt environmentsenvironments likelike SAP , Web , OracleOracle etc.

Flight Reservation

•• Flight Reservation Application comes pre-installed with QTP

•• Using Flight Reservation , yoyouu can bookbook a flightflight betweenbetween two cities,s,citie even modifymodifyor deletedelete and existing existing booking..booking

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

QTP IDE

•• To launch QTP, In Start Menu, Choose ProgramsPrograms > Quick Test ProfessionalProfessional Folder> Quick Test Professional

•• The firfirstst time youyou start QTP,,theQTP the Add-in Manager dialog box opens.It Displays list of all installed 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 describes the new featuresfeatures in this release — including links to more information about these features.

•• Title Bar Displays the name of the active document. If changes have been made since it was last 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 a certain 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 the order in whichwhich they arerea 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 window should appear from the list of available themes.

TESTESTTSTSTEPEPSS

Lets Record Our FirstFirst Script.ForScript.For Our Application Under Test i.e. Flight Reservation --letslets validate a simple test scenario out of possible many The Scenario Would Be"Check that user successfully logs in to the application on inputting valid Agent Name & Password"" Test Steps required to validate this scenario would be Step 1) Open Flight Reservation Application Step 2) Enter Valid Agent Name Step 3) Enter Valid Password Step 4) Press Ok Step 5) Close Application After Successful Login.

RecRecordord A QTPPscrQT scriptipt

In QTP click the record button.The Record and RRunun settingssettings Dialog Box Opens.This box opens automaautomaticalticallyly each timetime youbegin recordinrecordingg a new test..test Record & Run settings shows a tabs corresponding to add-ins installed and loaded for your test..

The Windows Application tab is always available and be used forenvironment environments,s, suchsuch as Visual Basic, ActiveX, and terminal emulators.

•• For any Environment, the Record and Run settings cancan be classified into two generic groups 1) Record & Run on ANY window belonging to that particularparticular environment 2)2) Record & Run on a SPECIFIC window belonbelongingging to thatthat particulparticularar environmentenvironment --whichwhich is

the recommended Option QTP Starts Recoding Mode Step # 1 is to Open Flight Reservation Application Click Start Menu > Program Files > Quick Test Professional > Sample Applications > Flight Reservation Step # 2 Enter a Valid Agent Name greater than 4 characterscharacters say Guru Step # 3 Enter a Valid Password which is by default MERCURY Step # 4 Click Okay Step # 5 CheCheckck that thethe FlighthtFlig Reservatio Reservationn opens successsuccessfullyfully whichwhich it issi . Click thethe close button. All the 5 steps are now recorded In QTP , Stop recording Save the script as "LogIn"

Expert View

•• In the Expert ViViewew, each line represenrepresentsts a Test Step in VB ScriptScript •• To understand expert view better , lets analyze Step # 2 ffromrom our TEST rrecordedecorded earlier

•• An Object's Name is displayed in parentheses following the Object Type.H.Hereree ththeeObObjejectct Name is Login and Object Type is Dialog

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

•• The Operation performed on the object is always displayed at the end of the statement followed by any values associated with the operation.Hereoperation.Here the wordword "Guru" is insertedin the AgentName 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

•• EacEachhcolcolumnumn represents different parts of the steps..

•• Item Column contains the item on which you want to perform the step. This column uses

icons displays the hierarchy of the GUI object on whichwhich 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 Documentation Column

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

•• In fafactct you cancan performperform all operationsoperations like createcreate , modifymodifyinginga step ..using the KeywordKeyword View but to gain mastery over the tool we will restrict ourselves to the Expert View

Understanding the scripts

•• Now , Lets go ahead and understandunderstand our recorded test.t.tes

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

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

•• Step no 3 is PrPressingessing the Tabkey on keyboard to bring Focus from Agent Name FieldField To PassPasswordword FieldField, which is exactlyexactly thisthis step..step

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

•• Next is clicking the okay button

•• Next is closing the application after successful log onon

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

Replay in qtp

•• Now , lets go ahead anandd REPLAY the script to ensure the test steps have recordedrecorded correctly.

•• Click the Run Button.

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

•• This option displdisplaysays the defaultdefault pathand folder name in which resultsresults are stored.stored. By default results are stored in Test Folder .

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

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

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

•• DurinDuringg Replay the scriptscript performedperformed exactly thethe same 5 steps that were recordedrecordedwhich signifies 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 SiSidede is Test ResultsResults Tree --anan icon-basedicon-based view ofof the test steps that were

performed while the test was running. Similar to the test tree in KeKeywordyword View

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

•• You can priprint/ent/exporxporttfull/p full/partart of resulresultstsin HTMLHTML , WordWord or PDF format.

•• You can exports the results to Quality Center

•• You can change the format of Results by usiusingngResul Results.ts.xmxmll and creating a XSL

Parameters in qtp

•• You may be wondering why take the Herculean efforteffort to automateautomate this simple scenario

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

•• The need becomes obvious if we extend the scope of the scenario to include a Combination of valid ALPHANUMEALPHANUMERICRICAgent Name & PasswordPassword

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

•• To achieachieveve thisyou caneither copy the sixsix steps and give differedifferentnt data valuesvalues whichwhich is in

fact something you would do manually. Or you can use Parametrization

•• The easieasiestest way toparame parametriztrizee an argumentargument , in our case Guru is inin KeyworKeywordd view , ClickkClic the Parametrization Icon

•• Value Configuration Dialog Box Opens. Currently the value is set to a Constant. Click on Parameter Radio Button. QTP assigns a default name to these parameter. YoYouu can give a name of of your choice. Click Okay

•• In the Global Sheet , a column with HeadHeaderer "Agent Name"Name" and vvaluealue Guru is created. You can enter 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 the second 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 testtest data and highlights the corresponding row in the data sheet. The results will show summary of the 3 iterations.

Output values in qtp

An output value step ,,isisa step inin whichwhich a objectobject propepropertyrty valuevalue issi capture capturedd at a specific point in your test and stored at a ddesiredesired location.location. The stored values can be used as inputinput at a different 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 data into Global Datasheet. Sheet is named “GLOBAL”

•• LOCAL Datasheet : Equal to number of AActionsctions inthe sheet. An Action can read and write data into its own local Datasheet only. Sheet name == “ACTION NAME”

Result:

Experiment 9 Aim: Study of Any Test Management Tool ( TestDirector)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 alalllthethe test cases and scripts in it. •• Manual testing by defining test steps and procedureproceduress •• Test Execution status •• Defect Management

The TestDirector Testing Process TestDirector guides through the requirements specification,specification, test pplanning,lanning, 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 the decision-making process . •• See what percent of requirements are covered by teststests •• Each requirement in the tree is described in detail,detail, and can include any relevant attachments. The QA tester assigns the requirement a ppriorityriority levellevel which is taken into consideration whenwhen the test team creates the test plan •• Import from Microsoft Word or third party RM tool

Planning Tests The Test Plan Manager enables to divide appapplicationlication 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, uuserser interface, performance, and load  As the tests are alsalsoo linked to defects, this hehelpslps ensure compliance withwith testing requirements throughout the testing process

Running Tests As the application constantly changes, using test lab, run manual and automated tests in the project in order to locate defects and assess qqualiuality.ty.  By creating test sets and choosing whiwhichch tests to includeinclude in each set, test suite can bbee created. A test set is a group of tests in a TestDirector prprojectoject database designeddesigned to achieve specific testing goals.  Tests can be run manually or scheduled to run automautomaticallyatically based on application dependencies.

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 youyou perform the following tasks:  This tool features a sophisticatedsophisticated mechanism for tracking sofsoftwaretware defects, enablinenablingg Testing Team and the project Team to monitor defects closely from initial detection until resolution  By linking TestDirector to e-mail system, defect tracking informinformationation can be shared byby all Development and Management Teams, Testing and Wipro Software Quality Assurance personnel

System Requirements for TestDirector Server 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 SystSystemem configuration : 64 MB of RAM , 10 MB of free disk space, Win 95/98/NT/2K/XP, IE 5 , Netscape 4.7.

TEST LINK

Aim:

Description:

TestLTestLinkink is a web-baweb-basedsed test management system that facilitates software quality assurance. It is

developed and maintained by TeamTeamst.st. Theplatform offers supportsupport for test cases, test suitessuites,, test plans, test projects and user management, as well as various reports and statistics.

Procedure:

Requirements

Because TestLink is web-based software an administratoradministrator needs access to a web server and aa database in order to install and run it. TestLink has support for the MySQL and PostgreSQL databases. 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, descriptidescriptionon and status "Active" check-boxcheck-box.. Description should 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 test case it can either pass, fail or block it. Test cases are organized in test suites. Test Cases have the

following parts:

•• Identifier of a Test Case is assigned automatically by TestLink, and cannot be changed by users. This ID composes from Test Project prefix and a counter related to the Test Project in 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 types

are:also Guest, be created. Test Designer, Senior tester,tester, Tester, Leader andand Administrator but custom rolesroles can

Test Projects

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

Execution : Test Status

Execution is the process of assigning a result (pass, faifail,l, blocked) to a Test Case for a specific Build. A 'Blocked' Test Case is not possiblepossible to test for some reason (e.g. a probleproblemm in 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 trackingtracking systemsystem integrationintegration (Mantis,,,(Mantis JIRA,,la, Bugzil FogBugz,z, FogBug , Redmine, and others)

Result: