Monday, September 17, 2007

Quality Assurance Software Testing levels:

Testing is applied to different types of targets, in different stages or levels of work effort. These levels are distinguished typically by those roles that are best skilled to design and conduct the tests, and where techniques are most appropriate for testing at each level. It's important to ensure a balance of focus is retained across these different work efforts.

Developer Testing
Developer testing denotes the aspects of test design and implementation most appropriate for the team of developers to undertake. In most cases, test execution initially occurs with the developer-testing group who designed and implemented the test, but it is a good practice for the developers to create their tests in such a way so as to make them available to independent testing groups for execution.

Independent Testing
Independent testing denotes the test design and implementation most appropriately performed by someone who is independent from the team of developers. In most cases, test execution initially occurs with the independent testing group that designed and implemented the test, but the independent testers should create their tests to make them available to the developer testing groups for execution.

The other levels include:
Independent Stakeholder Testing- testing that is based on the needs and concerns of various stakeholders
Unit testing - Unit testing focuses on verifying the smallest testable elements of the software.
Integration testing - to ensure that the components in the implementation model operate properly when combined to execute a use case.
System Testing - Usually the target is the system's end- to-end functioning elements
Acceptance Testing - to verify that the software is ready, and that it can be used by end users to perform those functions and tasks for which the software was built.

Key Measures of Quality Assurance Software Testing

The key measures of a test include Coverage and Quality. Test Coverage is the measurement of testing completeness. It is based on the coverage of testing expressed by the coverage of test requirements and test cases or by the coverage of executed code. Test coverage includes requirements based coverage and code based coverage. Quality is a measure of the reliability, stability, and performance of the target-of-test (system or application-under-test). Quality is based on evaluating test results and analyzing change requests (defects) identified during testing.

Advantages of Quality Assurance Software Testing

The most effective way to reduce risk is to start testing early in the development cycle and to test iteratively, with every build. With this approach, defects are removed as the features are implemented. The testing of the application is completed shortly after the final features are coded, and as a result the product is ready for release much earlier. Additionally, the knowledge of what features are completed (i.e. both coded and tested) affords management greater control over the entire process and promotes effective execution of the business strategy. Testing with every iteration may require some additional upfront planning between developers and testers, and a more earnest effort to design for testability; but these are both inherently positive undertakings, and the rewards are substantial.
There are several key advantages gained by testing early and with every build to close the quality gap quickly:
Risk is identified and reduced in the primary stages of development instead of in the closing stages. ·
Repairs to problems are less costly.
The release date can be more accurately predicted throughout the project.
Results will be given by the way of requirement.
The product can be shipped sooner.
The business strategy can be executed more effectively.
Transparency established.
Artifacts can be reused for regression testing.
Not bound to any particular vendor.

Software Testing Procedure

A good test effort is driven by questions such as:
How could this software break?
In what possible situations could this software fail to work predictably?
Software testing challenges the assumptions, risks, and uncertainty inherent in the work of other disciplines, and addresses those concerns using concrete demonstration and impartial evaluation.
Testing focuses primarily on evaluating or assessing product quality, which is realized through the following core practices:
Find and document defects in software quality.
Advise on the perceived software quality.
Validate and prove the assumptions made in design and requirement specifications through concrete demonstration.
Validate that the software product works as designed.
Validate that the requirements are implemented appropriately.

The Need for Quality Assurance Software Testing

There are two major industry trends adding to the pressure. The first is accelerated release cycles. As Business Week put it, "A year's worth of change happens in a couple of months-a pace known as 'Internet Time.' .And that's the problem. The whole industry is operating on Internet Time...". Second, while releases are more frequent and cycles shorter, the cost of failure has increased dramatically. Just a few years ago, when client server products were at the cutting edge, releases were, perhaps, annual and the expected number of users was known well in advance, because all the users were employees. An organization could mitigate a system failure with a manual backup; for example, orders could be taken by hand while the system was down.
But as huge portions of the business were overhauled, and these systems addressed larger user populations, releases became more frequent, and system failures commonly meant that no orders could be taken at all. Today with E-commerce applications, releases can occur two or three times per month. Now, the user base is a large but unknown number of customers, not employees. System failures are highly visible and can cause customers to run to the competition.
These trends have several serious implications for project managers. The high cost of failure means that deploying untested software is simply not an option. Additionally, every aspect of quality needs validation, not just one or two. Accelerated release cycles drive the need for automated testing in which tests are easy to create, maintain and reuse. There is just too much to do in too little time to rely on manual methods.
A continuous approach to quality, initiated early in the software lifecycle, can lower the cost of completing and maintaining the software significantly. This greatly reduces the risk associated with deploying poor quality software.

The Importance of Quality Assurance Software Testing

Software Quality Assurance Testing is an integral and critical phase of any software development project. Developers and testers must ensure that newly developed products or product enhancements meet functional and performance requirements and that those products are reliable and able to operate consistently under peak loads. The risks of releasing a product that is not yet ready are greater now than ever before because of the change in expectations and demands of the end users.
According to the Standish group's research report on Project Failure and Success nearly three out of four software projects are either delivered late, over budget or are cancelled before being completed. This is true despite the involvement of experienced managers, developers and testers in the project. This is a problem that continues till date. The anxiety induced by the question "Are we ready to release?" affects every member of the team. Management dreads having to ask it for fear of hearing an unqualified "No" or even worse.

Sunday, September 16, 2007

Test Director Related Interview Questions

Q: What is TestDirector?
TestDirector is a test management tool produced by Mercury Interactive. Its four modules - Requirements, Test Plan, Test Lab and Defects Manager - are integrated to enable information to flow smoothly between different stages of the testing process. Completely Web-enabled, TestDirector supports communication and collaboration among distributed testing teams. TestDirector has been classified in the following categories:Defect TrackingTesting and AnalysisDebuggingAutomated Software Quality (ASQ)

Q: What is the use of Test Director software?
TestDirector is Mercury Interactive's software test management tool. It helps quality assurance personnel plan and organize the testing process. With TestDirector you can create a database of manual and automated tests, build test cycles. TestDirector is not used for executing any actual test activity but it is a test management tool used for Requirements Management, Test Plan, Test Lab, and Defects Management. Even if the individual test cases are not automated, TestDirector can make life much easier during the test cycles.

Q: How you integrated your automated scripts with TestDirector?
When you work with WinRunner, you can choose to save your tests directly to your TestDirector database or while creating a test case in the TestDirector we can specify whether the script in automated or manual. And if it is automated script then

Q: Is there any possibility to restrict duplication of defects being created in TD?
No Way. The only thing we can do is to find the similar defects and delete or close them.

Q: What is Quality Center( Test Director)?
You can use Quality Center to create a project (central repository) of manual and automated tests and components, build test cycles, run tests and components, and report and track defects. You can also create reports and graphs to help you review the progress of test planning, runs, and defect tracking before a software release. When you work in QuickTest, you can create and save tests and components directly to your Quality Center project. You can run QuickTest tests or components from Quality Center and then use Quality Center to review and manage the results. You can also use Quality Center with Business Process Testing support to create business process tests, comprised of the components you create in either QuickTest or Quality Center with Business Process Testing support.
Q: After creating the test cases in excel and exported to TD. How does test director know the headings?
To export the test cases from spreadsheet to TD there are 8 steps. In 6th step we need to map the Td fields with corresponding Spreadsheet columns. Hence you are the mapping so you can map according to your specifications.

Q: How to use TestDirect like a Dashboard?

The new version of TD (TestDirector for Quality Center) should provide you with that. If you not want to upgrade, you have to design your own "start page", include the apps and bits you want to display, and use code to extract data from TD.

Q: Can you retrieve a test case once you have deleted them in Test Director ?
In Quality Center, if you delete entire folder with tests, the tests get stored in Unattached folder. But if you just deleted 'individual' tests, they are GONE! and can't be retrieved. Not sure if Test Director has the same behaviour/functionality. There are 2 options in QC. one is remove and another is delete. the diffrence is that .once it is remove it is removed from test set but avail in QC directory. If it is deleted, you can't retrive. If you press delete that will delete from that QC directory also.

Q: How do we import testcases written in Excel to Test Director
Use Mecury Interactive Microsoft Excel Add-in for importing test cases written in excel sheet. It is available on Add-ins page. Select the rows in excel which you want to upload to TD Then select export to TD option under tools menu

Q: Is it necessary to learn Test Director for beginners
Test director is a test mangement tool, it is used across all major organizations and is generally used for management of all test activities in organization. It is important to learn this tool, but for beginners it is enough to understand how to log defects into it and how to run tests using it.

Q: Can you please explain the procedure of connecting TestDirector in QTP?
To connect to TD from QTP follow the steps...Open Qtp ==> Tools ==> Select TestDirector Connection ==> In Server Connction Box Enter TD address(URL of TD) ==> Click Connect==> In project Connection Box Enter the Details Domain,Project,User name and Password ==> Click Connect If you want to reconnect on startup check the reconnect on startup and save password for reconnection on startup. Then close.

Q: What are the various types of reports in TestDirector?
For each and every phase we can get reports, like for requirements, test cases, and test run. There are some types of reports also available like report summary, progress report and requirements coverage report. Each and every test director client tool consists of a menu bar Analysis. By using this menu you can crate reports in table format. You can generate graphs. All graphs options in maths are supported. And you can create various types of charts too.

Q: TD (Quality Center 9.0) how can you run automated test cases?
While designing your test steps in QC for automation tests in test plan module, Test Script tab is availble. You can generate script here or copy from your automatioon tool. While running your tests, it will ask for on which host you want to run. You need to select the system in your network. Then run it. Before going to run your script in a system, the automation tool, like WinRunner, must be installed on that system. Otherwise you will get an error.

Q: Can we add user defined fields to Test Director?
Yes. We can add the user defined fields using TD 8.0, But you need to have admin priviliges to this.

Q: How do we attach Excel sheet with test director?
This function is for getting datatable(excel sheet) in test director. Try to use it and as vbs file and call this function to get ur datatable. GetAttachment(FileName, OutPath) FileName The name of the attachment that needs to be copiedOutPath The folder location where the file needs to be storedReturn value The full path where the file has been copied on the local file systemExample:FilePath = GetAttachment("test.pdf", "C:")MsgBox "Your file is here:" & FilePathThe GetAttachmentFromTest finds the attachment associated to the given test name and stores it in a local folder.GetAttachmentFromTest(TestName, FileName, OutPath)TestName The name of the test where the attachment is locatedFileName The name of the attachment that need to be copiedOutPath The folder location where the file needs to be storedReturn value The full path where the file has been copied on the local file systemExample:FilePath = GetAttachmentFromTest("Attachment", "hello.vbs", "C:aa")MsgBox "Your file is here:" & FilePath

Q: What is the use of Test Lab in Test director?
Test Lab can be used to create a test set. You can add one or many test cases into a test set. Then run all test cases in a test set together and change the status as pass/fail.

Q: Can we map the Defects directly to the requirements (not thru the test cases) in the Test Director?
Yes. Create your req. structure.Create the test case structure and the test casesMap the testcases to the apr. req.Run and report bugs from your test cases in the test lab module.The database structure in TD is mapping testcase to defects, only if you have created the bug from the apr. test case. Maybe you can update the mapping by using some code in the bug script module (from the customize project funktion), as fare as I know, its not possible to map defects directly to an req.

Q: How do I run reports from Test Director?
This is how you do it:1. Open the test director project.2. Display the requirements module.3. Chose reportAnalysis > Reports > Standard Requirements Report.

Q: Can we export the files from Test director to Excel Sheet? If yes then how?
Design tab -- Right click -> go to save as -> select excel and save it Requirement tab -- Right click on main req/ click on export/ save as word, excel or other template. This would save all the child requirement. Test plan tab-- only individual test can be exported. No parent--child export is possible.Select a test script. click on the design steps tab. right click anywhere on the open window. click on export and save as.... Test lab tab-- select a child group. Click on execution grid if it is not selected. right click anywhere . default save option is excel. but can be saved in doc and other formats. select 'all' or 'selected' option. defects tab -- right click anywhere on the window, export all or 'selected' defects and save excel sheet or document

Q: Can we upload test cases from an excel sheet into Test Director?
Yes, you can do that. Go to Add In menu in TestDirector, find the Excel add in, and install it in you machine. Now open excel, you can find the new menu option export to Test director. Rest of the procedure is self explanatory

Q: How can we map a single defect to two test scripts? Is there a way in test director so that we can state that defect defect X is same for test script A and test script B?
No way. When you run a script, you find and generate a defect report. In other words, every defect report is unique to a single test script.

Q: How can we create our own Defect Template from Test Director? Is it possible in Test Director? If possible how we can Create our Own Template?
You can not create your own template for defect reporting in Test Director but you can customize the Template in Test Director

Q: How can we export multiple test cases from TD in a single go?
Open any test and click on the tab 'design step'. Once it opens, you can right click on the first cell and export into any format .

Q: How to customize the reports generated?
This depends a lot of what you are interested in "reporting on". You have to combine both SQL and VB script to extract data from TD to Excel. Its also possible to "customize" the standard reports given from the "analyze" tab, this is written in XML if you are familiar with this language. If you log in to Mercury support you will be able to find a lot of code examples.

Q: How many tabs in TestDirector and explain them?
there are 4 tabs available in Testdirector.1. Requirement -> to track the customer requirenments2. Testplan -> to design the testcases & to store the testscripts3. Testlab -> to exectue the testsets & track the results4. Defect -> to log a defect & to track the logged defects

Q: How to map requirements with testcases in TestDirector?
1. In requirements TAB select coverage view.2. Select requirement by clicking on Parent/Child or grand Child.3. On right hand side (in Coverage View Window) another window will appear. It has two TABS (a) Tests Coverage (b) Details. Test Coverage TAB will be selected by default or you click it.4. Click on Select Tests Button. A new window will appear on right hand side and you will see a list of all tests. You can select any test case you want to map with you requirement.

Q: How to use TestDirector in real time projects?
Once completed the preparing of the test cases.1. Export the test cases in to Test Director. ( it will contain total 8 steps).2. The test cases will be loaded in the Test Plan module.3. Once the execution is started, we move the test cases from Test Plan tab to the Test Lab module.4. In Test Lab, we execute the test cases and put as pass or fail or incomplete. We generate the graphs in the test lab for daily report and sent to the onsite (where ever you want to deliver).5. If you got any defects and raise the defect in the defect module. When raising the defect ,attach the defect with the screen shot.

Q: How can we add requirements to test cases in Test Director?
You can add requirements to test cases in two ways; either from Requriements tab or Test Plan tab. Navigate to the appropriate Requirement and right click, you can find the menu to map the test case and the vice versa is available in Test plan tab.

Q: What does Test Grid contains ?
The Test Grid displays all the tests in a TestDirector project. The Test Grid contains the following key elements: Test Grid toolbar, with buttons of commands commonly used when creating and modifying the Test Grid. Grid filter, displaying the filter that is currently applied to a column. Description tab, displaying a description of the selected test in the Test Grid. History tab, displaying the changes made to a test. For each change, the grid displays the field name, date of the change, name of the person who made the change, and the new value.

Q: How to generate the graphs in Test Director ?
An1:Open test director and then click the Analysis you will find three type of graphs Planning Progress Graphs Planning Summary Graphs Defect Age Graph Click any of one and you can generate the graphs..
An2:The generation of graphs in the Test Director that to Test Lab module is :1. Analysis2. Graph3. Graph Wizard4.Select the graph type as Summary and click the Next button.5.Select the show current tests and click the next button.6.Select the Define a new filter and click the Filter button.7. Select the test set and click the Ok button.8.Select the Plan : subject and click the ok button.9. Select the Plan: Status10 Select the test set as x- Axis11. Click the Finish button.

Q: What is the difference between Master test plan and test plan?
Master test plan is the doccumaent in which each and every functional point is validated. Test case docuument contains test cases, Test case is the perception with which probability of finding the defect is more.

Q: What is the main purpose of storing requirements in Test Director?
In TestDirector(Requirement Tab) We Stores Our Project Requirement documents according to our modules or functionality of the applications. This helps us to makes sures that all requirements are covered when we trace developed Test Case/Test Script to the requirements. This helps QA Manager to review what extent the requirements are covered.

Q: What are the 3 views and what is the purpose of each view?
The 3 views of requirment are:1)Document View-tabulated view2)Coverage View-establish a relationship between requirement and the test assosiated with them along with their execution status.Mostly the requirements are written in this view only.3)Coverage analysis view-show a chart with requirementassociated with the test,and execution status of the test.

Q: How many types of reports can be generated using TestDirector?
Reports on TestDirector display information about test requirements, the test plan, test runs, and defect tracking. Reports can be generated from each TestDirector module using the default settings, or you can customize them. When customizing a report, you can apply filters and sort conditions, and determine the layout of the fields in the report. You can further customize the report by adding sub-reports. You can save the settings of your reports as favorite views and reload them as needed.

Q: How will you generate the defect ID in test director? Is it generated automatically or not?
The Defect ID will be generated automatically after the submission of the defect..

Q: How do you ensure that there are no duplication of bugs in Test Director?
In the defect tracking window, at the top we can see the find similar defect icon. If we click after writing our defect, if any of the tester already added the similar defect it will tell. Else we can add.

Q: Difference between WinRunner and Test Director?
WinRunner: Its an Automation Testing tool, used for automation of manual written Test Cases to Test Scripts and Regression Test also. Test Director: Its an Testing Management tool, used from Creating Test Plan,Preparation of testCases, execution of testcases and generating defect report.Also used for maintaining Test Scripts.

Q: How to add Test ID to TestPlan?
Create an object with a type = Number. Name it something like "Test_ID" in the Customize Entities area. Then go into the Workflow Script Editor to "TestPlan module script/TestPlan_Test_MoveTo" and insert the following: if Test_Fields.Field("Your Object Name").Value <> Test_Fields.Field ("TS_TEST_ID").Value then Test_Fields.Field("Your Object Name").Value = Test_Fields.Field("TS_TEST_ID").Value end if This will put an object on each test thet displays the Test ID Number.

Thursday, September 13, 2007

Career in software testing

Testing accounts for almost 30 percent of the software development market. The global testing market is estimated to be a $13 billion industry. With the boom of the third party software testing business, the need for quality and trained manpower has become a critical issue in the industry.
Software testing has been closely associated with development until a few years ago. Now software testing as a career is evolving rapidly and the profile of a successful tester is remarkably different from that of a successful developer. As testing gains more prominence, a generic career road map for software testing is likely to be established in the years to come.

The Indian testing market
The size of the Indian testing market is estimated to be Rs 150-200 crore. It is said to be growing at a faster rate than the global average. The software testing arena in India is estimated to require more than 16,000-18,000 professionals within the next one year.
The market for software testers in India is likely to open in a big way due to the following reasons:
-Availability of testers and their use of automated tools.
-Indian software testing companies can offer testing services at a fraction of the cost in most other parts of the world.
-Quality of deliverables.
-Turnaround time for delivery.

Demand-supply situation
The supply is not at par with the demand due to the paucity of professional testers in India and abroad, and lack of awareness about testing as a career.
Software testing cannot be considered as an alternative to software development. Testing and development require different profiles. People working in these fields undertake different types of training. The approach to work is also different and testing can be treated as a separate career path.

Training in software testing
Professional training is required to start a career in software testing. Training on the concepts of testing on different hardware configurations, processes, using testing tools and other test enablers, working with test management software, defect tracking tools, etc., are required before working on a live testing project.
Following are some India-based organisations that impart training in software testing:

-Quality Solutions for Information Technology (QSIT): A Bangalore based IT related process consulting and high-end training company with partners in China, and Vietnam. IIST partners with QSIT for certification programmes in software testing-Certified Security Testing Professional (CSTP).
-Vyom SQTL Labs (SQTL): A Pune-based company focused on training, recruitment assistance and consulting in software quality, testing, IT infrastructure and service management.
AmitySoft, Chennai.
-QAI India.
-Anna University: Offers software testing as one of the elective subjects in the ME Software Engineering degree course.
-Electronics Test and Development Centre, Chennai.

Each of these institutes has designed their curriculum for people in different stages of their career, from beginners to test engineers with few years of experience.
Roles and responsibilities of a QA trainee: Test case writing for different projects; learning the art of peer-to-peer review; capturing review defects; process adherence; getting trained on different products and maintaining test environments; training on automated tools; getting trained on at least one language for performing White box testing.

Skill sets
Recruiters, particularly independent testing vendors, look for the following in their prospective employees:
-Ability to follow processes;
-Ability to work with a problem until solved;
-Aptitude towards problem identification;
-Ability to analyse the reason for defects; Knowledge of testing methodology; testing tools, such as WinRunner, Rational Robot, Silk Test, Web Load, etc.

Tuesday, September 11, 2007

WinRunner An Introduction

WinRunner, Mercury Interactive 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.

NAVIGATIONAL STEPS FOR WINRUNNER LAB-EXERCISES

Using Rapid Test Script wizard

Start->Program Files->Winrunner->winruner
Select the Rapid Test Script Wizard (or) create->Rapid Test Script wizard
Click Next button of welcome to script wizard
Select hand icon and click on Application window and Click Next button
Select the tests and click Next button
Select Navigation controls and Click Next button
Set the Learning Flow(Express or Comprehensive) and click Learn button
Select start application YES or NO, then click Next button
Save the Startup script and GUI map files, click Next button
Save the selected tests, click Next button
Click Ok button
Script will be generated. Then run the scripts. Run->Run from top
Find results of each script and select tools->text report in Winrunner test results.

Using GUI-Map Configuration Tool:

Open an application.
Select Tools-GUI Map Configuration; Windows pops-up.
Click ADD button; Click on hand icon.
Click on the object, which is to be configured. A user-defined class for that object is added to list.
Select User-defined class you added and press ‘Configure’ button.
Mapped to Class ;( Select a corresponding standard class from the combo box).
You can move the properties from available properties to Learned Properties. By selecting Insert button
Select the Selector and recording methods.
Click Ok button
Now, you will observe Winrunner identifying the configured objects.

Using Record-Context Sensitive mode:

Create->Record context Sensitive
Select start->program files->Accessories->Calculator
Do some action on the application.
Stop recording
Run from Top; Press ‘OK’.

Using Record-Analog Mode:

Create->Insert Function->from function generator
Function name:(select ‘invoke application’ from combo box).
Click Args button; File: mspaint.
Click on ‘paste’ button; Click on ‘Execute’ button to open the application; Finally click on ‘Close’.
Create->Record-Analog.
Draw some picture in the paintbrush file.
Stop Recording
Run->Run from Top; Press ‘OK’.

GUI CHECK POINTS-Single Property Check:

Create->Insert function->Function Generator-> (Function name:Invoke_application; File :Flight 1a)
Click on’ paste’ and click on’ execute’ & close the window.
Create->Record Context sensitive.
Do some operations & stop recording.
Create->GUI Check Point->For single Property.
Click on some button whose property to be checked.
Click on paste.
Now close the Flight1a application; Run->Run from top.
Press ‘OK’ it displays results window.
Double click on the result statement. It shows the expected value & actual value window.

GUI CHECK POINTS-For Object/Window Property:

Create->Insert function->Function Generator-> (Function name:Invoke_application; File :Flight 1a)
Click on’ paste’ and click on’ execute’ & close the window.
Create->Record Context sensitive.
Do some operations & stop recording.
Create->GUI Check Point->Object/Window Property.
Click on some button whose property to be checked.
Click on paste.
40Now close the Flight 1a application; Run->Run from top.
Press ‘OK’ it displays results window.
Double click on the result statement. It shows the expected value & actual value window.

GUI CHECK POINTS-For Object/Window Property:

Create->Insert function->Function Generator-> (Function name:Invoke_application; File :Flight 1a)
Click on’ paste’ and click on’ execute’ & close the window.
Create->Record Context sensitive.
Do some operations & stop recording.
Create->GUI Check Point->For Multiple Object.
Click on some button whose property to be checked.
Click on Add button.
Click on few objects & Right click to quit.
Select each object & select corresponding properties to be checked for that object: click ‘OK’.
Run->Run from Top. It displays the results.

BITMAP CHECK POINT:

For object/window.

Create->Insert function->Function Generator-> (Function name:Invoke_application; File :Flight 1a)
Click on’ paste’ and click on’ execute’ & close the window.
Create->Record Context sensitive.
Enter the Username, Password & click ‘OK’ button
Open the Order in Flight Reservation Application
Select File->Fax Order& enter Fax Number, Signature
Press ‘Cancel’ button.
Create->Stop Recording.
Then open Fax Order in Flight Reservation Application
Create->Bitmap Check->For obj.window;
Run->run from top.
The test fails and you can see the difference.

For Screen Area:

Open new Paint Brush file;
Create->Bitmap check point->from screen area.
Paint file pops up; select an image with cross hair pointer.
Do slight modification in the paint file(you can also run on the same paint file);
Run->Run from Top.
The test fails and you can see the difference of images.

DATABASE CHECK POINTS

Using Default check (for MS-Access only)

Create->Database Check Point->Default check
Select the Specify SQL Statement check box
Click Next button
Click Create button
Type New DSN name and Click New button
Then select a driver for which you want to set up a database & double click that driver
Then select Browse button and retype same DSN name and Click save button.
Click Next button & click Finish button
Select database button & set path of the your database name
Click ‘OK’ button & then Click the your DSN window ‘OK’ button
Type the SQL query in SQL box
Then click Finish button Note : same process will be Custom Check Point

Runtime Record Check Point.

Repeat above 10 steps.
Type query of two related tables in SQL box Ex: select Orders.Order_Number, Flights.Flight_Number from Orders, Flights where Flight.Flight_Number=Orders.Flight_Number.
Select Finish Button
Select hand Icon button& select Order No in your Application
Click Next button.
Select hand Icon button& select Flight No in your Application
Click Next button
Select any one of the following check box 1. One match record 2. One or more match records. 3. No match record
select Finish button the script will be generated.

Synchronization Point

For Obj/Win Properties:

Open start->Programs->Win Runner->Sample applications->Flight1A.
Open winrunner window
Create->Record Context Sensitive
Insert information for new Order &click on "insert Order" button
After inserting click on "delete" button
Stop recording& save the file.
Run->Run from top: Gives your results.

Without Synchronization:

settings->General Options->Click on "Run" tab. "Timeout for checkpoints& Cs statements’ value:10000 follow 1 to 7->the test display on "Error Message" that "delete" button is disabled.

With Synchronization:.

Keep Timeout value:1000 only
Go to the Test Script file, insert pointed after "Insert Order" button, press statement.
Create->Synchronization->For Obj/Window Property
Click on” Delete Order" button & select enable property; click on "paste".
It inserts the Synch statement.

For Obj/Win Bitmap:

Create-> Record Context Sensitive.
Insert information for new order & click on "Insert order" button
Stop recording & save the file.
Go to the TSL Script, just before inserting of data into "date of flight" insert pointer.
Create->Synchronization->For Obj/Win Bitmap is selected.
(Make sure flight reservation is empty) click on "data of flight" text box
Run->Run from Top; results are displayed. Note:(Keep "Timeout value" :1000)

Get Text: From Screen Area:

(Note: Checking whether Order no is increasing when ever Order is created)
Open Flight1A; Analysis->graphs(Keep it open)
Create->get text->from screen area
Capture the No of tickets sold; right click &close the graph
Now , insert new order, open the graph(Analysis->graphs)
Go to Winrunner window, create->get text->from screen area
Capture the No of tickets sold and right click; close the graph
Save the script file
Add the following script; If(text2==text1) tl_step("text comparision",0,"updateed"); else tl_step("text comparision",1,"update property");
Run->Run from top to see the results.

Get Text: For Object/Window:

Open a "Calc" application in two windows (Assuming two are two versions)
Create->get text->for Obj/Window
Click on some button in one window
Stop recording
Repeat 1 to 4 for Capture the text of same object from another "Calc" application.
Add the following TSL(Note: Change "text" to text1 & text2 for each statement) if(text1==text2) report_msg("correct" text1); Else report_msg("incorrect" text2);
Run & see the results

Using GUI-Spy:

Using the GUI Spy, you can view and verify the properties of any GUI object on selected application

Tools->Gui Spy…
Select Spy On ( select Object or Window)
Select Hand icon Button
Point the Object or window & Press Ctrl_L + F3.
You can view and verify the properties.

Using Virtual Object Wizard:

Using the Virtual Object wizard, you can assign a bitmap to a standard object class, define the coordinates of that object, and assign it a logical name

tools->Virtual Object Wizard.
Click Next Button
Select standard class object for the virtual object Ex: class: Push_button
Click Next button
Click Mark Object button
Drag the cursor to mark the area of the virtual object.
Click Next button
Assign the Logical Name, This name will appear in the test script when you record object.
Select Yes or No check box
Click Finish button
Go to winrunner window & Create->Start Recording.
Do some operations
Stop Recording

Using Gui Map Editor:

Using the GUI Map Editor, you can view and modify the properties of any GUI object on selected application. To modify an object’s logical name in a GUI map file
Tools->GUI Map Editor
Select Learn button
Select the Application A winrunner message box informs “do you want to learn all objects within the window” & select ‘yes’’ button.
Select particular object and select Modify Button
Change the Logical Name& click ‘OK’ Button
Save the File

To find an object in a GUI map file:

Choose Tools > GUI Map Editor.
Choose View > GUI Files.
Choose File > Open to load the GUI map file.
Click Find. The mouse pointer turns into a pointing hand.
Click the object in the application being tested. The object is highlighted in the GUI map file.

To highlight an object in a Application:.

Choose Tools > GUI Map Editor.
Choose View > GUI Files.
Choose File > Open to load the GUI map file.
Select the object in the GUI map file
Click Show. The object is highlighted in the Application.

Data Driver Wizard

Start->Programs->Wirunner->Sample applications->Flight 1A
Open Flight Reservation Application
Go to Winrunner window
Create->Start recording
Select file->new order, insert the fields; Click the Insert Order
Tools->Data Table; Enter different Customer names in one row and Tickets in another row.
Default that two column names are Noname1 and Noname2.
Tools->Data Driver Wizard
Click Next button &select the data table
Select Parameterize the test; select Line by Line check box
Click Next Button
Parameterize each specific values with column names of tables; Repeat for all
Finally Click finish button.
Run->Run from top;
View the results.

Merge the GUI Files:

Manual Merge

Tools->Merge GUI Map Files A WinRunner message box informs you that all open GUI maps will be closed and all unsaved changes will be discarded & click ‘OK’ button.
Select the Manual Merge. Manual Merge enables you to manually add GUI objects from the source to target files.
To specify the Target GUI map file click the browse button& select GUI map file
To specify the Source GUI map file. Click the add button& select source GUI map file.
Click ‘OK’ button
GUI Map File Manual Merge Tool Opens Select Objects and move Source File to Target File
Close the GUI Map File Manual Merge Tool

Auto Merge

Tools->Merge GUI Map Files A WinRunner message box informs you that all open GUI maps will be closed and all unsaved changes will be discarded & click ‘OK’ button.
Select the Auto Merge in Merge Type. If you chose Auto Merge and the source GUI map files are merged successfully without conflicts,
To specify the Target GUI map file click the browse button& select GUI map file
To specify the Source GUI map file.
Click the add button& select source GUI map file. Click ‘OK’ button A message confirms the merge.

Manually Retrieve the Records form Database

db_connect(query1,DSN=Flight32);
db_execute_query(query1,select * from Orders, rec);
db_get_field_value(query1,#0,#0);
db_get_headers(query1, field_num,headers);
db_get_row(query1,5,row_con);
db_write_records(query1,,c:\\str.txt,TRUE,10);

TSL SCRIPTS FOR WEB TESTING

1. web_browser_invoke ( browser, site );// invokes the browser and opens a specified site. Browser The name of browser (IE or NETSCAPE). site The address of the site.

2. web_cursor_to_image ( image, x, y ); // moves the cursor to an image on a page. image The logical name of the image. x,y The x- and y-coordinates of the mouse pointer when moved to an image

3. web_cursor_to_label (label, x, y); // moves the cursor to a label on a page. Label the name of the label. x,y The x- and y-coordinates of the mouse pointer when moved to a label.

4.web_cursor_to_link ( link, x, y ); // moves the cursor to a link on a page. link The name of the link. x,y The x- and y-coordinates of the mouse pointer when moved to a link.

5.web_cursor_to_obj ( object, x, y );// moves the cursor to an object on a page. object The name of the object. x,y The x- and y-coordinates of the mouse pointer when moved to an object.

6.web_event ( object, event_name [, x , y ] );// uns an event on a specified object. object The logical name of the recorded object. event_name The name of an event handler. x,y The x- and y-coordinates of the mouse pointer when moved to an object

7.web_file_browse ( object ); // clicks a browse button. object A file-type object.

8.web_file_set ( object, value );// sets the text value in a file-type object. object A file-type object. Value A text string.

9. web_find_text ( frame, text_to_find, result_array [, text_before, text_after, index, show ] ); // returns the location of text within a frame.

10. web_frame_get_text ( frame, out_text [, text_before, text_after, index ] );// retrieves the text content of a frame.

11. web_frame_get_text_count ( frame, regex_text_to_find , count );// returns the number of occurrences of a regular expression in a frame.

12. web_frame_text_exists ( frame, text_to_find [, text_before, text_after ] );// returns a text value if it is found in a frame.

13.web_get_run_event_mode ( out_mode ); // returns the current run mode out_mode The run mode in use. If the mode is FALSE, the default parameter, the test runs by mouse operations. If TRUE, is specified, the test runs by events.

14. web_get_timeout ( out_timeout );// returns the maximum time that WinRunner waits for response from the web. out_timeout The maximum interval in seconds

15.web_image_click ( image, x, y ); // clicks a hypergraphic link or an image. image The logical name of the image. x,y The x- and y-coordinates of the mouse pointer when clicked on a hyper graphic link or an image.

16. web_label_click ( label );// clicks the specified label. Label the name of the label.

17. web_link_click ( link ); // clicks a hypertext link. Link the name of link.

18. web_link_valid ( name, valid );// checks whether a URL name of a link is valid (not broken). name The logical name of a link. valid The status of the link may be valid (TRUE) or invalid (FALSE)

19. web_obj_click ( object, x, y );object The logical name of an object. x,y The x- and y-coordinates of the mouse pointer when clicked on an object.

20. web_obj_get_child_item ( object, table_row, table_column, object_type, index, out_object ); // returns the description of the children in an object.

21. function returns the count of the children in an object. web_obj_get_child_item_count ( object, table_row, table_column, object_type, object_count );

22. returns the value of an object property.web_obj_get_info ( object, property_name, property_value );

23. returns a text string from an object.web_obj_get_text ( object, table_row, table_column, out_text [, text_before, text_after, index] );

24. returns the number of occurrences of a regular expression in an object.web_obj_get_text_count ( object, table_row, table_column, regex_text_to_find, count );

25. returns a text value if it is found in an object.web_obj_text_exists ( object, table_row, table_column, text_to_find [, text_before, text_after] );

26. web_restore_event_default ( ); //resets all events to their default settings.

27. web_set_event ( class, event_name, event_type, event_status ); // sets the event status.

28. web_set_run_event_mode ( mode ); //sets the event run mode.

29 web_set_timeout ( timeout );//.sets the maximum time WinRunner waits for a response from the web.

30. web_set_tooltip_color ( fg_color, bg_color );// sets the colors of the WebTest ToolTip.

31. web_sync ( timeout ); //waits for the navigation of a frame to be completed.

32. web_url_valid ( URL, valid );// checks whether a URL is valid.

LoadRunner Interview Questions

1. What is load testing?
Load testing is to test that if the application works fine with the loads that result from large number of simultaneous users, transactions and to determine weather it can handle peak usage periods.

2. What is Performance testing?
Timing for both read and update transactions should be gathered to determine whether system functions are being performed in an acceptable timeframe. This should be done standalone and then in a multi user environment to determine the effect of multiple transactions on the timing of a single transaction.

3. Did u use LoadRunner? What version?
Yes. Version 7.2.

4. Explain the Load testing process?
Step 1: Planning the test. Here, we develop a clearly defined test plan to ensure the test scenarios we develop will accomplish load-testing objectives. Step 2: Creating Vusers. Here, we create Vuser scripts that contain tasks performed by each Vuser, tasks performed by Vusers as a whole, and tasks measured as transactions. Step 3: Creating the scenario. A scenario describes the events that occur during a testing session. It includes a list of machines, scripts, and Vusers that run during the scenario. We create scenarios using LoadRunner Controller. We can create manual scenarios as well as goal-oriented scenarios. In manual scenarios, we define the number of Vusers, the load generator machines, and percentage of Vusers to be assigned to each script. For web tests, we may create a goal-oriented scenario where we define the goal that our test has to achieve. LoadRunner automatically builds a scenario for us. Step 4: Running the scenario.We emulate load on the server by instructing multiple Vusers to perform tasks simultaneously. Before the testing, we set the scenario configuration and scheduling. We can run the entire scenario, Vuser groups, or individual Vusers. Step 5: Monitoring the scenario.We monitor scenario execution using the LoadRunner online runtime, transaction, system resource, Web resource, Web server resource, Web application server resource, database server resource, network delay, streaming media resource, firewall server resource, ERP server resource, and Java performance monitors. Step 6: Analyzing test results. During scenario execution, LoadRunner records the performance of the application under different loads. We use LoadRunner’s graphs and reports to analyze the application’s performance.

5. When do you do load and performance Testing?
We perform load testing once we are done with interface (GUI) testing. Modern system architectures are large and complex. Whereas single user testing primarily on functionality and user interface of a system component, application testing focuses on performance and reliability of an entire system. For example, a typical application-testing scenario might depict 1000 users logging in simultaneously to a system. This gives rise to issues such as what is the response time of the system, does it crash, will it go with different software applications and platforms, can it hold so many hundreds and thousands of users, etc. This is when we set do load and performance testing.

6. What are the components of LoadRunner?
The components of LoadRunner are The Virtual User Generator, Controller, and the Agent process, LoadRunner Analysis and Monitoring, LoadRunner Books Online.

7. What Component of LoadRunner would you use to record a Script?
The Virtual User Generator (VuGen) component is used to record a script. It enables you to develop Vuser scripts for a variety of application types and communication protocols.

8. What Component of LoadRunner would you use to play Back the script in multi user mode?
The Controller component is used to playback the script in multi-user mode. This is done during a scenario run where a vuser script is executed by a number of vusers in a group.

9. What is a rendezvous point?
You insert rendezvous points into Vuser scripts to emulate heavy user load on the server. Rendezvous points instruct Vusers to wait during test execution for multiple Vusers to arrive at a certain point, in order that they may simultaneously perform a task. For example, to emulate peak load on the bank server, you can insert a rendezvous point instructing 100 Vusers to deposit cash into their accounts at the same time.

10. What is a scenario?
A scenario defines the events that occur during each testing session. For example, a scenario defines and controls the number of users to emulate, the actions to be performed, and the machines on which the virtual users run their emulations.

11. Explain the recording mode for web Vuser script?
We use VuGen to develop a Vuser script by recording a user performing typical business processes on a client application. VuGen creates the script by recording the activity between the client and the server. For example, in web based applications, VuGen monitors the client end of the database and traces all the requests sent to, and received from, the database server. We use VuGen to: Monitor the communication between the application and the server; Generate the required function calls; and Insert the generated function calls into a Vuser script.

12. Why do you create parameters?
Parameters are like script variables. They are used to vary input to the server and to emulate real users. Different sets of data are sent to the server each time the script is run. Better simulate the usage model for more accurate testing from the Controller; one script can emulate many different users on the system.

13. What is correlation?
Explain the difference between automatic correlation and manual correlation? - Correlation is used to obtain data which are unique for each run of the script and which are generated by nested queries. Correlation provides the value to avoid errors arising out of duplicate values and also optimizing the code (to avoid nested queries). Automatic correlation is where we set some rules for correlation. It can be application server specific. Here values are replaced by data which are created by these rules. In manual correlation, the value we want to correlate is scanned and create correlation is used to correlate.

14. How do you find out where correlation is required?
Give few examples from your projects? - Two ways: First we can scan for correlations, and see the list of values which can be correlated. From this we can pick a value to be correlated. Secondly, we can record two scripts and compare them. We can look up the difference file to see for the values which needed to be correlated. In my project, there was a unique id developed for each customer, it was nothing but Insurance Number, it was generated automatically and it was sequential and this value was unique. I had to correlate this value, in order to avoid errors while running my script. I did using scan for correlation.

15. Where do you set automatic correlation options?
Automatic correlation from web point of view can be set in recording options and correlation tab. Here we can enable correlation for the entire script and choose either issue online messages or offline actions, where we can define rules for that correlation. Automatic correlation for database can be done using show output window and scan for correlation and picking the correlate query tab and choose which query value we want to correlate. If we know the specific value to be correlated, we just do create correlation for the value and specify how the value to be created.

16. What is a function to capture dynamic values in the web Vuser script? Web_reg_save_param function saves dynamic data information to a parameter.

17. When do you disable log in Virtual User Generator, When do you choose standard and extended logs?
Once we debug our script and verify that it is functional, we can enable logging for errors only. When we add a script to a scenario, logging is automatically disabled. Standard Log Option: When you selectStandard log, it creates a standard log of functions and messages sent during script execution to use for debugging. Disable this option for large load testing scenarios. When you copy a script to a scenario, logging is automatically disabled Extended Log Option: Selectextended log to create an extended log, including warnings and other messages. Disable this option for large load testing scenarios. When you copy a script to a scenario, logging is automatically disabled. We can specify which additional information should be added to the extended log using the Extended log options.

18. How do you debug a LoadRunner script?
VuGen contains two options to help debug Vuser scripts-the Run Step by Step command and breakpoints. The Debug settings in the Options dialog box allow us to determine the extent of the trace to be performed during scenario execution. The debug information is written to the Output window. We can manually set the message class within your script using the lr_set_debug_message function. This is useful if we want to receive debug information about a small section of the script only.

19. How do you write user defined functions in LR?Give me few functions you wrote in your previous project?
Before we create the User Defined functions we need to create the externallibrary (DLL) with the function. We add this library to VuGen bin directory. Once the library is added then we assign user defined function as a parameter. The function should have the following format: __declspec (dllexport) char* (char*, char*)Examples of user defined functions are as follows:GetVersion, GetCurrentTime, GetPltform are some of the user defined functions used in my earlier project.

20. What are the changes you can make in run-time settings?
The Run Time Settings that we make are: a) Pacing - It has iteration count. b) Log - Under this we have Disable Logging Standard Log and c) Extended Think Time - In think time we have two options like Ignore think time and Replay think time. d) General - Under general tab we can set the vusers as process or as multithreading and whether each step as a transaction.

21. How do you perform functional testing under load?
Functionality under load can be tested by running several Vusers concurrently. By increasing the amount of Vusers, we can determine how much load the server can sustain.

22. What is Ramp up? How do you set this?
This option is used to gradually increase the amount of Vusers/load on the server. An initial value is set and a value to wait between intervals can bespecified. To set Ramp Up, go to ‘Scenario Scheduling Options’

23. What is the advantage of running the Vuser as thread?
VuGen provides the facility to use multithreading. This enables more Vusers to be run pergenerator. If the Vuser is run as a process, the same driver program is loaded into memory for each Vuser, thus taking up a large amount of memory. This limits the number of Vusers that can be run on a singlegenerator. If the Vuser is run as a thread, only one instance of the driver program is loaded into memory for the given number ofVusers (say 100). Each thread shares the memory of the parent driver program, thus enabling more Vusers to be run per generator.

24. If you want to stop the execution of your script on error, how do you do that?
The lr_abort function aborts the execution of a Vuser script. It instructs the Vuser to stop executing the Actions section, execute the vuser_end section and end the execution. This function is useful when you need to manually abort a script execution as a result of a specific error condition. When you end a script using this function, the Vuser is assigned the status "Stopped". For this to take effect, we have to first uncheck the “Continue on error” option in Run-Time Settings.

25. What is the relation between Response Time and Throughput?
The Throughput graph shows the amount of data in bytes that the Vusers received from the server in a second. When we compare this with the transaction response time, we will notice that as throughput decreased, the response time also decreased. Similarly, the peak throughput and highest response time would occur approximately at the same time.

26. Explain the Configuration of your systems?
The configuration of our systems refers to that of the client machines on which we run the Vusers. The configuration of any client machine includes its hardware settings, memory, operating system, software applications, development tools, etc. This system component configuration should match with the overall system configuration that would include the network infrastructure, the web server, the database server, and any other components that go with this larger system so as to achieve the load testing objectives.

27. How do you identify the performance bottlenecks?
Performance Bottlenecks can be detected by using monitors. These monitors might be application server monitors, web server monitors, database server monitors and network monitors. They help in finding out the troubled area in our scenario which causes increased response time. The measurements made are usually performance response time, throughput, hits/sec, network delay graphs, etc.

28. If web server, database and Network are all fine where could be the problem?
The problem could be in the system itself or in the application server or in the code written for the application.

29. How did you find web server related issues?
Using Web resource monitors we can find the performance of web servers. Using these monitors we can analyze throughput on the web server, number of hits per second thatoccurred during scenario, the number of http responses per second, the number of downloaded pages per second.

30. How did you find database related issues?
By running “Database” monitor and help of “Data Resource Graph” we can find database related issues. E.g. You can specify the resource you want to measure on before running the controller and than you can see database related issues

31. How did you plan the Load? What are the Criteria?
Load test is planned to decide the number of users, what kind of machines we are going to use and from where they are run. It is based on 2 important documents, Task Distribution Diagram and Transaction profile. Task Distribution Diagram gives us the information on number of users for a particular transaction and the time of the load. The peak usage and off-usage are decided from this Diagram. Transaction profile gives us the information about the transactions name and their priority levels with regard to the scenario we are deciding.

32. What does vuser_init action contain?
Vuser_init action contains procedures to login to a server.

33. What does vuser_end action contain?
Vuser_end section contains log off procedures.

34. What is think time? How do you change the threshold?
Think time is the time that a real user waits between actions. Example: When a user receives data from a server, the user may wait several seconds to review the data before responding. This delay is known as the think time. Changing the Threshold: Threshold level is the level below which the recorded think time will be ignored. The default value is five (5) seconds. We can change the think time threshold in the Recording options of the Vugen.

35. What is the difference between standard log and extended log?
The standard log sends a subset of functions and messages sent during script execution to a log. The subset depends on the Vuser type Extended log sends a detailed script execution messages to the output log. This is mainly used during debugging when we want information about: Parameter substitution. Data returned by the server. Advanced trace.

36. Explain the following functions:
lr_debug_message - The lr_debug_message function sends a debug message to the output log when the specified message class is set. lr_output_message - The lr_output_message function sends notifications to the Controller Output window and the Vuser log file. lr_error_message - The lr_error_message function sends an error message to the LoadRunner Output window. lrd_stmt - The lrd_stmt function associates a character string (usually a SQL statement) with a cursor. This function sets a SQL statement to be processed. lrd_fetch - The lrd_fetch function fetches the next row from the result set.

37. Throughput
If the throughput scales upward as time progresses and the number of Vusers increase, this indicates that the bandwidth is sufficient. If the graph were to remain relatively flat as the number of Vusers increased, it wouldbe reasonable to conclude that the bandwidth is constraining the volume ofdata delivered.

38. Types of Goals in Goal-Oriented Scenario
Load Runner provides you with five different types of goals in a goal oriented scenario:
1. The number of concurrent Vusers
2. The number of hits per second
3. The number of transactions per second
4. The number of pages per minute
5. The transaction response time that you want your scenario

39. Analysis Scenario (Bottlenecks):
In Running Vuser graph correlated with the response time graph you can see that as the number of Vusers increases, the average response time of the check itinerary transaction very gradually increases. In other words, the average response time steadily increases as the loadincreases. At 56 Vusers, there is a sudden, sharp increase in the average responsetime. We say that the test broke the server. That is the mean time before failure (MTBF). The response time clearly began to degrade when there were more than 56 Vusers running simultaneously.

40. What is correlation?
Explain the difference between automatic correlation and manual correlation? - Correlation is used to obtain data which are unique for each run of the script and which are generated by nested queries. Correlation provides the value to avoid errors arising out of duplicate values and also optimizing the code (to avoid nested queries). Automatic correlation is where we set some rules for correlation. It can be application server specific. Here values are replaced by data which are created by these rules. In manual correlation, the value we want to correlate is scanned and create correlation is used to correlate.

41. Where do you set automatic correlation options?
Automatic correlation from web point of view, can be set in recording options and correlation tab. Here we can enable correlation for the entire script and choose either issue online messages or offline actions, where we can define rules for that correlation. Automatic correlation for database, can be done using show output window and scan for correlation and picking the correlate query tab and choose which query value we want to correlate. If we know the specific value to be correlated, we just do create correlation for the value and specify how the value to be created.

42. What is a function to capture dynamic values in the web vuser script?Web_reg_save_param function saves dynamic data information to a parameter.

Thursday, September 6, 2007

What is QTP ?

QuickTest is a graphical interface record-playback automation tool. It is able to work with any web, java or windows client application. Quick Test enables you to test standard web objects and ActiveX controls. In addition to these environments, QuickTest Professional also enables you to test Java applets and applications and multimedia objects on Applications as well as standard Windows applications, Visual Basic 6 applications and .NET framework applications…QTP is Mercury Interactive Functional Testing Tool. QTP stands for Quality Test Professional. Mercury QuickTest Professional: provides the industry’s best solution for functional test and regression test automation - addressing every major software application and environment. This next-generation automated testing solution deploys the concept of Keyword-driven testing to radically simplify test creation and maintenance. Unique to QuickTest Professional’s Keyword-driven approach, test automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View.QuickTest Professional enables you to test standard Windows applications, Web objects, ActiveX controls, and Visual Basic applications. You can also acquire additional QuickTest add-ins for a number of special environments (such as Java, Oracle, SAP Solutions, .NET Windows and Web Forms, Siebel, PeopleSoft, Web services, and terminal emulator applications).


What’s the basic concept of QTP?


QTP is based on two concept-* Recording* Playback


Which scripting language used by QTP?


Basic scripting language we are using in QTP is VB scripting.


How many types of recording facility are available in QTP?


QTP provides three types of recording methods-* Context Recording (Normal)* Analog Recording* Low Level Recording


How many types of Parameters are available in QTP?


QTP provides three types of Parameter-* Method * Data Driven * Dynamic


What’s the QTP testing process?


QTP testing process consist of seven steps-* Preparing to recoding* Recording* Enhancing your script* Debugging* Run* Analyze* Report Defects (more…)


How to Start recording using QTP?


Choose Test > Record or click the Record button.When the Record and Run Settings dialog box opens to do this;1. In the Web tab, select Open the following browser when a record or run session begins.2. In the Windows Applications tab, confirm that Record and run on these applications (opened on session start) is selected, and that there are no applications listed.


What’s QuickTest Window?


Before you begin creating tests, you should familiarize yourself with the main QuickTest window.


The QuickTest window contains the following key elements:.


Title bar—Displays the name of the currently open test.. Menu bar—Displays menus of QuickTest commands.. File toolbar—Contains buttons to assist you in managing your test.. Testing toolbar—Contains buttons to assist you in the testing process.. Debug toolbar—Contains buttons to assist you in debugging tests.. Test pane—Contains the Keyword View and Expert View tabs.. 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 in parameterizing your test.. Debug Viewer pane—Assists you in debugging your test. The Debug Viewer pane contains the Watch Expressions, Variables, and Command tabs. (The Debug Viewer pane is not displayed when you open QuickTest for the first time. You can display the Debug Viewer by choosing View <>


How does QTP identifes the object in the application ?


QTP identifies the object in the application by LogicalName and Class.For example :The Edit box is identified byLogical Name : PSOPTIONS_BSE_TIME20Class: WebEdit


How many Add-ins comes by default with QTP?


There are 3 Add-ins comes with QTP: (1) ActiveX (2) Visual Basic (3) Web


What are the views available in QTP?


(1) Keyword View (2) Expert View


What is keyword view and Expert view in QTP?


QuickTest’s Keyword Driven approach, test automation experts have full access to the underlying test and object properties, via an integrated scripting and debugging environment that is round-trip synchronized with the Keyword View. Advanced testers can view and edit their tests in the Expert View, which reveals the underlying industry-standard VBScript that QuickTest Professional automatically generates. Any changes made in the Expert View are automatically synchronized with the Keyword View.


What is Active Screen?


The Active Screen provides a snapshot of your application as it appeared when you performed a certain step during a recording session.


How many tabs are available in Debug Viewer Pane?


The Debug Viewer pane contains three tabs to assist you in debugging your test or component—Watch Expressions, Variables, and Command. Watch Expressions The Watch Expressions tab enables you to view the current value of any variable or other VBScript expression. Variables The Variables tab enables you to view the current value of all variables that have been recognized up to the last step performed in the run session. Command The Command tab enables you to execute a line of script in order to set or modify the current value of a variable or VBScript object in your test or component. When you continue the run session, QuickTest uses the new value that was set in the command.


How many toolbars QTP has?


QuickTest has 4 built-in toolbars: 1. The File toolbar 2. The Testing toolbar 3. The Debug toolbar 4. Action toolbar The Action toolbar is available in the Keyword View and contains options that enable you to view all actions in the test flow or to view the details of a selected action. The Action toolbar is not available for components.


What is object Repository ?


Explain different types of Object Repositories?QuickTest identifies objects in your application based on a set of test object properties. It stores the object data it learns in the object repository. You can save your objects either in a shared object repository or in action object repository. In shared object repository mode, you can use one object repository file for multiple tests or components. In object repository peraction mode, QuickTest automatically creates an object repository file for each action in your test. Object repository per-action mode is not available for components


What is Object Spy in QTP?


Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object’s hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box


Explain different recording modes ?


QuickTest’s normal recording mode records the objects in your application and the operations performed on them. This mode is the default and takes full advantage of QuickTest’s test object model, recognizing the objects in your application regardless of their location on the screen.Analog Recording - enables you to record the exact mouse and keyboard operations you perform in relation to either the screen or the application window. In this recording mode, QuickTest records and tracks every movement of the mouse as you drag the mouse around a screen or window. This mode is useful for recording operations that cannot be recorded at the level of an object, for example, recording a signature produced by dragging the mouse.Note: You cannot edit analog recording steps from within QuickTest. ?Low-Level Recording - enables you to record on any object in your application, whether or not QuickTest recognizes the specific object or the specific operation. This mode records at the object level and records all run-time objects as Window or WinObject test objects. Use low-level recording for recording tests in an environment or on an object not recognized by QuickTest. You can also use low-level recording if the exact coordinates of the object are important for your test. Note: Steps recorded using low-level mode may not run correctly on all objects.


Explain the need to use analog recording in qtp?


This mode records exact mouse and Key Board operations you perform in relation to the screen /Application Window. This mode is useful for the operation which you can record at Object Level, such as drawing a picture, recording signature. The steps recorded using Analog Mode is saved in separated data file, Quick Tests add to your Test a Run Analog File statement that calls the recorded analog File. This file is stored with your action in which these Analog Steps are created. The Step recorded in Analog mode can not be edited within QTP.


What is the extension of script and object repository files?


Object Repository : .tsr , Script : .mts, Excel : Default.xls


How to supress warnings from the “Test results page”?


From the Test results Viewer “Tools > Filters > Warnings”…must be “Unchecked”.


When we try to use test run option “Run from Step”, the browser is not launching automatically why?


This is default behaviour


In how many ways we can add check points to an application using QTP?


We can add checkpoints while recording the application or we can add after recording is completed using Active screen (Note : To perform the second one The Active screen must be enabled while recording).


How to Run a Test using QTP?


1 Start QuickTest and open your test.If QuickTest is not already open, choose Start > Programs > QuickTest Professional > QuickTest Professional.. If the Welcome window opens, click Open Existing.. If QuickTest opens without displaying the Welcome window, choose File > Open or click the Open button.In the Open Test dialog box, locate and select your test, then click Open.
2 Confirm that all images are saved to the test results.QuickTest allows you to determine when to save images to the test results.Choose Tools > Options and select the Run tab. In the Save step screen capture to test results option, select Always.Click OK to close the Options dialog box.3 Start running your test.Click Run or choose Test > Run. The Run dialog box opens.Select New run results folder. Accept the default results folder name.Click OK to close the Run dialog box.


How to Save your test using QTP?


Select File > Save or click the Save button. The Save dialog box opens to the Tests folder.Create a folder which you want to save to, select it, and click Open.Type your test name in the File name field.Confirm that Save Active Screen files is selected.Click Save. Your test name is displayed in the title bar of the main QuickTest window.


How to open a new test using QTP?


1. If QuickTest is not currently open, choose Start > Programs > QuickTest Professional > QuickTest Professional. If the Welcome window opens, click Blank Test. Otherwise, choose File > New, or click the New button. A blank test opens. 2. . If QuickTest is already open, check which add-ins are loaded by selecting Help > About QuickTest Professional. If the Web Add-in is not loaded, you must exit and restart QuickTest. When the Add-in Manager opens, select the Web Add-in, and clear all other add-ins. Choose File > New, or click the New button. A blank test opens.


How to do Laod testing for web based Application?


1. Recording a scenerio in QTP of my web based application.2. Make 100 copies of that scenerio and run the test (scenerio run for 100 times)3. In that case, do the load of application on server.4. The basic logic of running the copy 100 times is to create same scenerio as if 100 users were working


How to “Turn Off” QTP results after running a Script?


Goto “Tools > Options > Run Tab” and Deselect “View results when run session ends”. But this suppresses only the result window, but a og will be created and can viewed manulaly which cannot be restricted from getting created.


Explain about the Test Fusion Report of QTP ?


Once a tester has run a test, a TestFusion report displays all aspects of the test run: a high-level results overview, an expandable Tree View of the test specifying exactly where application failures occurred, the test data used, application screen shots for every step that highlight any discrepancies, and detailed explanations of each checkpoint pass and failure. By combining TestFusion reports with QuickTest Professional, you can share reports across an entire QA and development team.


What’s Checkpoints for QTP?


A checkpoint verifies that expected information is displayed in your application while the test is running.


QuickTest Professional offers the following types of checkpoints:


How to add a standard checkpoint in your test ?

1. Start QuickTest and open your test.In the Open Test dialog box, locate and select your test, then click Open.2. Save the test as Checkpoint.Select File > Save As. Save the test as Checkpoint.3. Confirm that the Active Screen option is enabled.If you do not see the Active Screen at the bottom of the QuickTest window, click the Active Screen button, or choose View > Active Screen.4. Locate the page where you want to add a standard checkpoint.5 Create a standard checkpoint.In the Active Screen, right-click element in your application and choose Insert Standard Checkpoint.6 Save the test.

How to add a page checkpoint to your test?

The page checkpoint checks that the number of links and images in the page when you run your test is the same as when you recorded your test.1 Locate the page where you want to add a page checkpoint.2 Create a page checkpoint.Right-click anywhere in the Active Screen, and choose Insert Standard Checkpoint. The Object Selection - Checkpoint Properties dialog box opens. Note that this dialog box may include different elements, depending on where you click in the Active Screen.3 Save the test.

what is the use of Text output value in Qtp?

Output values enable to view the values that the application talkes during run time.When paramaterised, the values change for each iteration.Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.

How to Creating an Output Value using QTP?

1 Start QuickTest and open the Parameter test.2 Save the test as Output.3 Confirm that the Active Screen option is enabled.4 Select the text you want to use as an output value.5 Set the output value settings.6 Modify the table checkpoint.7 Save the test.

What’s the difference between a checkpoint and output value?

Checkpoint only checks for the specific attribute of an object in AUT while Output value can output those attributes value to a column in data table

Explain QTP Testing process ?

The QuickTest testing process consists of 6 main phases:

1. Create your test planPrior to automating there should be a detailed description of the test including the exact steps to follow, data to be input, and all items to be verified by the test. The verification information should include both data validations and existence or state verifications of objects in the application.2. Recording a session on your applicationAs you navigate through your application, QuickTest graphically displays each step you perform in the form of a collapsible icon-based test tree. A step is any user action that causes or makes a change in your site, such as clicking a link or image, or entering data in a form.
2. Enhancing your testo Inserting checkpoints into your test lets you search for a specific value of a page, object or text string, which helps you identify whether or not your application is functioning correctly.NOTE: Checkpoints can be added to a test as you record it or after the fact via the Active Screen. It is much easier and faster to add the checkpoints during the recording process.o Broadening the scope of your test by replacing fixed values with parameters lets you check how your application performs the same operations with multiple sets of data.o Adding logic and conditional statements to your test enables you to add sophisticated checks to your test.
3. Debugging your testIf changes were made to the script, you need to debug it to check that it operates smoothly and without interruption.
4. Running your test on a new version of your applicationYou run a test to check the behavior of your application. While running, QuickTest connects to your application and performs each step in your test.
5. Analyzing the test resultsYou examine the test results to pinpoint defects in your application.
6. Reporting defectsAs you encounter failures in the application when analyzing test results, you will create defect reports in Defect Reporting Tool.

1. What are the Features & Benefits of Quick Test Pro (QTP 8.0)?

- Operates stand-alone, or integrated into Mercury Business Process Testing and Mercury Quality Center. Introduces next-generation zero-configuration Keyword Driven testing technology in Quick Test Professional 8.0 allowing for fast test creation, easier maintenance, and more powerful data-driving capability. Identifies objects with Unique Smart Object Recognition, even if they change from build to build, enabling reliable unattended script execution. Collapses test documentation and test creation to a single step with Auto-documentation technology. Enables thorough validation of applications through a full complement of checkpoints.

How many types of Actions are there in QTP?

There are three kinds of actions:non-reusable action—an action that can be called only in the test with which it is stored, and can be called only once. reusable action—an action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests.external action—a reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action.

What is the difference between Call to Action and Copy Action.?

Call to Action : The changes made in Call to Action , will be reflected in the orginal action( from where the script is called).But where as in Copy Action , the changes made in the script ,will not effect the original script Action.

Syntact for how to call one script from another?

and Syntax to call one “Action” in another?RunAction ActionName, [IterationMode , IterationRange , Parameters]Here the actions becomes reusable on making this call to any Action.IterationRange String Not always required. Indicates the rows for which action iterations will be performed. Valid only when the IterationMode is rngIterations. Enter the row range (i.e. “1-7″), or enter rngAll to run iterations on all rows.If the action called by the RunAction statement includes an ExitAction statement, the RunAction statement can return the value of the ExitAction’s RetVal argument.

Inserting a Call to Action is not Importing all columns in Datatable of globalsheet. Why?

Inserting a call to action will only Import the columns of the Action called

How to execute a WinRunner Script in QTP?

(a) TSLTest.RunTest TestPath, TestSet [, Parameters ] –> Used in QTP 6.0 used for backward compatibility Parameters : The test set within Quality Center, in which test runs are stored. Note that this argument is relevant only when working with a test in a Quality Center project. When the test is not saved in Quality Center, this parameter is ignored.e.g : TSLTest.RunTest “D:\test1″, “”(b)TSLTest.RunTestEx TestPath, RunMinimized, CloseApp [, Parameters ] TSLTest.RunTestEx “C:\WinRunner\Tests\basic_flight”, TRUE, FALSE, “MyValue” CloseApp : Indicates whether to close the WinRunner application when the WinRunner test run ends. Parameters : Up to 15 WinRunner function argument

Why divide a test into three action calls?

When you create a new test, it contains a call to one action. By dividing your tests into calls to multiple actions, you can design more modular and efficient tests.

What is parameter?

A parameter is a variable that is assigned a value from an external data source or generator. If you wish to parameterize the same value in several steps in your test or component, you may want to consider using the Data Driver rather than adding parameters manually.

How many ways we can parameterize data in QTP ?

There are four types of parameters:Test, action or component parameters enable you to use values passed from your test or component, or values from other actions in your test.Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, QuickTest uses a different value from the Data Table.Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that QuickTest generates for you based on conditions and options you choose.Random number parameters enable you to insert random numbers as values in your test or component. For example, to check how your application handles small and large ticket orders, you can have QuickTest generate a random number and insert it in a number of tickets edit field.

How Does Run time data (Parameterization) is handled in QTP?

You can then enter test data into the Data Table, an integrated spreadsheet with the full functionality of Excel, to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files.

How to Defining a Data Table Parameter for QTP?

1 Start QuickTest and open the Checkpoint test.2 Save the test as Parameter.3 Confirm that the Active Screen option is enabled.4 Confirm that the Data Table option is enabled.5 Select the text to parameterize.6 Set the parameterization properties.

How to add a runtime parameter to a datasheet?

DataTable.LocalSheetThe following example uses the LocalSheet property to return the local sheet of the run-time Data Table in order to add a parameter (column) to it.MyParam=DataTable.LocalSheet.AddParameter(”Time”, “5:45″)

Automation Tools

Mercury offers a suite of solutions that automate testing and quality
assurance for client/server software and systems, e-business applications, and enterprise resource planning applications.

1. QuickTest ProfessionalTM - E-business functional testing
2. LoadRunner® - Enterprise load testing
3. TestDirectorTM - Integrated test management
4. WinRunner® - Test automation for the enterprise



Segue Software delivers the industry's premier e-business reliability products and solutions to help you address the risks and complexities that can affect the performance and quality of your e-business systemSilkTest - Automated functional and regression testing

1. SilkPerformer - Automated load and performance testing
2. SilkMonitor - 24x7 monitoring and reporting of Web, application and database servers
3. SilkPilot - Unit testing of CORBA objects
4. SilkObserver - End-to-end transaction management and monitoring for CORBA applications
5. SilkMeter - Access control and usage metering
6. SilkRealizer - Scenario testing and system monitoring
7. SilkRadar - Automated defect tracking

Wednesday, September 5, 2007

Test Strategy

What is a strategy? Why does testing need one?

A strategy outlines what to plan, and how to plan it. A successful strategy is your guide through change, and provides a firm foundation for ongoing improvement. Unlike a plan, which is obsolete from the point of creation, a strategy reflects the values of an organization - and remains current and useful.
When an organization tests its products or its tools, it tries to compare them against its expectations and values. By its nature, testing introduces change as problems are identified and resolved. A test strategy is necessary to allow these two impulses to work together. Furthermore, testing can never be said to be 'complete', and a core skill in testing is the justified management of conflicting demands; without a strategy, these judgments will be inconsistent to the point of failure.
Software development is a creative process. A test strategy is a vital enabler to this process - keeping focus on core values and consistent decision-making to help achieve desired goals with best use of resource. A good strategy stands as a clear counter to reactive, counter-productive test approaches.

Examples and Templates:

A test strategy is not a document. It is a framework for making decisions about value, and has strong links to the unique values of an organization. It is part of the creative process. Although templates exist, most organizations and projects are poorly served by a one-size-fits-all approach to their specific goals. You may find templates useful on projects where the product to be tested can be created and marketed simply by following templates - but on other projects, they're dangerous.
Workroom Productions avoids using such templates, and will create a strategy tailored to your particular needs. If you have an existing, problematic strategy, we will suggest areas where it could be slimmed down, and identify aspects that have been missed. Whether you've got documents or not, we'll help you with your strategy.
Test strategies can cover a wide range of testing and business issues. While not a checklist, you might expect to see some of the following in your own strategy:
1. values and decision-making framework
2. approaches to risk assessment, costs and quality through the organization
3. test techniques, test data, test scope and test planning
4. completion criteria and analysis
5. test management, metrics and improvement
6. skills, staffing, team structure and training
7. test environment, change control and release strategy
8. defect control, tracking and the approach to fixes
9. re-tests and regression tests
10. profiling and analysis for non-functional testing
11. test automation and test tool assessment

Testing as a genuinely strategic part of software development:

A strategic decision is one that opens up opportunities which are otherwise unapproachable - a strategic resource is the mechanism by which these opportunities are exploited.
Design, coding, and testing are the three key parts of software development. These are activities, not phases; they operate in parallel and are closely coupled. On a not-too-turbulent project, testing and defect resolution typically account for 25-35% of the final cost of development. Information produced by software testing is clearly an input to the overall organization’s strategic decisions about marketability and release - but testing can provide much more than this for the significant spends it absorbs.

Counts