96) What is integration testing?
In integration testing the separate modules will be tested together to expose faults in the interfaces and in the interaction between integrated components. Testing is usually black box as the code is not directly checked for errors.
97) What is user acceptance testing?
User Acceptance testing is the phase of testing used to determine whether a system satisfies the requirements specified in the requirements analysis phase. The acceptance test design is derived from the requirements document.
- To determine whether a system satisfies its acceptance criteria or not.
- To enable the customer to determine whether to accept the system or not.
- To test the software in the "real world" by the intended audience.
98) How do you define the acceptance criteria:
- Functionality requirements.
- Performance requirements.
- Interface quality requirements.
- Overall software quality requirements.
99) How do you develop and execute the UAT plan with end users signoffs :
- Project description.
- User responsibilities.
- Acceptance criteria and description.
- Execute the acceptance test plan.
100) What is test strategy?
Decide how we are going to approach the testing in terms of people, tools, procedures and support. Test Strategy is the plan for how you are going to approach testing. A test strategy is a planning document that provides the overall direction for the software testing needs of a project. Developing a test strategy is about setting direction and resolving high-level testing questions.
Type of testing (manual versus automated), scheduled date, participants, location, environment required, identify data to be used for testing, backup procedures, data restore, problem identification - procedure to be used when a tester finds a suspected defect, defect logging, defect resolution, retesting, sign off testing activities, identify how the total testing will be signed off. This includes all activities in the "Test Plan" and any rectification of defects, test management software, testing software, performance testing software.
101) What is Test Approach?
The test approach describes the types of tests performed and the sequence of tests as executed in the test lab. Test approach is included in the test plan.
Test methodology document will contain the phases of testing and the test levels that the testing cycle will go through.
102) What is test plan?
Test Plan is a detailed procedure to organize and execute the workflow of a software testing project . A test plan documents the strategy that will be used to verify and ensure that a product or system meets its design specifications and other requirements. A test plan is usually prepared by or with significant input from Test Engineers. Test plan is the Master document which mentions the test approach ,and test methodology in it.
The first step in developing a test plan is to develop test scenarios. The first point of call for developing the scenarios is the business requirements. They should identify the functionality to be tested. There will however be other things to test. Typically these include things like screen layout, validity of information displayed, speed, correct data capture etc. specific to Unit testing, Performance Testing, Integration Testing.
103) What is Test Strategy versus Test approach/ test plan
1 Test Plan is The set of ideas that guide or represent the intended test process
Test Strategy is The way tests will be designed and executed to support an effective quality assessment
2 Test Plan are of different types:
Unit, Integration, System, UAT
Test strategy should
A. focuses most effort on areas of potential technical risk, while still putting some effort into low risk areas just in case the risk analysis is wrong.
B. address test platform configuration, how the product will be operated, how the product will be observed, and how observations will be used to evaluate the product
C. is diversified in terms of test techniques and perspectives. Methods of evaluating test coverage should take into account multiple dimensions of coverage, including structural, functional, data, platform, operations, and requirements.
D. Specify how test data will be designed and generated.
3 Test Strategy is at program level
versus test plan is at the project level
104) What is process flow for different phases of testing life cycle?
Requirements analysis: Testing should begin in the requirements phase of the software development life cycle. During the design phase, testers work with developers in determining what aspects of a design are testable and with what parameters those tests work.
Test planning: Test strategy, test plan, testbed creation. Since many activities will be carried out during testing, a plan is needed.
Test development: Test procedures, test scenarios, test cases, test datasets, test scripts to use in testing software.
Test execution: Testers execute the software based on the plans and test documents then report any errors found to the development team.
Test reporting: Once testing is completed, testers generate metrics and make final reports on their test effort and whether or not the software tested is ready for release.
Test result analysis: Or Defect Analysis, is done by the development team usually along with the client, in order to decide what defects should be treated, fixed, rejected (i.e. found software working properly) or deferred to be dealt with later.
Defect Retesting: Once a defect has been dealt with by the development team, it is retested by the testing team. AKA Resolution testing.
Regression testing: It is common to have a small test program built of a subset of tests, for each integration of new, modified, or fixed software, in order to ensure that the latest delivery has not ruined anything, and that the software product as a whole is still working correctly.
Test Closure: Once the test meets the exit criteria, the activities such as capturing the key outputs, lessons learned, results, logs, documents related to the project are archived and used as a reference for future projects.
105) What is test plan?
A test specification is called a test plan. The developers are well aware what test plans will be executed and this information is made available to management and the developers. The idea is to make them more cautious when developing their code or making additional changes.
106) What sections are included in test case?
A test case normally consists of a unique identifier, requirement references from a design specification, preconditions, events, a series of steps (also known as actions) to follow, input, output, expected result, and actual result. The optional fields are a test case ID, test step, or order of execution number, related requirement(s), depth, test category, author, and check boxes for whether the test is automatable and has been automated. Larger test cases may also contain prerequisite states or steps, and descriptions. A test case should also contain a place for the actual result. These steps can be stored in a word processor document, spreadsheet, database, or other common repository.
107) What are included in a test script?
The test script is the combination of a test case, test procedure, and test data. Initially the term was derived from the product of work created by automated regression test tools. Today, test scripts can be manual, automated, or a combination of both.
108) What is included in a test data?
In most cases, multiple sets of values or data are used to test the same functionality of a particular feature. All the test values and changeable environmental components are collected in separate files and stored as test data. It is also useful to provide this data to the client and with the product or a project.
109) What is included in SDLC?
The Systems Development Life Cycle (SDLC), or Software Development Life Cycle in systems engineering and software engineering, is the process of creating or altering systems, and the models and methodologies that people use to develop these systems. The concept generally refers to computer or information systems.
In software engineering the SDLC concept underpins many kinds of software development methodologies. These methodologies form the framework for planning and controlling the creation of an information system: the software development process.
Systems Development Life Cycle (SDLC) adheres to important phases that are essential for developers, such as planning, analysis, design, and implementation, and are explained in the section below. There are several Systems Development Life Cycle Models in existence. The oldest model, that was originally regarded as "the Systems Development Life Cycle" is the waterfall model: a sequence of stages in which the output of each stage becomes the input for the next. Initiation/Planning, Requirements gathering/analysis, design, build/code, testing, operations/maintenance.
110) What is Agile software development?
Agile software development refers to a group of software development methodologies based on iterative development, where requirements and solutions evolve through collaboration between self-organizing cross-functional teams.
Agile methods generally promote a disciplined project management process that encourages frequent inspection and adaptation, a leadership philosophy that encourages teamwork, self-organization and accountability, a set of engineering best practices intended to allow for rapid delivery of high-quality software, and a business approach that aligns development with customer needs and company goals.
111) What are some differences between Waterfall and Agile?
Waterfall model: is a sequence of stages in which the output of each stage becomes the input for the next. Initiation/Planning, Requirements gathering/analysis, design, build/code, testing, operations/maintenance.
Waterfall is a very structured disciplined approach which follows rigid path.
Agile methods, in contrast, produce completely developed and tested features (but a very small subset of the whole every few weeks.
The emphasis is on obtaining the smallest workable piece of functionality to deliver business value early and continually improving it and/or adding further functionality throughout the life of the project.
If a project being delivered under Waterfall is cancelled at any point up to the end, there is often nothing to show for it beyond a huge resources bill.
With Agile, being cancelled at any point will still leave the customer with some worthwhile code that has likely already been put into live operation.
112) What are some drawbacks with Waterfall?
A common criticism of the waterfall model is its inflexible division of a project into separate stages, where commitments are made early on, making it difficult to react to changes in requirements as the project executes.
This means that the waterfall model is likely to be unsuitable if requirements are not well understood/defined or change in the course of the project.
If a project being delivered under Waterfall is cancelled at any point up to the end, there is often nothing to show for it beyond a huge resources bill.
113) What is scrum and how does a typical scrum process look like?
Scrum is an iterative, incremental framework for agile software development. Scrum is a “process skeleton” which contains sets of practices and predefined roles. The main roles in Scrum are: the “ScrumMaster”, who maintains the processes (typically in lieu of a project manager)
the “Product Owner”, who represents the stakeholders. the “Team”, a cross-functional group of about 7 people who do the actual analysis, design, implementation, testing, etc.
A key principle of Scrum is its recognition that during a project the customers can change their minds about what they want and need (often called requirements churn), and that unpredicted challenges cannot be easily addressed in a traditional predictive or planned manner. As such, Scrum adopts an empirical approach—accepting that the problem cannot be fully understood or defined, focusing instead on maximizing the team’s ability to deliver quickly and respond to emerging requirements.
114) Differences between Black-box and white-box testing
Black-box test design treats the system as a "black-box", so it doesn't explicitly use knowledge of the internal structure.
Black-box test design is usually described as focusing on testing functional requirements. Synonyms for black-box include: behavioral, functional, opaque-box, and closed-box.
White-box test design allows one to peek inside the "box", and it focuses specifically on using internal knowledge of the software to guide the selection of test data. Synonyms for white-box include: structural, glass-box and clear-box.
White box testing has access to the source code, programs, database, registries, libraries.
White box testing is applicable at the unit, integration and system levels of the software testing process, but is typically applied to the unit.
While it normally tests paths within a unit, it can also test paths between units during integration, and between subsystems during a system level test.
Though this method of test design can uncover an overwhelming number of test cases, it might not detect unimplemented parts of the specification or missing requirements, but one can be sure that all paths through the test object are executed.
A white box tester generally uses the code, and the ability to create drivers and stubs to test the code directly.
115) What are the white box test design techniques used?
Control flow testing
Data flow testing
Branch testing
Path testing
116) What are the black box test design techniques used?
Decision table testing
Pairwise testing
State transition tables
Use case testing
Cross-functional testing
117) What is Black box testing?
Black testing takes an external perspective of the test object to derive test cases. These tests can be functional or non-functional, though usually functional. The test designer selects valid and invalid inputs and determines the correct output. There is no knowledge of the test object's internal structure.
This method of test design is applicable to all levels of software testing: unit, integration, functional testing, system and user acceptance. The higher the level, and hence the bigger and more complex the box, the more one is forced to use black box testing to simplify.
While this method can uncover unimplemented parts of the specification, one cannot be sure that all existent paths are tested. Black box tester looks only at the GUI and can not touch intermediate files, registry entries, databases, etc., nor are they permitted to see the results their actions have wrought, other than through the UI. They are, therefore, only permitted to use the UI to do their testing.
118) What is all pairs testing?
All-pairs testing or pairwise testing is a combinatorial software testing method that, for each pair of input parameters to a system (typically, a software algorithm), tests all possible discrete combinations of those parameters.
Using carefully chosen test vectors, this can be done much faster than an exhaustive search of all combinations of all parameters, by "parallelizing" the tests of parameter pairs.
The number of tests is typically O(nm), where n and m are the number of possibilities for each of the two parameters with the most choices. All pairs works because when things break, they have a tendency to break because of the faulty interaction of two things rather than 3 or more.
119) What is Smoke testing used in software development?
A subset of all defined/planned test cases that cover the main functionality of a component or system, to ascertaining that the most crucial functions of a program work,but not bothering with finer details.
A daily build and smoke test is among industry best practices. Smoke testing is done by testers before accepting a build for further testing. smoke test is a collection of written tests that are performed on a system prior to being accepted for further testing.
This is also known as a build verification test. This is a "shallow and wide" approach to the application. The tester "touches" all areas of the application without getting too deep.
120) What are some Report and Enquiry Functions tested?
Input Screen Tests
Update Function Tests
Security
Input Screen Tests
User Documentation
Hardware, Network, Printers
121) What are some Integration Test Examples?
Access to data and functionality in other systems
Conformance to programming standards
Consistency of data held in this and other systems
Consistent look and feel with other parts of the system which have been previously implemented.
Integration with other functions and programs
Passing of information between systems
Performance characteristics e.g.. Elapsed times of queries, movement of cursor etc.
Record locking
Timing issues related to data transfer
Validity of data coming from, and passed to other systems
122) What are some Performance or Stress Testing examples?
Access to archived records
Bandwidth issues
Batch processing windows
Complex transaction processing
Crash recovery time
Month end and year end runs
Performance on machines with a minimum configuration
Performance over WAN
Performance under peak transaction volumes
Performance whilst batch processes running
Printer queues
Response time for enquiry
Response time for printing – particularly documents with graphics
Screen refresh times
123) What are some testing/validations done for Report and Enquiry Functions?
All field names on the report are correct and consistent between reports.
All screen and report layouts are the same.
Blank lines occur where they should
Date and time are printed where they should be
Detail lines which contain only zero values do not print
Field names on reports and enquiry screens are correct.
Fields are edited correctly
Fields print their full name.
It meets the requirements as specified in the Business Analysis
Meets report coding and layout standards
Zero values print as required (blank, 0.00, 00.00 etc)
Page breaks occur where they should
Page numbers change on each page
Program name and number are printed correctly (if required)
Report is printed in the correct sort sequence
Rounding errors do not occur
The report layout matches the users’ requirements
The report/screen layout is appropriate and easy to read
Totals add up correctly
124) What are some Input Screen Tests performed?
All field names across the screens are consistent and correct.
All screen layouts are the same
Automatic duplication of data from one record to another where appropriate
Insert, update and delete operations function correctly across screens
The correct records appear on the screen
The system behaves consistently always giving uniform results
Totals add up correctly and consistently across screens
Skipping mandatory fields
Skipping optional fields
Numerics only in numeric fields (no alphabetic or characters)
Start and end of month and years
Correct format of date and time
125) What is the criteria for User Documentation
Easy to follow
Easy to navigate or find information
Reflect what the system requires the user to do
126) How do you know the software has met specifications when there are no specifications document?
In this case, the customer acceptance can be treated as meeting the specifications.
127) How do you know the software has met specifications?
With the help of traceability matrix. All the requirements are traced to test cases. When all test cases are executed and passed, the software has met the requirements.
128) What is QuickTest Professional?
QuickTest Professional is a Functional and Regression testing tool from Mercury Interactive Corporation, which can record the user actions, keyed in while recording and execute these user actions while we play back (run) the test.
129) How do you decide what test cases to be automated?
When we have a large number of test cases (in most cases we do) we have to carefully analyze them and group them into categories and then decide if that test case should executed on every release/build of the application or not. If the test case is not intended to be executed on every release it should not be automated since it falls into a one time testing category.
Some test cases might be very time consuming to automate where as executing them could be just a matter of 5 to 10 minutes. Such type of test cases should be given the least priority in terms of when to automate them.
Some test cases may have manual intervention for example: when you create an account in the application someone in your team has to do run processes manually in order for you to continue with further testing. These kind of test cases should not be automated unless you have full control of the backend processes to be run for successful completion of the test using QTP.
130. How does QTP work?
QTP has two components:
a) VB Script Language
b) Object Repository
While recording the user actions on the applications QTP will generate the VB Script statements, which indicate the actions it is supposed to perform.
While recording, QTP will also learn the objects present in the application, say for example a Window, check box, radio button etc., and stores these objects in a place called Object Repository. In order to run the test successfully the corresponding object should exist in the Object Repository.
131. What are the modes of Recording in QTP?
There are three modes:
• Context Sensitive, • Low Level • Analog.
Context Sensitive Mode: In this mode QTP records the objects and properties of the objects from the application so that it can identify them while playing back the script. 99% of testing is done using the context sensitive mode.
Analog mode: In this mode QTP records the mouse movements and key strokes on the keyboard as Tracks so that it can help you in testing the situations like signature scanning or handwriting or drawing some objects on the screen or in a window etc.
Low Level recording: In this mode QTP records the objects based on their location by capturing the X and Y coordinates of the objects on the screen.
The Analog and Low Level recording modes can be selected only after hitting the record button. In the picture below the First icon is for Analog recording and the second one is for Low Level recording.
132. What are the modes of running test in QTP and what do they mean?
1). Verify Mode: If the test engineer wants to save the results of the test run to compare and verify with the future runs of the same test he would go with the Verify mode.
2). Debug Mode: If the Test engineer does not want to save the results as he is yet to finish the script or he is
testing his QTP coding logic he would run the test in the debug mode.
3). Update Mode: If a test engineer wants to update the expected results while running the test, say for example while recording the script the calendar date was 10/20/2002 and while executing the test it is a different date (system date), then the test should be run in the update mode other wise the test would fail because of the changed properties of the object.
133. How do you start the Application if you testing one application?
If you are working with just one application:
In QTP we can specify the URL for the application or the exe file of the application within the settings. Go to “Test” menu and select “Record and Run Settings” option. It opens a Record and Run settings dialogue box, which has options to enter the URL of the application for web or exe file of the application if it is windows application.
For the main test, which calls the reusable actions, we can use the option “Open the following browser when a record or run session begins”. Once the application is open we don’t need to open the application again so for all the reusable action we can use the option “Record and run test on any open Web browser”. But we should make sure that all the browsers except TestDirector are closed before recording or running the tests.
For windows applications we can select the application by clicking the “Add” button and browsing the executable file of the application.
134. How do you start the Application if you are testing multiple applications:
At workplace usually we will be working with more than one application and we might need to automate the test cases for these applications. In this situation we should select the Radio button “Record and run test on any windows based application” for non web based application or “record and run test on any open browsers” for web applications which will instruct QTP not to open any application by itself. Then we need to include the statement SystemUtil.Run in the Login script /Action and execute that as the first action in the flow of actions.
135. What statement would you use to send the results to the test results?
I would use Reporter.Reportevent followed by the step name, description and result to send the result to the test results and get the status whether the step passed or failed.
136. What are the standard Object classes?
Developers assign properties to each object on the application. Object class is an industry
standard to identify a particular type of object in the application and some of the commonly used standard classes are:
• Window
• Dialog box
• Menu
• Push button
• Edit Box
• Checkbox
• Radio button
• List box
• Combo box
137. How do you identify an object if it is not associated with any standard class, using QTP?
Non-standard objects are represented with a special Tri-colored shape in the Object Repository.
138. What are the types of Object Repositories in QTP and how do we define them?
QTP has two types of Object Repositories.
1. Per Action
2. Shared
We have to specify what type of object repository the action should use before doing any recording in the test. Go to “Test “menu and select “Settings” and from there select “Resources” tab. In the bottom frame we can select the type of repository we want to use.
By default it is “Per Action”. But if we are going to have more than one action, which is the common scenario and if we need to call the reusable actions from the other actions we should select the shared option and browse the object repository.
If the shared object repository does not already exist QTP will create one for you at the specified location with the specified name. Shared object repository will have an extension of .tsr and per action repository has an extension of .mtr. Once you do any recording in that script the selection option of this repository is disabled.
139. What are the QTP 9 Changes:
In QTP 9 and 9.1 the Object repository section is taken off from Resources tab. Now we can have any number of Shared Object Repositories associated with an action. In QTP 9 all the objects will be recorded into the local repository and we need to export the objects from local repository into the shared object repository by opening the object repository and selecting File Menu and selecting “Export Local Objects”. You need to specify the name for the shared object repository in which you want to save these objects. Associating multiple Object repositories for a test:
Open the object repository of the action and click on the icon Associate Repositories on the tool bar. Associate repositories window opens. Click on the green “+” sign and browse the shared object repository and select it. All the actions which are available in that script will be shown in the Available Actions section of that window. Select the action which you to associate the repositories to and click on the “>” arrow to send it to the “Associated Actions” section of the window. This will ensure that the actions in the associated actions will have access to all the objects in the associated object repositories. You can associate any number of object repositories.
140. Differentiate between the two modes:
Object Repository Per Action Mode and Shared Object Repository Mode.
Object Repository Per Action Mode
In this mode there is no need to save the Object repository. It is automatically loaded with the script and saved into the script folder. The effort to maintain Object Repository is relatively less, but if we have a lot of tests we get confused with the Object Repositories and when a change is made in application it has to be modified in all the Object Repositories.
Shared Object Repository Mode
We can have the luxury of having just one Shared Object Repository no matter how many tests we have. We can attach the same repository for every action or test. Whenever an object’s property is changed we can just change that in one Object Repository and all the tests will be fine.
141. What are Object Properties?
Most Objects will have two types of properties defined within the application.
Runtime Object properties
Test object properties
142. What is Runtime Object Properties?
These are the properties which an object attains based on the condition within the application. Eg. The FLIGHT button is designed to have a runtime property of enabled=False when we open the Flight reservation window and once we select the Date and fly from and fly to this objects runtime property is designed to change the enabled=True.
143. What is Test Object Properties?
These are the properties defined within the application for each object which will act as base properties and they may not change dynamically.
144. Can we have a separate function library for QTP?
Yes, QTP functions can be written and stored in a VB Script file which has an extension of .vbs (plain text file stored with an extension of .vbs) and we can attach that file in the “Test” ”Settings” ”Resources” and under resources we have the top most section which says “Associated library files”. Click on the “+” sign in that section and browse the VB Script file which has the functions you created.
E.G. 'Function to close all browsers before starting the test execution can be given as:
call CloseAllBrowsers()
or simply CloseAllBrowsers()
145. What is a Function ?
Function is a program which takes in the arguments or parameters and does the steps specified in the program and ultimately gives you an output.
146. How does function Return Value?
A function should return a value in most cases. This return value can be used in the script where the function is being called for various reasons. A return value should be returning either a variable from the function or value calculated in the function or any value string which you specify within the function such as “Pass” or “Fail”. To return a return value give the function name = Value to be returned.
Example: If the return value given by Login function is “Pass” or “True” you may want to continue further testing else you may want to end the test if it returns a value of “Fail” or “False”.
All the functions should be stored in a common function library. Open a blank notepad file. Paste all your functions in that and save that file with an extension .vbs and with a name which can identify it as a function library.
Save this file under a new folder called “FunctionLibraries” in the project folder. VBS stands for Visual Basic Script. Once you save the library go to QTP and select Settings from the File menu. Test Settings window appears. Go to Resources Tab. You will see a section called Function Libraries. Click on the Green “+” sign in that and browse your function library which you saved in the project folder. Now all the functions present in that library will be available to all the scripts with this settings. You can save any number of functions in one .vbs file but for maintenance purposes it is better to limit the number to 50 functions or build a separate function library for each module within the application if these modules are large modules.
Where ever we need to call a function press F7 and the Step generator window will open. From the top drop down, select Functions and then from the second drop down, select library functions. Now you will be able to see a list of all the functions present in all the libraries which you attached to that script. Select the function which you need to use, give the arguments and press Insert button. The function call will be inserted in your script at the cursor position.
147. How can you map a custom class to a standard class in QTP?
Custom object is an object which is not recognized by QTP and it is recorded as WinObject, but if you think it can be used as a standard object such as edit field or radio button we can map it to that standard class.
Select Tools .
Object Identification.
In the Object Identification dialogue box select Standard windows in the Environment box. The user-defined box will now be enabled. Click User Defined. The object mapping dialogue box opens. Click the hand icon and click on the object whose class you want to add to user-defined class. In the Map to box select the standard object class to which you want to map this user-defined object.
148. How can you see if you are getting the right value into the variables?
I can use MsgBox followed by variable and the test will pause and show the value present in the variable. The other way is, using the debug viewer where you can see the value of each variable in the runtime. To activate debug viewer select Debug viewer from view menu or click on the icon for Debug Viewer represented by the spectacles (eye glasses) on the toolbar.
149. What is Data Driven Testing?
Data Driven Testing is a process of entering variable values into the application taking them from the data sheet. Variable values can be passed into QTP through the Global sheet or local sheet depending on the architecture you are using. The easy way to parameterize the data is through the Keyword view.
From the keyword view select the object whose value you want to pass through the data table. Click in the Value column for that row and you will see a little <#> sign in the right hand corner of that cell. Click on that and Value Configuration Options window will open. This will have two main radio buttons Constant and Parameter. You can see the current value present in the Constant edit field. Select the Parameter radio button. Select DataTable from the drop down next to parameter. (You can also select the other two options present in the drop down Environment or Random Number.). Now enter the field name from which you want to select the data. If that field doesn’t exist QTP will create one for you. Then select from which data table you want to enter the
data. You can enter the data either from the Global sheet or Current action sheet (local table). Now click “OK”. The field will be created for you and the data for that field is taken from the data table instead of having a hard coded value within the script.
150. What are the statements you would use to get the values from the application into your variables?
We can use GetROProperty and specify what property of the object you want to get into the variable.
151. Can we write the data into data table, using QTP?
Yes. We can write the data grabbed into the variables. This is done during the record mode. Start the record session and from the “Insert” menu select “Output Value” and based on the type of object we need to select either Standard Output value or Text output value. For example if the object is a list item or edit box select Standard output value. QTP will then show the object properties and now we need to select what property we want to output. In this case it is the “Value”. Also we need to specify the field name into which we want to send the value and the data table whether Global sheet or local sheet. QTP will suggest you a field name you can either accept or change it according to your naming convention.
If the Text we want to capture is the text displayed on the screen by the application use the “Text Output Value” and point the text, which you want to capture and give the appropriate field name and table.
Note: This output value is shown only in the runtime and once the test execution is finished the data can not be seen in the data table. But you can see the data in the Runtime data table in the results.
152. How can you send the variable values to the data table.
The variable values can be passed to the local or global tables programmatically. If the varPolicyNumber is the variable which holds the policy number which needs to be sent to the data table we can send that value into local sheet using the following statements into the Policy_Number column in the local sheet of the action.
varPolicyNumber = “123456”
DataTable(“Policy_Number”,dtLocalSheet) = varPolicyNumber
To send the data to the external excel file:
We have to define the automation objects to work with external excel file.
Set ExcelObj = CreateObject("Excel.Application")
The above line creates an Excel object ExcelObj which has reference to open excel file.
ExcelObj.Workbooks.Open “C:\Data\OutPut.xls”
Above statement opens the excel file “C:\Data\OutPut.xls” in the background.
Set NewSheet = ExcelObj.Sheets.Item(“MyOutputSheet”)
The above statement creates a sheet called “MyOutputSheet”
NewSheet.Cells(2,1) = VariableName
The above statement will populate the value present in the VariableName variable to the second row and first column of the sheet “MyOutputSheet”.
153. What is relative path and what are the advantages of it? How can you implement the relative path?
Relative path is a way of instructing QTP to search for the resources like Actions, Repositories, Function Libraries and Data Tables by just specifying the name of the resource. This is a very useful and powerful feature of QTP and can save weeks of operational time when the project has to be migrated to a different place from the existing drive.
For example you developed all the scripts in the shared drive on the network and now your department bought TestDirector or QualityCenter and ask you to migrate all the scripts into TestDirector or QualityCenter. In the normal path or absolute path we go to the resources tab in the Test Settings and browse the resources for that script or action. If you have to change the location of the scripts you have to open each script and change the pointers to the resources in the resource tab. This could take from days to weeks depending on the number of scripts you have.
The worst part is when you have a flow where you have calls to the reusable actions following the absolute path, you will have to build the whole new flow to replace the existing flow. On the other side if you have followed the relative path it is a one step process and could take not more than 10 minutes to change the resources. So question is how to implement the relative path mechanism. Go to the Options from Tools menu and select Folders tab. Click on the green “+” sign in the search list section. Now browse the folders one by one where you store the actions, function libraries, data tables, object repositories, environment variables etc. Now whenever you are making calls to the resources just give the resource name excluding the path. QTP will search the search list folders for the resource specified and find the resource. When you migrate from one location to the other, you just have to go the folders tab in Options and delete the old folders and enter the new folders where your resources are residing.
154. What is Regular Expression?
When you have an object in your application whose properties keep changing dynamically based on the state of the application, we need to manage these objects using the regular expressions.
155. What is Active Screen and what are the advantages of it?
Active Screen is the snapshot of the application captured by QTP as it records on each object in the application. It shows the screen object corresponding to the script line where the cursor is currently positioned. This will help us in debugging the script. The Active Screen can also be used to put checkpoints in the script to check the functionality of the application.
156. What are checkpoints and how do you implement them?
Checkpoints are the verification points you insert to validate a particular part of the application.
157. What are the different Types of Checkpoints:
There are 7 types of checkpoints we can implement in QTP.
1. Standard Checkpoint
2. Text Checkpoint
3. Bitmap Checkpoint
4. Database Checkpoint
5. Accessibility Checkpoint
6. XML Checkpoint (From Application)
7. XML Checkpoint (From Resource)
In the below shanpshot only Database Checkpoint and XML Checkpoint (From Resource) are the only ones which are highlighted and the rest of them are disabled and will be available only when you are in the record mode.
158. How can you implement checkpoints?
Checkpoints can be implemented in two ways:
Using Active Screen:
Select the object from the Active Screen on which you need a checkpoint and right click. You will see a menu.
Select Insert Standard Checkpoint. You will be getting to the next screen showing the object in the tree view. Select the object from the tree and you will go to the Checkpoint Properties window.
From this window select the properties you want to be checked every time you run the script. Each property can be either hard coded (i.e. leave the existing value as the expected result) or can be parameterized from the data table value or you can specify a regular expression for that property.
Recording checkpoints on live application:
To record the checkpoint on the running application you should start the record session and select Insert Checkpoint .
Standard checkpoint from the Insert menu. Then point the hand icon to the part of the application on which you want to insert the checkpoint.
159. What is Text Checkpoint?
When you want to check if a specified text is displayed or even not displayed on the application screen we can use Text Checkpoint. For example if you want to verify that the “Flight Details” heading is displayed everytime you run the regression test you can do that while in the record mode. Select
“Insert” Checkpoint. Text Checkpoint and point the hand icon to the text you want to verify. Text Checkpoint Properties window will open and it displays the
text you clicked on in red which indicates that the verification will be done for that text and the drop down will have the “Checked Text” selected.
160. What is Bitmap Checkpoint?
Bitmap checkpoints can be used when you want to verify that an image appears on the screen (Example; Logo of the company). Bitmap checkpoints depend very
closely on the screen resolution and can fail even when there is slight variation in the screen resolution. For example if you record the checkpoint on a laptop and try to run the same script on a desktop you might see a failure in the bitmap checkpoint. I strongly recommend avoiding bitmap checkpoints and instead write a function to verify the images using the .Exist method on the image you want to verify which should return “True” when the object exists and “False” when object does not exist.
To create a Bitmap Checkpoint, start recording and select Insert Checkpoint Bitmap Checkpoint and point the cursor to the image you want to check.
161. What is Database Checkpoint?
Database checkpoint can be used if you want to verify that the data you want to verify (expected result) exists in the database as expected. When you create a database checkpoint you should specify the SQL query which fetches the data you want to store in the checkpoint as the expected result and when you run the checkpoint QTP will check the database values using the stored SQL query in the checkpoint against the stored values in the checkpoint. To insert the database checkpoint select Insert . Checkpoint Database Checkpoint.
You will see a Database Query Wizard window which will guide you through the process of creating a database checkpoint. Check the Radio button “Specify SQL
statement manually’ to enter the SQL query in the next screen. Select the checkbox beside “Maximum number of rows” and enter the number of rows you want to extract for the query you specify in the checkpoint. This step is optional but if the database is large and has millions or thousands of records you might want to extract only a limited number of rows. Click “Next”.
The next screen will have the sections to specify the Connection string and SQL Statement. Connection string is a way of instructing QTP about the database you want to connect to extract the data.
Click on the button “Create” and you will get the “Select Data Source” window. In this window you can select the data source which is already defined in that
machine or if it is not listed you can create a new one by clicking “New”. Click “New” button. “Create New Data Source” window opens up listing all the
database drivers. Select the database driver which suits your database and click “Next”.
In the next screen give the relevant file name which will be your new Data source Name (DSN) and click “Next”. On the next screen Click “Finish”. “ODBC Microsoft Access Setup” window opens. The window title changes with the database you are connecting to.
In this screen you need to select the actual database name to which you to connect to. Click on “Select’ and “Select Database” window opens.
Browse through the network to find the database file which acts as your database and click “OK”. Click “OK” to close the “ODBC Microsoft Access Setup” window. You will be taken back to the “Select Data Source” window where the name which you specified for the DSN can be seen and it is selected. Click “OK” to close the window and the Connection string section of the “Database Query Wizard” will be populated with the connection string which has all the information you specified in the earlier steps. Enter the SQL query in the SQL Statement section and click “Finish”.
Database Checkpoint properties window opens up with the data resulting from the query you specified.
You can leave the data as it is if the data should always be static or you can parameterize the data if you want by clicking on the “Paramater” radio button and specifying the table column for each cell. By default all the data cells are marked for check but if you want to deselect some of them you can use the following buttons by selecting each cell in the checkpoint. The first icon starts for “Add to check” and the second one stands for “Remove from check”.
Click “OK” to insert the checkpoint. The statement “DbTable("DbTable").Check CheckPoint("DbTable")” is inserted one line above cursor position if you selected the Radio button “Before current step” or one line below your cursor position if you selected the option “After current step”.
162. What is Accessibility Checkpoint?
Accessibility Checkpoint is used to find out if the application coding standards meet and follow the standard set forth by W3C (World Wide Web Consortium).
By default this checkpoint is configured to check only for the Alt tag property check for each object referenced in the application.
In order to configure the checkpoint to check other standards and checks on a web page, go to Tools -> Options menu, click on Web tab and then click on the
button “Advanced”. You will get the “Advanced Web Options” window.
Select the various attributes you would like to be included in the Accessibility Checkpoint, by checking the checkboxes beside each Check under Accessibility
checkpoint section of the window. Then click OK to close the window and click OK to close the Options window. Now you can insert the Accessibility checkpoint by starting record session and going to Insert Checkpoint and selecting Accessibility Checkpoint. Then point the web page you want the checkpoint on.
163. What is XML Checkpoint (From Application) ?
XML Checkpoint (From Application) is a way of recording the checkpoint on the application which is XML based to verify that the XML values are properly
displayed on the screen. Open the application which is XML based and start recording and select Insert CheckpointXML Checkpoint (From Application)
and point the hand to the XML based web application. QTP will capture all the XML tags and values along with their child elements and stores as the properties.
You can uncheck the attributes or node values which you do not want to include in the checkpoint. Also you can specify the level of checking the child elements by incrementing the number under the checkbox “Check number of child element occurrences in block” after checking the checkbox.
Since more and more application being build these days are XML based application this is a powerful feature QTP provides us to validate that the data is
consistently displayed every time a new build is given to QA team. We can also parameterize the checkpoint properties by clicking on the value attribute of each node. Click on the <#> sign in the value field and you will get the Value Configuration Options window where you can either select the data from the data table or use a regular expression.
164. What is XML Checkpoint (From Resource) ?
You can check the contents of an XML file using this checkpoint. This can be recorded even when you are not in the record mode. Once you select to insert
this checkpoint XML Source Selection box comes up.
You can browse the folders and select the XML file on which you want this checkpoint. This checkpoint verifies that the XML file has the same nodes and
values both while recording the checkpoint and when when it is played back. Variations in the XML source may cause the display problems in the application
which is actually using these resource files and hence checking for consistency of the XML source file is very important for checking the XML based applications.
165. What is WinRunner ?
WinRunner is a Functional and Regression testing tool from Mercury Interactive Corporation which can record the user actions keyed in while recording the WinRunner script and execute these user actions while we Play back (run) the script.
166. How does WinRunner work?
WinRunner has two components: c) TSL: Test Script Language d) GUI Map
While recording the user actions on the applications WinRunner will generate the TSL statements which indicate the action it is supposed to perform. The TSL is the proprietary language of Mercury Interactive which has ‘C’ language syntax.
While recording, WinRunner will also learn the objects lying in the application, say for example a Window, check box, radio button etc., and store these objects in a place called GUI Map. In order to run the TSL script successfully the corresponding object should exist in the GUI Map.
167. What are the modes of Recording in WinRunner?
There are two mode: Context Sensitive and Analog. Context Sensitive Mode is used when the objects in the application are recognized by
WinRunner by their names. Most of the test is done using this mode. Analog Mode is used to handle the situations where the application objects are not recognized by their names and we are force to go by position and this is very useful in handling the situations like entering the signatures or drawing some objects on the screen or in a window.
168. What are the modes of running of test in WinRunner and what do they mean?
There are three modes of replaying the test.
a). Update Mode
b). Verify Mode
c). Debug Mode
a). Update Mode: If a test engineer wants to update the expected results while running the test, say for example while recording the script the calendar date was 10/20/2002 and while executing the test it is a different date (system date), then the test should be run in the update mode other
wise the test would fail because of the changed properties of the object.
b). Verify Mode: If the test engineer wants to save the results of the test run to compare and verify with the future runs of the same test he would go with the Verify mode.
c). Debug Mode: If the Test engineer does not want to save the results as he is yet to finish the script or he is testing his WinRunner coding logic he would run the test in the debug mode.
169. Did you have to change the TSL code in order to run your test anytime?
TSL is generated by WinRunner while recording and to suit our testing needs we should always change the TSL. Just recording and running the script will not be sufficient for testing. Say for example we want to send multiple rows of data from an excel file into the application through data
driven testing we need to modify the script and implement the “for” loop and to send the results to the test results we will have to use the “if” statements to compare the results.
170. How would you start a web application?
I use web_browser_invoke(browser, site);
Eg: web_browser_invoke(IE, “http://www.mercuryinteractive.com”);
171. What statement would you use to send the results to the test results?
I would use tl_step to send the result to the test results and get the status whether the step passed or failed. If I want to send a user message with no comparison I would use report_msg statement. Advantage of using tl_step is it passes the result to the TestDirector also.
172. When you are testing an application if there is a button with a dynamic label, how do you handle the name of this button?
I will use the regular expression for the button’s label attribute in the GUI Map so that WinRunner will recognize the button labeled say for example either “Submit” or “Done”.
“![SD][uo][bn][me].*”
In this case regular expression is a way of instructing WinRunner to continue further, identifying the object with the label “Submit” or “Done” as the same object. This will also apply for Windows whose title keeps on changing based on the data present in the window. For example a window displays it’s title based on the customer name. When you record it records the window name with the customer name you entered say, CustomerName1 and when we pass parameters through data driven test it fails on this window since the second record might have a different customer name. To solve this we need to go to the GUI Map editor, select the window and modify it’s label in the physical description. If it is displaying WindowName CustomerName1 change it to “!WindowName.*” so that it ignores anything after the WindowName.
173. How do you identify an object if it is not associated with any standard class, using WinRunner?
1. GUI spy can be used and the class will be object for non-standard objects.
2. We can use WinRunner record and see for obj_type or mouse_click.
3. We see the non-standard objects in GUI Map as tri colored triangles.
174. When you load an additional test while WinRunner is in the “GUI File per Test” mode, what happens to the loaded GUI files and objects in the temporary GUI buffer?
In the “GUI File per Test” mode GUI Map files are associated with the test they are attached and when we load another test the associated GUI map of that test is loaded. When the tests are saved they are automatically saved into the Test folder along with the test. If you load an additional test we get a warning. WinRunner shows only the GUI Map attached to the current test and it reads the objects from the active script’s GUI Map.
175. How do you merge the GUI Map files present in a directory into one file?
Go to Tools > Merge GUI Map Files>Click OK in the popup window if you saved all the tests and GUI maps otherwise cancel and save them.
GUI Map File merge Tool opens:
Select Auto Merge from the drop down list.
Specify the target GUI Map file you like to create.
Click on Browse Folder to select folder which has the GUI Maps you would like to merge and click OK and Click OK again.
If the files are present in different directories we need to browse them individually and get them into target GUI Map.
176. Differentiate between the two modes: GUI Map File per Test Mode and Global GUI Map File Mode.
GUI Map File per Test Mode
In this mode there is no need to save the GUI File or care for loading it into the script. It is automatically loaded with the script and saved into the script folder. The effort to maintain GUI File is relatively less, but if we have a lot of test scripts we get confused with the GUI Files and when a change is made in application it has to be modified in all the GUI Files.
Global GUI Map File Mode
We can have the luxury of having just one GUI Map file no matter how many tests we have. This removes the headache of calling a different file for each script. We can call the same file for every script. Whenever an object’s property is changed we can just change that in one GUI File and all the scripts will be fine. But the maintenance of the GUI Map will be a tough job and will need an expert specially assigned to do it.
177. What statements will you use to ensure that only the required GUI file is the only file loaded when WinRunner is invoked?
I would make a startup script and include these statements:
GUI_unload_all();
GUI_close_all("
GUI_load("C:\\MyGUI.GUI");
178. What is a startup script and how can you make a script as a startup script?
It is a good practice to have a special script for every project you work on and make it a startup script. A startup script is the one which gets executed automatically when WinRunner is started.
This is useful in storing any Global variables, statements to load compiled modules etc. We can make a script as startup script by going to Settings - General Options -.
Environment and specifying the script in the startup script field.
In this script you can define the Exception handlers, Public variables which can be used in other scripts of the project, load the compiled modules containing your user defined functions, statements to add these user defined functions to the Function Generator so that you can access those functions using F7 key.
179. How can you load the function library so that while replaying, WinRunner doesn’t show script execution of the called functions?
reload("C:\\TestFolder\\MyFuncLibrary",0,1);
“0” indicates that it is a User Module
“1” Indicates that the script execution of the function should be hidden.
180. How can you map a custom class to a standard class in WinRunner?
Custom object is an object which is not recognized by WinRunner, but if you think it can be used as a standard object such as edit field or radio button we can map it to that standard class.
set_class_map("custom object","standard class");
set_record_attr("custom object","class vb_name", "MSW_id", "location");
set_record_method("custom object", RM_RECORD);
181. What are the New Line characters in WinRunner?
Combination of “\r\n” is a new line character which breaks the line and types into the next line. This can be used in pause() statements, split statements etc.
182. How would you split a date which is in the format “mm/dd/yyyy”?
date = 12/12/2008;
split (date,datearray, "/");
Month= datearray [1];
Day = datearray[2];
Year= datearray [3];
In this example date is a variable which is holding a date value, “/” is the delimiter. If we have a different delimiter such as “$” or ‘,’(Comma) we need to use that or we can use a combination of more than one delimiters if required.
183. How can you see if you are getting the right value into the variables?
I can use pause(variable); statement and the test will pause and show the value present in the variable. I can also see the variable by placing the cursor on the variable and clicking on Add-watch icon in the tool bar.
184. What is Data Driven Testing?
Data Driven Testing is a process of entering variable values into the application taking them from an excel sheet.
185. How do you perform Data Driven Testing using excel data?
I go to Tools and select Data Driver Wizard and select the excel file where the data is lying in the table field of the dialogue window and give a name for the variable holding the name of the table, usually I go with the default. I check the checkboxes which says parameterize the TSL script which will help me in getting the TSL statements to call the data from the datasheet or excel sheet . Then I continue forward skipping the option of parameterize the field values option. I will be getting the code into my script:
186. When a test script fails in a data driven test can we still handle the table without deleting the rows?
When I initially started working with data driven testing, whenever I had a failure in the test execution for any reason (mostly due to application constraints) I used to delete the rows which are already populated into the system. Later I started not to delete but to change the starting row number as table_Row= 11 for example to start with 11th Row for next run.
When you enter some new information in the data table and save it, it will not save the new information and it gets saved when you step out of the field in which you entered the new data before saving. This kind of behavior is not in Excel but this is the case only with the data table. So we have to be careful.
187. What are the statements you would use to get the values from the application into your variables?
I can use any of the following statements depending on what type of object it is:
edit_get_info("Price","value",variable1);
obj_get_text("Price", variable2);
button_get_state("Insert Order", OutState);
ActiveX_get_info(object1, "Year", variable3);
188. Can we write the data into excel using WinRunner?
Yes. We can write the data grabbed into the variables and for doing this the table must be
opened in the READWRITE mode for example: ddt_open(table, DDT_MODE_READWRITE);
We can use ddt_set_val, ddt_set_val_by_row, ddt_save functions to write the data to the excel.
189. What are the statement you can use for table operations?
I can get the table row count using the tbl_get_rows_count statement.
190. How can we read the data from a notepad or text file?
We have to use file commands to read from the notepad or Comma Separated Values (CSV) files.
Example:
file_open("C:\\MyTest\\myfile.txt",FO_MODE_READ);
will open the file in the Read Mode. FO_MODE_WRITE will open it in write mode.
while(file_getline("C:\\MyTest\\myfile.txt ", line)==E_OK)
{
split(line, array, “,”);
variable1 = array[1];
variable2=array[2];
TSL statements follow here..........
}
The above statements get a line from the file and store it in the form of a string in the variable called “line”. We can later split this string using split function and store the values into an array and then use these values into variables as specified above. The comma is the delimiter which is separating one field from the other, in the above example.
191. How can you compare the contents of two text files?
We can compare the contents of two text files using file_compare function.
file_compare(“C:\\MyTest \\actual.txt", “C:\\MyTest \\expected.txt","comparefile");
In the above example the first file has the actual values from the application and the second file has the expected results and compare file shows us the differences if any. If there are differences, the test results window will show that as failed and if you double click on that line in Results window the WDiff window appears. The differences will be highlighted in Red in this WDiff window. These colors can be customized by going to Options -. Colors in the WDiff window.
192. How can you concatenate two or more variables into one string?
We can use “&” symbol to concatenate the strings.
Example:
DTMonth= January;
DTDay = 12;
DTYear = 2003;
CalDateText = DTMonth&","&DTDay&"."&DTYear;
In the above case CalDateText will have a new value of DTMonth, DTDay and DTYear.
193. Can we run the operating system commands (DOS) from WinRunner?
Yes we can.
For Example : dos_system("ver>C:\\MyTest\\version.txt"); will execute the “ver” command and redirect the output to the version.txt file.
194. Did you develop any functions using WinRunner?
We need to write the functions which are required for our testing effort. Mention the functions developed using WinRunner
195. Can we a use the built-in functions inside a compiled module?
Yes we can. But compiled modules can not take the checkpoints or analog inputs which are also the built-in functions. The reason is that the compiled module is not intended to test but to store the functions which we regularly needed to use.
196. If you want a function library loaded every time WinRunner is invoked, what do you have to do?
The (re)load statement has to be placed in the startup script to achieve this.
197. How can see the ActiveX properties of an object using WinRunner?
We can see the methods of ActiveX Controls using the ActiveX tab of the GUI Spy in tools menu.
198. What are the different ways a test engineer can update the expected results of a check_gui statement.
1). We can go to GUI checkpoint results window and select the line which is marked ‘X’ and select update expected results tool from the side tool bar.
2). From GUI checkpoint results window, we can select edit expected value tool after highlighting the error checkpoint value, and edit the expected result.
3). We can run the test in the update mode to update the expected results.
199. How do you check if an image or logo is appearing or not on the application using WinRunner ?
I would create the GUI check point so that whenever the image is not present or there is a change in the image size the test will fail. I would check the status of the GUI check point execution by grabbing that into a variable. If the result is “0” I would send a PASS statement and if the result is “1” I would send a FAIL statement to the test results using tl_step statement.
200. What would you do if your script has failed saying “Object can not be found”?
First thing I will do is to check the set_window statement and make sure that the script is reading correct window in which the object is present. In most cases this will solve the problem. In some cases even though the set_window statement is correct, the time taken for the window to appear might be longer than the recorded time due to network issues while running the test, in this case I will increase the time within the set_window statement. If this problem still exists I would check for the object within the application and if found I will check the name of the object using GUI spy from WinRunner. If the object name is changed I will incorporate these changes both to the object in the GUI Map and also in the TSL script.
201. What is your procedure to make your functions appear in the Function Generator?
I create all my functions in a file and go to File --> Test properties and change the file type from Main Test to Compiled Module. I will have a startup script in which I will include the reload statement which loads this function module with all my functions whenever WinRunner is invoked. eg: reload(“C:\\MyFuncLib”, 0,1); I will then include the statements : To add my_functions category into the Function Generator
To add function to the generator
To add function to the my_functions category
202. What is the difference between a wait point and a synchronization point?
Wait point and synchronization point both will pause the script execution for a certain amount of time but if we are using the wait point even if the object or window appears WinRunner will still wait for the specified number of seconds where as if it is synchronization point, the script execution continues once the object or window is visible. Example: wait(10); will pause the script execution for 10 seconds. set_window(“Flight Reservation”, 20); will wait for a maximum of 20 seconds but will continue further if the window appears in 5 seconds also.
203. How do you run the scripts in the batch mode?
There are two ways for this. I can create the scripts from the TestDirector and Create the Test Set in the TestDirector and select the tests to be run in a batch mode. If there is no TestDirector I can call all my tests into one Main Test file using call statements and run them in a batch mode. I can change my settings in the general options so that batch tests will not fail even there are errors and all the errors are listed at the end of the test.
Example:
call "C:\\ Functional_Testing\\MyTest1"();
call "C:\\ Functional_Testing\\MyTest2"();
204. Can we test database using WinRunner?
Yes. We can test the database values to some extent using WinRunner by using the database checkpoints. These checkpoints will fail when the data in the database gets changed.
205. How do you connect to the database from WinRunner?
We have to use the db_ statements: db_connect: will connect to the specified database using the session name in the statement.
This requires a Data Source Name(DSN) to be created. DSN will hold the information about the database connect string, user id and password.
DSN can be created from WinRunner or you can go to control panel ---.
Administration Tools to create DSN.
db_check: We can use this to compare the current data in the database to the expected
database data.
db_execute_query: This can be used to execute a SQL statement and get the data from the database.
db_get_row: gets the contents of the row delimited by tab into a variable which we can split this into an array of elements using the split statement.
db_get_field_value: gets the value from a single field from the database.
db_write_records: We can write the database information a text file using this.
db_disconnect: This will disconnect the current session from the database.
206. If you encounter unexpected windows popping up in your testing process using WinRunner, how would you handle them?
I can write the exceptions using define_popup_exception statement in my startup script. I can use the built in recovery functions like win_press_cancel, win_press_ok or win_press_return within the exception which will handle the popup window appropriately.
207. What are the initialization files needed for WinRunner and TestDirector?
Wrun.ini and mercury.ini files are the most important initialization files we need to understand. These files will store the WinRunner and TestDirector configuration information. Example: XR_TSL_INIT=C:\MyDirectory\MyStartup present in the C:\Windows\wrun.ini file will make your MyStartup script as a startup script. These files are modified automatically by WinRunner when we make changes to the settings from the General Options, but, when we apply patches to WinRunner or download the add-ins we might need to modify them by opening these files in notepad.
208. Can you handle the situations where you will have to change the properties of the objects within the GUI Map while running the test?
Yes. For example if I want to change a custom object class to edit while running the test I would use:
GUI_buf_set_desc_attr(GUI_ PATH,"MyApplication","MyObject","class","edit");
I would change back the property to the object class using:
GUI_buf_set_desc_attr(GUI_ PATH,"MyApplication","MyObject","class","object");
209. How can you run a test by minimizing the WinRunner window?
For this we need to use the Window API functions. We need to load the required Dynamic Link
Libraries.
load_dll("user32.dll");
# Loads the user32.dll that contains the ShowWindow API function
extern int ShowWindow(long,int); # Define the ShowWindow API function
#Getting the Handle of the WinRunner window
win_get_info("{class:window,label:\"!WinRunner.*\"}","handle",handle);
We can also write TSL to check if Tester wants to run WinRunner mimimized
Response=pause_test("Do You want to run the test Minimizing WinRunner?", "&Yes", "&No");
if(Response == 0)#If Response is Yes minimize WinRunner
{
ShowWindow(handle,6);
# Send a message to WinRunner to minimize the window
}
At the end of the test we can restore the WinRunner window again by using:
win_restore("{class:window, label: \"!WinRunner.*\"}");
unload_dll("user32.dll");
210. If there is a situation where you will be doing the scripting with WinRunner and someone else will execute those scripts, say for example, Business Analysts, is there any way you can monitor who is executing the scripts?
Yes. I can use the create dialogue commands of WinRunner and take the name of the person executing the scripts and also take the time of execution and send the information to the Excel sheet so that I can refer it and say who executed those.
211. While performing the regression testing with WinRunner you might encounter some new objects in an existing window. How do you manage this situation?
I would record these new objects, go to the GUI Map Editor, I can see the new objects recorded into Temporary Buffer. I would expand the GUI Map Editor by selecting the Expand button in the bottom of GUI Map editor. That will show me the existing GUI File in a window and Temporary buffer in another window. I will then double click on the window which has new objects recorded in the temporary buffer, select the objects from that window and click on move button so that they will be moved into my GUI File. (If we try to move Window itself it will overwrite the existing window in the GUI File and the objects already there in that window will be lost.)
212. What are the Checkpoints and how do you create them?
Checkpoint is the procedure of capturing the object in the window or on screen and to verify that that is appearing every time you run the test for example the company logo which should appear at a particular coordinates on the screen. We can create a checkpoint going to Create Menu and Select the GUI Checkpoint if it is an object like a push button or radio group you want to check or select Bitmap Checkpoint if it is an image like a company Logo. In the picture below “Insert Done” will appear once the order is inserted and you might want to capture that and check if that is appearing every time you run the test. You need to use the GUI Checkpoint for Object/Windows.
213. When dealing with Credit Card Numbers the DataTable replaces numbers with zeros. If you encounter this situation how do you handle this?
When we import credit card numbers into data table from Oracle it looks like everything is fine but when you put these cards into application they get rejected. The reason is that the data table replaces some of the numbers with zeros. The solution is to take the credit card numbers from the oracle screen and paste them in notepad. Delete the spaces manually. Copy them and paste them now into data table from notepad. Now select the format type as fraction for that column.
214. Did you face any problems starting WinRunner anytime?
Some times we see that the WinRunner doesn't start and it says the Testing tool is being terminated and it asks us to check the log file. The reason for this is that the WinRunner engine is open and there will be an icon of WinRunner in the bottom left corner of the status bar. We need to right click on that and choose close WinRunner twice and then start WinRunner which will start normally.
215. What is TestDirector?
TestDirector is a test management tool with which we can manage our entire testing process. It is a central repository where we can store our Requirements, Test Plans, Test Cases and Test scripts and execute the test cases and test scripts. We can share the work with other QA testers using TestDirector since it is a web based test management tool.
216. How are the Projects organized in TestDirector?
In TestDirector the Domain Occupies the Top place and within that domain, administrator can create any number of projects. A user has to select the domain from the domain list available and to which he has access and select the Project on which he/she is supposed to work from that domain.
In each project, he/she can create the Test Plans for different releases of each project as separate folders for easy access and traceability.
217. What is the Process of Setting up users in TestDirector?
Setting up users in TestDirector can be done only by the TestDirector Administrator (TDAdmin). On the Home Page of TestDirector Click on Customize. It will ask for the userid and password. Select the Project you want to Customize. Enter the administrator User Id and Password. You will be taken to the Project Customization Screen. You will see the Setup Users on the left of the screen. Click on that link. You will see the list of users already assigned for that Project. You can add a new user by clicking on Add User button. Give the details of the User like, First Name, Last Name, email ID etc. and then you will be seeing that the user is added to the Project. If the user already exists, you can select the username in the Add User to Project list and click OK and that User will now access to that particular project under the specified domain. Here are the screen shots for reference.
218. How do you prepare Test Plan in TestDirector?
There are two methods: I can go to the Test Plan tab and create a folder for the current project and create sub folders according to the requirements or modules and then under each sub folder I can create Manual Test Cases and also automated scripts. Other way is, I can prepare the test plan in word format and download the TDAdd-in for MS-word and using that I can export the test plan into TestDirector.
219. What are the various Tabs present in TestDirector?
There are four tabs:
1. Requirements
2. Test Plan
3. Test Lab
4. Defects
220. What is Requirements Tab used for?
Requirements Tab: In this we can add our project requirements according to the modules or functionality of the application. This helps in assessing how the requirements are being covered when associated to the Test Cases developed later.
221. What is Test Plan Tab used for?
Test Plan: It is used to write the Test Plan and Test Cases and scripts.
222. What does the Details Tab do in Test Plan?
Details tab will be used for the description of the Test Case or Folder. We have to include what exactly this Test Case or folder is intended for. This is optional but it is a good practice to update this.
223. How do you break a Test Case into steps in Test Director?
After creating the Test Case I will be going into the “Design Steps” screen and click on the “Step” button which will be displayed as “+” and I will be provided with the Step Name, Description and Expected Results columns. I enter the details in them. For each test step I repeat the process.
224. How do you write WinRunner scripts using TestDirector?
I would create a Test Case and select the Test Case type as WR_Automated and go to the Test Script Tab and click the “Launch” button which will open WinRunner and the Test Case name and path are automatically shown in the WinRunner. After recording the script I would save the script and come back to TestDirector and press the “Refresh” button so that I can see the entire script in TestDirector. We can not edit the script from the TestDirector.
225. What is the use of Attachments Tab?
Attachments tab can be used to attach the Functional Requirements Document and Test Data files so that it is easy for the tester to refer them later.
226. What is the use of Requirements Coverage Tab?
Requirements Coverage tab provides us the facility to associate the Test Cases and Test Scripts for a particular requirement. This will help the QA Manager to review what extent the requirements are covered and what is the status of each Requirement, whether they are passed or failed.
227. What is Test Lab used for?
Test Lab: This tab is used to define the Test Sets which include the selected tests to run on a module. We can create various test steps based on the volume of the application. This helps us in executing all the Tests present in that Test Set in a sequence in a batch mode. We can select tests to be included in the Test Set by hitting “Select Tests” button and browsing the Test case or Test Scripts we want to include from the Test folders and sending them into test set by using the arrow symbol.
We can run all the Tests simultaneously or highlight a single test and run it individually.
228. What is Defects Tab used for?
Defects Tab: This is used to enter the defects found in the application.
229. How do you track the defects using TestDirector?
When I see a defect in the application in the testing process I go to the Defects Tab and click on Add Defect button and enter the details of the defect and attach any snapshots of the defect and close it. The status “New” will be assigned to that defect. I can mail that defect to the concerned developer from TestDirector or ask the developer to take a look at the defect in TestDirector. Developer after seeing the defect can change the status to “Open” which means he/she is working on fixing it. When the fixing is done, the developer can change the status to “Fixed”. I can then retest the defect after the fresh build of the application and if found satisfied I can “Close” the defect or “Reopen” it if I am not satisfied or the defect is not fixed. The developer has the right to “Reject” the defect with proper reason attached to it if he/she thinks that it is not a defect.
230. How can you print the Test Plan if required as a Hard Copy?
I can go to Tools Menu and select Document Generator and select the Subject folder and Tests List. I can use filters to get the data which I am looking for and click the Full Document button to generate the Test Plan.
231. How do you print the Defects Report?
I can go to Analysis Menu and select Reports and then select the type of report I want and customize the reports to include only the fields I want and click on the print icon to print it.
232. How do you perform Website Validation?
The validation Checklist for testing a website are -
Validation - Validate the HTML -Validate the CSS -Check for broken links
Flexibility -Try varying window sizes -Try varying font sizes
Speed -Access the site via a modem -check image size specifications
Accessibility -Test accessibility -View in text browser
Browser independence -Try different browsers -Check printed pages -Switch Javascript off -Switch plug-ins off -Switch images off
Other checks -Check non-reliance on mailto -Check no orphan pages -Check sensible page titles
233. How do you Validate the HTML?
The first stage of checking a web-site is to make sure that you have valid HTML (or XHTML). This can be done with a validator such as the W3C validator or WDG validator. Your own browser may ignore certain errors, but there is a significant risk that markup errors will result in display problems in some browser or other.
There are sometimes reasons for including invalid HTML. For example some pages on my own site use the non-standard NOINDEX element, for the benefit of my site search engine. But you should only tolerate HTML validation errors if there is a clear need for the non-standard markup, and if you have tested the result in a variety of browsers.
234. How do you Validate the CSS?
CSS can be validated with for example the W3C CSS validator. The considerations here are much the same as HTML validation. It may sometimes be necessary to use something non-standard to get Internet Explorer to work, but such rules can be placed in a separate CSS file and hidden in an Internet Explorer conditional comment, where they won’t bother other browsers or a validator.
235. How do you Check for broken links?
Obviously you don’t want broken links on your site. There are various tools available to help find these, such as the Link Valet (which is convenient for checking a few pages) or Xenulink (convenient for checking a whole site).
236. How do you check website Flexibility?
Try varying window-sizes
A very important aspect of web design is coping with different window sizes. Window widths may vary from about 200 pixels on a web-enabled telephone to 2000+ pixels on a technical workstation in full-screen mode. While providing a readable site to the very smallest screens is something of a challenge, your site should at least be readable on a wide variety of sizes. As of mid 2006, nearly 20% of all readers are still using screens of 800x600 pixels or smaller, and if the reader wishes to compare the contents of your site with another document, it is entirely possible that he/she may want to use a window-width of around 400 pixels.
237. How to Try varying font sizes for website?
Some people use large screen fonts because they have a large screen with a very fine resolution; other people have to use large screen fonts because of declining eyesight. On the other hand, some people like to use microscopic fonts with their nose pressed against the screen (it takes all sorts...)
So while doing the above activity, adjust the default text-size in your browser, and check that all the text scales appropriately. (You did specify the text size in ems or %, didn’t you? If not, see my font-size page.)
One other aspect to consider is that users may impose a minimum font size to make sure that all text is readable for them. This means that font sizes show a smaller range than you had in mind. If you have a complex page with a wide range of font sizes, it would be worth imposing a minimum size larger than your smallest font (this can be done in e.g. Opera or Firefox) and checking that this does not make parts unreadable.
238. How do you test website Speed ?
Access the site via a modem
So you think you have a great site, full of beautiful images. Put your site on the server, then dial in via a modem (a real modem – not an ADSL gateway, which is sometimes erroneously referred to as a modem). Does it look so good half a minute later? Or are you still staring at a pretty-much blank screen?
If the opening page of your site takes more than about 15 seconds to appear, then you are losing visitors fast. (Broadband users generally expect a still faster response.) Don’t overload it. If you have to include large objects on your site – perhaps it revolves around high-resolution reproductions of fine art – put them on later pages and tell (or warn?) your users what is coming.
Web developers generally have broadband access, and they sometimes forget that the majority of the world's internet connections still run via a modem. Yes, more and more people are getting broadband, but the number of people without it is still large, and many people in rural areas, let alone developing countries, simply can’t yet get broadband. By the way, don’t make the mistake of assuming that you don’t have to worry about bandwidth issues if your site is mainly aimed at companies. I have more than once worked at companies which did have a broadband connection, but had it shared between so many users and applications that the net result was scarcely faster than a dial-up modem.
239. How do you test for Browser independence ?
Your site may be viewed in a large variety of situations: different browsers, different operating systems, different features enabled or disabled. It is important that your site stands up well in these different situations. The first point of attention here is validation – described separately above. Then there are the following points.
240. How do you try different browsers?
Almost all web developers are aware of the need to check how their site looks in a variety of browsers. How far you go obviously depends on the resources available – not everyone is in a position to check Windows, Mac, Unix and Linux platforms. The minimum test would probably be:
Firefox, as that has the best standards compliance and is the second most-used browser;
Internet Explorer for Windows – currently the most widely used browser. It is essential to check both versions 6 and 7 as version 7 fixed quite a lot of bugs in 6 but introduced a new set of its own.
Opera – growing in popularity due to its speed and pretty good standards compliance.
241. How do you test and Check printed pages ?
Print some of the pages on a normal printer (i.e. with a paper size of A4 or Letter) and check that they appear sensibly. Due to the somewhat limited formatting options available for printing, you probably can’t achieve an appearance comparable to a document produced by a word-processor, but you should at least be able to read the text easily, and not have lines running off the right-hand side of the page. It is truly extraordinary how many site authors fail to think of this most elementary of operations.
242. What are the different Stages in Testing/Types of Testing.
1. Unit Testing: This is the effort carried out by the developers in which they validate that their individual units/programs are working fine.
2. Integration Testing: Integration testing is carried out by the developers in which they integrate their individual units and make sure their integration works fine.
3. System Testing: System Testing is to test the working of the entire application as a system. In this effort we need to test the application keeping in view all the interfaces and connectivity from, and, to the application, like database servers, web servers, application servers, external connections like credit card processing system (Merchant Processor) etc. This effort, is usually carried out by the development team, but yet times QA is also
involved.
4. Confidence Testing: This is the testing carried out by QA when the application code is moved into QA Environment to see that the application is up and running and there are no configuration issues or data issues due to migration of the code from Development environment into QA Environment.
5. Functional Testing: This testing is carried by the QA to test that the application is performing all the intended functions perfectly without any errors. In this QA will test the application using various scenarios. Both positive testing and negative testing will be performed.
Positive testing will involve passing the correct values as specified in the Functional Requirements and make sure that the application is processing them properly. Negative testing will involve passing the values which are not supposed to be returning the correct results and look for the proper error messages displayed by the application.
6. Regression Testing: Regression Testing is carried out after each release along with the Functional testing of the new functionality. The purpose of this testing is to see that nothing is broken with the existing code while the developers are developing new functionality or fixing the defects from the earlier functional testing. This is usually carried out by the automation tools like WinRunner in which the scripts are run to check that nothing is being broken. This needs a test bed to be created in WinRunner with all the scripts which test the major functionality of the application.
7. Load Testing/Performance Testing: Load/performance testing is carried by QA to make sure that the application can handle the anticipated traffic and load. This is carried out by using Load Testing tools like LoadRunner. In this test we will monitor the performance of the Web server, database server, application server, CPU usage of the server, memory usage of the server. When the Load test is carried for a prolonged time like say for 8 hours continuously to see that the application can sustain high loads of work for any number of hours, it is called Stress Testing. Load/Stress testing is carried out only after the Functionality of the application is working fine, in other words when Functional Testing is certified by QA.
8. User Acceptance/Acceptance Testing: This is usually, carried out by the user groups or customer. This is to make sure that the actual customer/end user is satisfied with the overall look, feel and functionality of the application.
9. Smoke Testing: This is the post-production testing to make sure that nothing is broken while migrating the application code from the QA environment into the production environment.
243. What is Defect Tracking?
This is the crucial part of the QA testing effort. The defects found in every kind of testing have to be logged into defect tracking tool or they should be properly documented and communicated to the development team. Based on the priority and severity of the defect, developers fix the defects and change the status of the defect to Fixed and QA team will have to re-test these defects and either Close the defect if QA is satisfied with the bug fix or re-open the defect. If the development is rejecting the defect they should give the proper reason for that and if the QA is not satisfied with the explanation the problem should be escalated to the QA Manager and thereby to the Project Manager depending on the severity of the defect.
244. How do you perform Analysis and Documentation of the test results?
After a testing effort is finished successfully QA Team has to analyze the test results and document the results giving every detail, which they think is important and necessary. This gives an opportunity for the QA team to provide the recommendations to the application development team, database administrators, server administrators and to the infrastructure team in the QA review meetings or application team meetings.
245. What are the Responsibilities of a QA Tester ?
QA Tester should analyze the application and decide which parts can be automated and which parts are to be tested manually. He/She needs to develop the automation test scripts for those parts which can be automated. Also he/she should judge whether it is worth automating those parts since some functionalities might take too much of time to write script using automation tools and that actually might take a few minutes of time to test manually.
QA Tester should always think of the various possibilities of breaking the application and for that purpose he/she needs to think of all kinds of negative testing.
QA Tester needs a good understanding and command on SQL as he/she is supposed to test the database validations also. He/She should also be ready to learn any technology fastly as different clients might ask you to use a different tool.
QA tester is responsible for carrying the end to end testing of the application in all the
perspectives both manually and using automation tools.
246. What is the difference between QA and QC?
Quality Assurance (QA) is the process of defining the rules, regulations and methods followed in the organization to constantly improve the quality of the products developed within the organization. This is purely an upper management function.
Quality Control (QC) is the actual process of testing the products developed or being developed. The human interference is involved and using the processes defined by QA department the quality of the product is measured and certified by the Quality Control department. This is purely people function.
What most of the QA testers do is the QC job and not QA job, but the word QA has become the industry standard for any quality activities taking place in the organization.
247. Why did you prefer QA as your field of choice?
QA is one aspect which is very important in the Software Development Life Cycle. I like to be part of the team which is responsible for the quality of the application being delivered. Also, QA has broad opportunities and large scope for learning various technologies. And of course it has lot more opportunities than the Development as QA resources are required irrespective of the platform in which the application is being developed.
248. When do you think the QA part should start in the SDLC?
I personally feel that QA should be involved in the SDLC right from the initiation of the project. This helps the QA resources in understanding the requirements well and will have enough time to plan various kinds of test cases both Positive and Negative. But in the current industry, many organizations are hiring QA resources just one to three months before the implementation of the application in production. This can result in a poor QA with respect to the scenarios to be tested.
249. What is your role as a QA Tester?
As a QA Tester, I go through the Business Requirement Documents and Functional Requirements Documents and prepare the Test Plan and write the test cases by the time the application is ready. Then I execute these test cases against the application. I analyze the application and decide which parts of the application can be automated and which should be tested manually. For those parts which can be automated I will create the Test Scripts using the automation Testing tools. When I encounter a defect I enter it into the defect tracking tool like TestDirector,
250. How do you classify the severity and priority of the defect?
If a defect is a show stopper and we can not continue our testing without that being I will classify it as Severity Level 1 and High Priority, if it is a missing functionality but if there is a work around for that and it is not stopping me for testing the rest of the application I classify it as Severity Level 2. If it is a cosmetic defect like some typo errors I classify that as Low Priority and Low severity. Each organization has its own definitions for the severity level of the defects and I will follow them.
251. What will be your step if a developer is not agreeing to your defect?
I will try to convince the developer by recreating the defect and if he still disagree I will ask for the reasons and clarify it with the Business Analysts and if the BA also sees this as a defect I would escalate this to my QA Manager and ultimately to the Project Manager to keep them in loop.
252. Can you explain about your application development and QA environment?
We have a development server where the developers will be coding for the application. Once the coding is done and the code is checked into the server and when a build request is made by the QA development will deploy the application on the Build server and perform the minimum acceptance testing or confidence testing. Once that is done QA will install the application in the QA Test server and perform the confidence testing and if found satisfactory will continue the Functional Testing and Regression Testing. If the application fails the confidence tests the code will be rolled back to the previous version and development will be notified about the problem. Once the functional and regression testing phases are QA certified, the application will be installed on the Load Testing environment where the LoadTest is carried out using automation tool like LoadRunner. If the application is found stable enough to be moved into the Acceptance Testing it will be installed in User Acceptance Testing environment where the Users will test and certify the product before going to the production.
253. Did you happen to work with any FTP software in your testing job, what FTP software did you use?
Yes. Sometimes we need to upload our test files to the Unix servers or servers where the processes will be kicked off so that these test files can also be processed. We have lot of tools out there which can be freely downloaded by I always prefer using Internet Explorer as an FTP tool where I can drag and drop the files from my desktop on to the server.
To use your browser as an FTP tool, type ftp.ipaddress or server name. It will ask for the user name and password for that server. Once you type that information correctly you will have access to the files and folders on the server and you can just drag and drop the files from your desktop to the server.
254. Who are the persons who could be helpful in your QA Job or with whom you will have interaction in your job?
As a QA resource we need to interact with the Business Analysts to understand the business rules and logic and they can provide you with the requirement documents. First thing we need to do is to make a list of the names of the persons who deal with different aspects of the project like Business Analysts, Developers, Networking people, DBAs, System Admins and of course Project Leader and Project Manager. We might need to interact with any of the above as the situation demands.
255. What is difference between validation and verification?
Verification is done on documents produced during SDLC such as –
Checklists, issue lists, walkthroughs, inspections, reviews and meetings.
Validation is testing and making sure process is built according the business requirements and functional specifications. Validation is testing with test cases and test data.
What is the role of test data generators in testing object oriented system?
Test Data Generator is a powerful and simple automatic tool that allows you to generate test data for database testing such as performance testing, load testing and quality assurance testing. The testing data is generating according to the structure of diagram you have developed. It takes into account the data type and the size of the table fields. The method of data generation can be fully customized for each table field.
The interface consist of two tabs. The first one allows you to set general parameters for the process of test data generation. The second one allows you to tune generation parameters for each table and field.
The result of test data generator is a sequence of SQL statements which insert the data in your tables. These statements can be stored in one file or in multiple ones.
Before starting to write a script, How will you find the test cases that have the same functionality? and How will you maintain the code? Another way to identify potential test cases that have the same functionality is to review 1) business requirements, 2) technical specifications, 3) mock-ups and 4) work-flow diagrams. These documents are often organized and/or categorized by functionality.
If you were running out of testing time on a project, what activities would you perform to reduce test time? In order to reduce test time, 1) I would execute test cases from highest to lowest priority. In this way, if we run out of time, we will have tested the most important functionalities.
While testing you came to known that submodule C contains 150% more defects that other 6 modules.Submodule A has 60% lesses bugs that expected.what should be strategy:
Tester should concentrate more
This much information is insufficient to decide strategy
We don't know how much test effort was originally applied to each of the modules in order to obtain the test results.
What is Bug Triage? What is its use in the testing process? How it is done? Bug Triage is the process of evaluating defect reports to determine their course of action. It is typically the Program Manager's (PM) responsibility to facilitate a meeting (called Bug Triage) with expert members from the business.
What is Backward Traceability and Forward Traceability in refenrence with Requirement Traceability Matrix? Forward traceability maps requirements to test cases.Backward traceability maps test cases to requirements.Forward and backward traceability together are known as bi-directional traceability.
What kinds of bugs are you more likely to find with black box testing? Black box testing refers to any testing that is performed without knowledge of the internal workings of an object under test. It takes an external perspective of the object. Defects identified with this testing are functionality related bugs, business gaps, application configuration defects and GUI bugs.
You are the Test Lead for a project whose deadline scheduled within 30 days. You need to test the software on 3 differnet browsers , 5 Operating Systems , 6 diff languages. What is the best testing approach The best approach would be to produce a compatibility matrix and label your columns by Browser type, Operating System, and Language. Then list all of the browsers, operating systems (OS) and languages you wish to test under these columns.
Which is the most important part in a Test Plan? The most important parts of a test plan are test strategy and test scope. If I had to select only one of these, I would have to go with test strategy.
What are the main contents will take in to consideration while preparing a test strategy for an application which has different technologies used, like in the same application one component is using PowerBuilder 1) Test Environmental Setup2) Test Data3) Test Methods to follow4) Test Execution records with different technolgoies and their outcomes (Test Report)5) Bug Report for seperated execution of Test cases.
Define scalability in terms of performance testing? Performance refers to the speed or effectiveness of an application or system. Performance tests include scalability when its ability to handle more volume is increased and testing is performed to verify that performance standards are maintained.
What checklists to be consider in order to evaluate software security for database, web based interface and software userinterfaces. Security Testing: The Process to determine that an IS (Information System) protects data and maintains functionality as intended.The basic security concepts (Checklist) that need to be covered by security testing are: confidentiality, integrity, authentication, authorization and availability.
What is the Minimum number of test cases required to prove that an application does not do its work and the maximum number of test cases required to prove that an application does its work? Cyclomatic complexity gives the minimum number of test cases that are necessary to check that application does it work as specified.Decision table gives maximum number of test cases that are necessary to check that application works as specified.
Say you are working on a release and productions issues occur that are in need of a fast fix, test and deployment back into the production environment.How would you handle that Once you find any defect on production, log a defect immediately having "HIGH" priority.Once developer fixes the defect test same issue and do sanity/regression testing depend on the time available.
What are the 18 KPA (Key Process Area) Procedures?
18 Key process areas as defined in CMMi Level 5 model are as follows:
1.Requirements Management
2.Project planning
3.Project monitoring and control
4.Configuration management
5.Suppliers agreement management
6.Requirements development
7.Technical solution
8.Product integration
9.Verification
10.Validation
11.Process and product quality assurance
12.Risk manangement
13.Quantitative project management
14.Casual analysis and resolution
15.Organization process definition
16.Organization processs focus
17.Organization process performance
18.Organization Innovation deployment
What are the various phases involved in testing?
The various phases involved in testing, with regard to the software development life cycle are:
1. Requirements stage
2. Test Plan
3. Test Design.
4. Design Reviews (Peer reviews and team reviews)
5. Code Reviews
6. Test Cases preparation.
7. Test Execution
8. Test Reports.
9. Bugs Reporting
10. Reworking on patches.
11. Release to production.
What are the steps or methods we use when analyzing or troubleshooting an issue/problem? Reproduce the defect, record the steps, analyse the environment, functional dependancy if any exists. Gather the Exception stack with which I dont have to reproduce the defect. it provides more than sufficient information to Dev team.
what are the challenges you face as a manual tester? Latest Answer: Some challenges in testing are:1) Inaccurate, incomplete or entirely missing requirements2) Application not delivered to test on time constricting the time to test3) Deliverables from 3rd-party vendors not on time4) Inordinate number of Change Requests
What kind of issues do you encounter in browser compatibility testing? Latest Answer: While browser compatibility testing, i have faced many problems like:1. There were many functionalities which were working on firefox and not working on IE.2. UI elements are not properly aligned in all the browsers on the same screen resolution.
Describe to the basic elements you put in a defect report Latest Answer: Elements of a defect report:1) defect id2) test case reference3) project name4) build found5) priority6) severity 7) status8) assigned to 9) submitted by10) submitted date 11) brief title 12) environment details 13) description of the issue 14) steps to reproduce the bug.
Interview questions on WinRunner
How you used WinRunner in your project? - Yes, I have been using WinRunner for creating automated scripts for GUI, functional and regression testing of the AUT.
Explain WinRunner testing process? - WinRunner testing process involves six main stages Create GUI Map File so that WinRunner can recognize the GUI objects in the application being tested
Create test scripts by recording, programming, or a combination of both. While recording tests, insert checkpoints where you want to check the response of the application being tested.
Debug Test: run tests in Debug mode to make sure they run smoothly
Run Tests: run tests in Verify mode to test your application.
View Results: determines the success or failure of the tests.
Report Defects: If a test run fails due to a defect in the application being tested, you can report information about the defect directly from the Test Results window.
What is contained in the GUI map? - WinRunner stores information it learns about a window or object in a GUI Map. When WinRunner runs a test, it uses the GUI map to locate objects. It reads an object.s description in the GUI map and then looks for an object with the same properties in the application being tested. Each of these objects in the GUI Map file will be having a logical name and a physical description. There are 2 types of GUI Map files. Global GUI Map file: a single GUI Map file for the entire application. GUI Map File per Test: WinRunner automatically creates a GUI Map file for each test created.
How does WinRunner recognize objects on the application? - WinRunner uses the GUI Map file to recognize objects on the application. When WinRunner runs a test, it uses the GUI map to locate objects. It reads an object.s description in the GUI map and then looks for an object with the same properties in the application being tested.
Have you created test scripts and what is contained in the test scripts? - Yes I have created test scripts. It contains the statement in Mercury Interactive. s Test Script Language (TSL). These statements appear as a test script in a test window. You can then enhance your recorded test script, either by typing in additional TSL functions and programming elements or by using WinRunner.s visual programming tool, the Function Generator.
How does WinRunner evaluate test results? - Following each test run, WinRunner displays the results in a report. The report details all the major events that occurred during the run, such as checkpoints, error messages, system messages, or user messages. If mismatches are detected at checkpoints during the test run, you can view the expected results and the actual results from the Test Results window.
Have you performed debugging of the scripts? - Yes, I have performed debugging of scripts. We can debug the script by executing the script in the debug mode. We can also debug script using the Step, Step Into, Step out functionalities provided by the WinRunner.
How do you run your test scripts? - We run tests in Verify mode to test your application. Each time WinRunner encounters a checkpoint in the test script, it compares the current data of the application being tested to the expected data captured earlier. If any mismatches are found, WinRunner captures them as actual results.
How do you analyze results and report the defects? - Following each test run, WinRunner displays the results in a report. The report details all the major events that occurred during the run, such as checkpoints, error messages, system messages, or user messages. If mismatches are detected at checkpoints during the test run, you can view the expected results and the actual results from the Test Results window. If a test run fails due to a defect in the application being tested, you can report information about the defect directly from the Test Results window. This information is sent via e-mail to the quality assurance manager, who tracks the defect until it is fixed.
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, run tests, and report and track defects. You can also create reports and graphs to help review the progress of planning tests, running tests, and tracking defects before a software release.
Have you integrated your automated scripts from 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 TestDirector will build a skeleton for the script that can be later modified into one which could be used to test the AUT.
What are the different modes of recording? - There are two type of recording in WinRunner. Context Sensitive recording records the operations you perform on your application by identifying Graphical User Interface (GUI) objects. Analog recording records keyboard input, mouse clicks, and the precise x- and y-coordinates traveled by the mouse pointer across the screen.
What is the purpose of loading WinRunner Add-Ins? - Add-Ins are used in WinRunner to load functions specific to the particular add-in to the memory. While creating a script only those functions in the add-in selected will be listed in the function generator and while executing the script only those functions in the loaded add-in will be executed else WinRunner will give an error message saying it does not recognize the function.
What are the reasons that WinRunner fails to identify an object on the GUI? - WinRunner fails to identify an object in a GUI due to various reasons. The object is not a standard windows object. If the browser used is not compatible with the WinRunner version, GUI Map Editor will not be able to learn any of the objects displayed in the browser window.
What is meant by the logical name of the object? - An objects logical name is determined by its class. In most cases, the logical name is the label that appears on an object.
If the object does not have a name then what will be the logical name? - If the object does not have a name then the logical name could be the attached text.
What is the different between GUI map and GUI map files? - The GUI map is actually the sum of one or more GUI map files. There are two modes for organizing GUI map files. Global GUI Map file: a single GUI Map file for the entire application. GUI Map File per Test: WinRunner automatically creates a GUI Map file for each test created. GUI Map file is a file which contains the windows and the objects learned by the WinRunner with its logical name and their physical description.
How do you view the contents of the GUI map? - GUI Map editor displays the content of a GUI Map. We can invoke GUI Map Editor from the Tools Menu in WinRunner. The GUI Map Editor displays the various GUI Map files created and the windows and objects learned in to them with their logical name and physical description.
When you create GUI map do you record all the objects of specific objects? - If we are learning a window then WinRunner automatically learns all the objects in the window else we will we identifying those object, which are to be learned in a window, since we will be working with only those objects while creating scripts.
LoadRunner interview questions
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.
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.
Did u use LoadRunner? What version? - Yes. Version 7.2.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 select Standard 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: Select extended 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.
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.
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 external
library (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*
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.
Where do you set Iteration for Vuser testing? - We set Iterations in the Run Time Settings of the VuGen. The navigation for this is Run time settings, Pacing tab, set number of iterations.
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.
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 be specified. To set Ramp Up, go to ‘Scenario Scheduling Options’
What is the advantage of running the Vuser as thread? - VuGen provides the facility to use multithreading. This enables more Vusers to be run per generator. 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 single generator. If the Vuser is run as a thread, only one instance of the driver program is loaded into memory for the given number of Vusers (say 100). Each thread shares the memory of the parent driver program, thus enabling more Vusers to be run per generator.
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.
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.
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.
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.
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.
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 that
occurred during scenario, the number of http responses per second, the number of downloaded pages per second.
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
Explain all the web recording options?
What is the difference between Overlay graph and Correlate graph? - Overlay Graph: It overlay the content of two graphs that shares a common x-axis. Left Y-axis on the merged graph show.s the current graph.s value & Right Y-axis show the value of Y-axis of the graph that was merged. Correlate Graph: Plot the Y-axis of two graphs against each other. The active graph.s Y-axis becomes X-axis of merged graph. Y-axis of the graph that was merged becomes merged graph.s Y-axis.
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.
What does vuser_init action contain? - Vuser_init action contains procedures to login to a server.
What does vuser_end action contain? - Vuser_end section contains log off procedures.
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.
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.
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.
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 would
be reasonable to conclude that the bandwidth is constraining the volume of
data delivered.
Types of Goals in Goal-Oriented Scenario - Load Runner provides you with five different types of goals in a goal oriented scenario:
The number of concurrent Vusers
The number of hits per second
The number of transactions per second
The number of pages per minute
The transaction response time that you want your scenario
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 load increases. At 56 Vusers, there is a sudden, sharp increase in the average response time. 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.
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.
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.
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.