UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
SOFWARE TESTING
LAB MANUAL 1
ENGR. ALI JAVED LECTURER SOFTWARE ENGINEERING DEPARTMENT FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING U.E.T TAXILA E-MAIL: alijaved@uettaxila.edu.pk
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
INTRODUCTION TO SOFTWARE TESTING TOOLS
LAB OBJECTIVE:
The objective of this lab is to get an overview of the following software testing tools. 1. 2. 3. 4. 5. 6. Quick Test Professional (QTP) Win Runner Load Runner Silk Test Test Director Test Partner
QUICK TEST PROFESSIONAL:
Introduction
Quick Test Professional (QTP) is an automated functional Graphical User Interface (GUI) testing tool that allows the automation of user actions on a web or client based computer application. It is primarily used for functional regression test automation. QTP uses a scripting language built on top of VBScript to specify the test procedure, and to manipulate the objects and controls of the application under test.
Testing Process
QTP (Quick Test Professional) lets you create tests and business components by recording operations as you perform them in your application.
Test - A compilation of steps organized into one or more actions, which we can use to verify that our application performs as expected. 1) First step is Planning Before starting to build a test, you should plan it and prepare the required infrastructure. For example, determine the functionality you want to test, short tests that check specific functions of the application or complete site. Decide how you want to organize your object repositories.
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
2)Second step in QTP is Creating Tests or Components We can create a test or component by a) Either recording a session on your application or Web site.
As we navigate through the application or site, Quick Test graphically displays each step we perform as a row in the Keyword View. The Documentation column of the Keyword View also displays a description of each step in easy-to-understand sentences. A step is something that causes or makes a change in your site or application, such as clicking a link or image, or submitting a data form.
OR b) Build an object repository and use these objects to add steps manually in the Keyword View or Expert View. We can then modify your test or component with special testing options and/or with programming statements. 3)Third step is Inserting checkpoints into your test or component. A checkpoint is a verification point that compares a recent value for a specified property with the expected value for that property. This enables you to identify whether the Web site or application is functioning correctly. 4)Fourth step is
Broaden the scope of your test or component by replacing fixed values with parameters. To check how your application performs the same operations with different data you can parameterize your test or component. When you parameterize your test or component, Quick Test substitutes the fixed values in your test or component with parameters
Each run session that uses a different set of parameterized data is called an iteration. We can also use output values to extract data from our test or component. An output value is a value retrieved during the run session and entered into the Data Table or saved as a variable or a parameter. We can subsequently use this output value as input data in your test or component.
5)Fifth step is running the test After creating test or component, we run it. Run test or component to check the site or application.
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
When we run the test or component, QuickTest connects to your Web site or application and performs each operation in a test or component, checking any text strings, objects, or tables you specified. If we parameterized the test with Data Table parameters, Quick Test repeats the test (or specific actions in your test) for each set of data values we defined. Run the test or component to debug it. We can control the run session to identify and eliminate defects in the test or component. We can use the Step Into, Step Over, And Step Out commands to run a test or component step by step. We can also set breakpoints to pause the test or component at pre-determined points. 6)Sixth step is analyzing the results After we run test or component, we can view the results. ? View the results in the Results window. After running the test or component, we can view the results of the run in the Test Results window. We can view a summary of the results as well as a detailed report.
? Report defects identified during a run session.
Win Runner
Introduction
WinRunner, Mercury Interactive’s enterprise functional testing tool. It is used to quickly create and run sophisticated automated tests on your application. Winrunner helps you automate the testing process, from test development to execution. You create adaptable and reusable test scripts that challenge the functionality of your application. Prior to a software release, you can run these tests in a single overnight run- enabling you to detect and ensure superior software quality.
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
WinRunner(Features & Benefits)
Test functionality using multiple data combinations in a single test WinRunner's DataDriver Wizard eliminates programming to automate testing for large volumes of data. This saves testers significant amounts of time preparing scripts and allows for more thorough testing. Significantly increase power and flexibility of tests without any programming The Function Generator presents a quick and error-free way to design tests and enhance scripts without any programming knowledge. Testers can simply point at a GUI object, and WinRunner will examine it, determine its class and suggest an appropriate function to be used. Use multiple verification types to ensure sound functionality WinRunner provides checkpoints for text, GUI, bitmaps, URL links and the database, allowing testers to compare expected and actual outcomes and identify potential problems with numerous GUI objects and their functionality. Verify data integrity in your back-end database Built-in Database Verification confirms values stored in the database and ensures transaction accuracy and the data integrity of records that have been updated, deleted and added. View, store and verify at a glance every attribute of tested objects WinRunner’s GUI Spy automatically identifies, records and displays the properties of standard GUI objects, ActiveX controls, as well as Java objects and methods. This ensures that every object in the user interface is recognized by the script and can be tested. Maintain tests and build reusable scripts The GUI map provides a centralized object repository, allowing testers to verify and modify any tested object. These changes are then automatically propagated to all appropriate scripts, eliminating the need to build new scripts each time the application is modified.
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
Test multiple environments with a single application WinRunner supports more than 30 environments, including Web, Java, Visual Basic, etc. In addition, it provides targeted solutions for such leading ERP/CRM applications as SAP, Siebel, PeopleSoft and a number of others.
Load Runner
Introduction
LoadRunner is an industry-leading performance and load testing product by Hewlett-Packard (since it acquired Mercury Interactive in November 2006) for examining system behavior and performance, while generating actual load. LoadRunner can emulate hundreds or 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 analysed in detail, to explore the reasons for particular behaviour. Consider the client-side application for an automated teller machine (ATM). Although each client is connected to a server, in total there may be hundreds of ATMs open to the public. There may be some peak times — such as 10 a.m. Monday, the start of the work week — during which the load is much higher than normal. In order to test such situations, it is not practical to have a testbed of hundreds of ATMs. So, given an ATM simulator and a computer system with LoadRunner, one can simulate a large number of users accessing the server simultaneously. Once activities have been defined, they are repeatable. After debugging a problem in the application, managers can check whether the problem persists by reproducing the same situation, with the same type of user interaction.
The LoadRunner Testing Process
There are five steps in LoadRunner Testing Process:
Step I: Planning the Test
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
Successful load testing requires that you develop a thorough test plan. A clearly defined test plan will ensure that the LoadRunner scenarios that you develop will accomplish your load testing objectives. Step II: Creating the Vuser scripts
Vusers emulate human users interacting with your client/server system. A Vuser script contains the actions that each virtual user performs during scenario execution.
In each Vuser script you determine the tasks that will be:
performed by each Vuser performed simultaneously by multiple Vusers measured as transactions
Step III: Creating the Scenario
A scenario describes the events that occur during a client/server testing session. A scenario includes a list of machines that "host" Vusers; a list of Vuser scripts that the Vusers run; and a list of Vusers that run during the scenario. You create scenarios using the LoadRunner Controller. Creating the List of Hosts to Run Vusers For each scenario, you create a list of hosts--machines configured to execute Vuser scripts. Creating the List of Vuser Scripts For each scenario, you create a list of scripts that Vusers run during scenario execution. Creating the Vusers To each Vuser in a scenario, you assign a Vuser script and a host to run the script.
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
Step IV: Running the Scenario
You emulate user load on the server by instructing multiple Vusers to perform tasks simultaneously. You can set the level of load by increasing and decreasing the number of Vusers that perform tasks at the same time. Before you run a scenario, you set the scenario configuration. This determines how all the hosts and Vusers behave when you run the scenario. For each scenario, you create a list of scripts that Vusers run during scenario execution. You can run the entire scenario, individual Vusers, or groups of Vusers (Vuser Groups). While a scenario runs, LoadRunner measures and records the transactions that you defined in each Vuser script. Step V: Analyzing Test Results
During scenario execution, LoadRunner records the performance of the client/server system under different loads. You use LoadRunner's graphs and reports to analyze the server's performance.
Test Director
Introduction
TestDirector, the industry’s first global test management solution, helps organizations deploy highquality applications more quickly and effectively. Its four modules Requirements, Test Plan, Test Lab, and Defects are seamlessly integrated, allowing for a smooth information flow between various testing stages. The completely Web-enabled TestDirector supports high levels of communication and collaboration among distributed testing teams, driving a more effective, efficient global applicationtesting process.
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
TestDirector Features & Benefits
Supports the entire testing process TestDirector incorporates all aspects of the testing process requirements management, planning, scheduling, running tests, issue management and project status analysis into a single browser-based application. Leverages innovative Web technology Testers, developers and business analysts can participate in and contribute to the testing process by working seamlessly across geographic and organizational boundaries. Uses industry-standard repositories TestDirector integrates easily with industry-standard databases such as SQL, Oracle, Access and Sybase. Links test plans to requirements TestDirector connects requirements directly to test cases, ensuring that functional requirements have been covered by the test plan. Integrates with Microsoft Office TestDirector can import requirements and test plans from Microsoft Office, preserving your investment and accelerating your testing process. Manages manual and automated tests TestDirector stores and runs both manual and automated tests, and can help jumpstart a user’s automation project by converting manual tests to automated test scripts. Accelerates testing cycles
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
TestDirector's TestLab manager accelerates the test execution cycles by scheduling and running tests automatically—unattended, even overnight. The results are reported into TestDirector’s central repository, creating an accurate audit trail for analysis. Supports test runs across boundaries TestDirector allows testers to run tests on their local machines and then report the results to the repository that resides on a remote server. Integrates with internal and third-party tools Documented COM API allows TestDirector to be integrated both with internal tools (e.g., WinRunner and LoadRunner) and external third-party lifecycle applications.
Silk Test
Introduction
Silk Test is a tool specifically designed for doing REGRESSION AND FUNCTIONALITY testing. It is developed by Segue Software Inc. Silk Test is the industry’s leading functional testing product for ebusiness 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, and the ability to test across multiple platforms, browsers and technologies.
THE AUTOMATED TESTING PROCESS
The testing process has these 4 steps :
Creating a testplan (if you are using the testplan editor) Recording a test frame. Creating testcases Running testcases and interpreting their results.
Creating a testplan
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
If the testplan editor is used, the automated testing process is started by creating a testplan. A basic testplan is structured as a hierarchical outline and contains:
Descriptions of individual tests and groups of tests. As many levels of description can be used. Statements that link the test descriptions in the plan to the 4Test routines, called testcases, that accomplish the actual work of testing.
Recording a test frame Next, record a test frame, which contains descriptions, called window declarations, of each of the GUI objects in your application. A window declaration specifies a logical, cross-platform name for a GUI object, called the identifier, and maps the identifier to the object’s actual name, called the tag. In addition, the declaration indicates the type of the object, called its class. Creating testcases The 4Test commands in a testcase collectively perform three distinct actions :
Drive the application to the state to be tested. Verify the state (this is the heart of the testcase). Return the application to its original state.
The powerful object-oriented recorder can be used to automatically capture these 4Test commands to interact with the application, or to white the 4Test code manually if one is comfortable with programming languages. For maximum ease and power, these two approaches can be combined, recording the basic testcase and then extending it using 4Test’s flow of control features. Running test cases and interpreting results Next, run one or more testcases, either by running a collection of scripts, called a suite, or, if you are using the testplan editor, by running specific portions of the testplan. As each testcase runs, statistics are written to a results file. The results file and its associated comparison tools allow you to quickly pinpoint the problems in your application.
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
SILK TEST FEATURES
Platform Independent Silk Test doesn’t care about how the application is created, in which software the application is written, what kind of design is used, which browser it is being worked, in which operating system the application is running. All that needs for an application to be tested using silktest is that it needs a frame (like window) Browser Independent There are various kinds of browsers used by various people for running their applications. The user may use any browser of his choice to test the standard application. Each and every browser acts differently with different applications. They show the same page differently. The web objects they display can also be aligned or displayed in different manner. SilkTest just looks at these browser contents as objects and hence they cannot avoid any images, texts, that they are not identifiable. Also we can write a test in one browser and run it in any other browser (to some extend). i.e, using SilkTest, we can do cross browser testing. Technology Independent Silktest does not care how the application was built. It seamlessly works with the different web technologies commonly used today. How to use the same code for multiple browsers: Start writing the silk scripts. Capture the window declarations (.inc file) and write the .t file. Say if you are capturing the declarations from Internet Explorer & run successfully on it. As we captured the declarations from I.E., we now have to make the same test case run on Netscape since the tag value changes from multiple browsers. Testing the Windows based applications Testing the Java based applications
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
Test Partner
Introduction
IT managers charged with ensuring application quality are confronted with a number of critical business challenges:
Verify that applications function as expected and fulfill business requirements Test multiple heterogeneous application technologies Meet ever-more-rapid release schedules Achieve the right balance between risk and quality.
If that weren't enough, IT struggles with limited resources, hard deadlines that squeeze testing cycles and late-breaking requirement changes. In the face of these business demands, TestPartner's functional testing capabilities accelerate testing and enable successful application delivery outcomes on-time, at a lower cost, with higher quality than ever before. TestPartner achieves these results through a tiered approach to testing that enables developers, quality experts, and non-technical application users to collaborate and test more in the time available.
TestPartner's visual, contextual approach to capturing business processes empowers non-technical application users to participate in the testing process. At the same time, TestPartner provides expert testers and software developers with access to Visual Basic for Applications, allowing them to solve even the most complex testing challenges. This flexibility and focus on usability allows quality teams to produce positive results even with minimal training.
TestPartner enables IT to: 1. Leverage non-technical as well as experienced testers to test applications more thoroughly in the time available 2. Collaborate throughout the software development lifecycle, resulting in higher team efficiency and greater project effectiveness 3. Automate regression testing to quicken acceptance of application patches, service packs, and other regular updates
SOFTWARE TESTING
8th Term-SE
UET Taxila
UNIVERSITY OF ENGINEERING AND TECHNOLOGY, TAXILA
FACULTY OF TELECOMMUNICATION AND INFORMATION ENGINEERING
SOFTWARE ENGINEERING DEPARTMENT
4. Clearly and unambiguously document test results, accelerating the identification and resolution of application issues 5. Understand the results of testing, enabling confident delivery of applications that meet requirements and provide the expected business value 6. Use test results to facilitate test maintenance, providing improved return on the test automation investment 7. Build quality into applications earlier in the life cycle, leading to lower development and maintenance costs 8. Accelerate quality efforts for a broad range of technology platforms, including Web, .NET, Java, SAP, Oracle and many other distributed Windows-based applications. TestPartner's value is further enhanced through its tight integration with Compuware's Test Management solution, which improves application delivery by providing IT with the ability to more effectively assess and balance risk, cost, and schedule. TestPartner is also an integral component within Quality Management, which provides IT with the ability to control, measure, manage and continuously improve the delivery of higher quality applications. Quality Management's reporting and real-time insight into project quality status results in informed quality decisions, and allows IT to deploy applications with greater confidence.
SOFTWARE TESTING
8th Term-SE
UET Taxila