Wednesday, 24 August 2011

Object Repository Types in QTP

Test objects can be stored in two types of object repositories—a shared object repository and a local object repository. A shared object repository stores test objects in a file that can be accessed by multiple components (via their application areas) in read-only mode. A local object repository stores objects in a file that is associated with one specific component, so that only that component can access the stored objects.

When you plan and create components, you must consider how you want to store the objects in your components. You can store the objects for each component in its corresponding local object repository, or you can store the objects in your components in one or more shared object repositories. By storing objects in shared object repositories and associating these repositories with your components’ application areas, you enable multiple components to use the objects. For each component, you can use a combination of objects from your local and shared object repositories, according to your needs. You can also transfer local objects to a shared object repository, if required. This reduces maintenance and enhances the reusability of your components because it enables you to maintain the objects in a single, shared location instead of multiple locations.

If you are new to using QTP, you may want to use local object repositories. In this way, you can record and run components without creating, choosing, or modifying shared object repositories because all objects are automatically saved in a local object repository that can be accessed by its corresponding component. If you modify an object in the local object repository, your changes do not have any effect on any other component.

If you are familiar with testing, it is probably most efficient to save objects in a shared object repository. In this way, you can use the same shared object repository for multiple components—if the components include the same objects. Test object information that applies to many components is kept in one central location. When the objects in your application change, you can update them in one location for all the components that use this shared object repository.

If an object with the same name and description is located in both the local object repository and in a shared object repository associated with the same component, the component uses the local object definition. If an object with the same name and description is located in more than one shared object repository associated with the same component, the object definition is used from the first occurrence of the object, according to the order in which the shared object repositories are associated with the component.

Local objects are saved locally with the component, and can be accessed only from that component. When using a shared object repository, you can use the same object repository for multiple components. You can also use multiple object repositories for each component.

When you open and work with an existing component, it always uses the object repositories that are specified in the application area with which the component is associated. Shared object repositories are read-only when accessed from components; you edit them using the Object Repository Manager.

ISTQB Questions

Q1. Deciding how much testing is enough should take into account:-i. Level of Risk including Technical and Business product and project risk
ii. Project constraints such as time and budget
iii. Size of Testing Team
iv. Size of the Development Team

a) i, ii, iii are true and iv is false
b) i, iv are true and ii is false
c) i, ii are true and iii, iv are false
d) ii, iii, iv are true and i is false

Q2. Test planning has which of the following major tasks?

i. Determining the scope and risks, and identifying the objectives of testing.
ii. Determining the test approach (techniques, test items, coverage, identifying and interfacing the teams involved in testing, testware)
iii. Reviewing the Test Basis (such as requirements, architecture, design, interface)
iv. Determining the exit criteria.

a) i, ii, iv are true and iii is false
b) i, iv are true and ii is false
c) i, ii are true and iii, iv are false
d) ii, iii, iv are true and i is false


Q3. Evaluating testability of the requirements and system are a part of which phase:-

a) Test Analysis and Design
b) Test Planning and control
c) Test Implementation and execution
d) Evaluating exit criteria and reporting

Q4. One of the fields on a form contains a text box which accepts alphabets in lower or upper case. Identify the invalid Equivalence class value.

a. CLASS
b. cLASS
c. CLass
d. CLa01ss
Q5. In a system designed to work out the tax to be paid:An employee has £4000 of salary tax free. The next £1500 is taxed at 10% the next £28000 is taxed at 22%. Any further amount is taxed at 40% Which of these groups of numbers would fall into the same equivalence class?
a) £4800; £14000; £28000
b) £5200; £5500; £28000
c) £28001; £32000; £35000
d) £5800; £28000; £32000

Q6. Which of the following has highest level of independence in which test cases are :

a) Designed by persons who write the software under test
b) Designed by a person from a different section
c) Designed by a person from a different organization
d) Designed by another person

Q7. We use the output of the requirement analysis, the requirement specification as the input for writing :-

a) User Acceptance Test Cases
b) Integration Level Test Cases
c) Unit Level Test Cases
d) Program specifications

Q8. Validation involves which of the following:

i. Helps to check the Quality of the Built Product
ii. Helps to check that we have built the right product.
iii. Helps in developing the product
iv. Monitoring tool wastage and obsoleteness.

a) Options i, ii, iii, iv are true.
b) ii is true and i, iii, iv are false
c) i, ii, iii are true and iv is false
d) iii is true and i, ii, iv are false

Q9. Which of the following uses Impact Analysis most?
a) Component testing
b) Non-functional system testing
c) User acceptance testing
d) Maintenance testing

Q10. What is the expected result for each of the following test cases?

A. Citibank card member, holding a Silver room
B. Non Citibank-member, holding a Platinum room

a) A – Don’t offer any upgrade, B – Don’t offer any upgrade.
b) A – Don’t offer any upgrade, B – Offer upgrade to Gold.
c) A – Offer upgrade to Silver, B – Offer upgrade to Silver.
d) A – Offer upgrade to Gold, B – Don’t offer any upgrade.

Q11. Repeated Testing of an already tested program, after modification, to discover any defects introduced or uncovered as a result of the changes in the software being tested or in another related or unrelated software component:

a) Re Testing
b) Confirmation Testing
c) Regression Testing
d) Negative Testing

Q12. Impact Analysis helps to decide :-
a) How much regression testing should be done.
b) Exit Criteria
c) How many more test cases need to written.
d) Different Tools to perform Regression Testing

Q13. Functional system testing is:
a) testing that the system functions with other systems
b) testing that the components that comprise the system function together
c) testing the end to end functionality of the system as a whole
d) testing the system performs functions within specified response times

Q14. Consider the above state transition diagram of a switch.Which of the following represents an invalid state transition?
a) OFF to ON
b) ON to OFF
c) FAULT to ON

Q15. Peer Reviews are also called as :-
a) Inspection
b) Walkthrough
c) Technical Review
d) Formal Review

Q16. Consider the following statements:
i. 100% statement coverage guarantees 100% branch coverage.
ii. 100% branch coverage guarantees 100% statement coverage.
iii. 100% branch coverage guarantees 100% decision coverage.
iv. 100% decision coverage guarantees 100% branch coverage.
v. 100% statement coverage guarantees 100% decision coverage.

a) ii is True; i, iii, iv & v are False
b) i & v are True; ii, iii & iv are False
c) ii & iii are True; i, iv & v are False
d) ii, iii & iv are True; i & v are False

Q17. The Kick Off phase of a formal review includes the following :-
a) Explaining the objective
b) Fixing defects found typically done by author
c) Follow up
d) Individual Meeting preparations

Q18. Match every stage of the software Development Life cycle with the Testing Life cycle:
i. Hi-level design a Unit tests
ii. Code b Acceptance tests
iii. Low-level design c System tests
iv. Business requirements d Integration tests

a) i-d , ii-a , iii-c , iv-b
b) i-c , ii-d , iii-a , iv-b
c) i-b , ii-a , iii-d , iv-c
d) i-c , ii-a , iii-d , iv-b

Q19. Which of the following is not phase of the Fundamental Test Process?
a) Test Planning and Control
b) Test implementation and Execution
c) Requirement Analysis
d) Evaluating Exit criteria and reporting

Q20. Which of the following techniques is NOT a black box technique?
a) State transition testing
b) LCSAJ (Linear Code Sequence and Jump)
c) syntax testing
d) boundary value analysis

Q21. Success Factors for a review include:
i. Each Review does not have a predefined objective
ii. Defects found are welcomed and expressed objectively
iii. Management supports a good review process.
iv. There is an emphasis on learning and process improvement.

a) ii,iii,iv are correct and i is incorrect
b) iii , i , iv is correct and ii is incorrect
c) i , iii , iv , ii is in correct
d) ii is correct

Q22. Defects discovered by static analysis tools include:
i. Variables that are never used.
ii. Security vulnerabilities.
iii. Programming Standard Violations
iv. Uncalled functions and procedures

a) i , ii,iii,iv is correct
b) iii ,is correct I,ii,iv are incorrect.
c) i ,ii, iii and iv are incorrect
d) iv, ii is correct

Q23. Test Conditions are derived from :-
a) Specifications
b) Test Cases
c) Test Data
d) Test Design

Q24. Which of the following is true about White and Black Box Testing Technique:-
a) Equivalance partitioning, Decision Table and Control flow are White box Testing Techniques.
b) Equivalence partitioning , Boundary Value Analysis , Data Flow are Black Box Testing Techniques.
c) Equivalence partitioning , State Transition , Use Case Testing are black box Testing Techniques.
d) Equivalence Partioning , State Transition , Use Case Testing and Decision Table are White Box Testing Techniques.

Q25. Regression testing should be performed:
i. every week
ii. after the software has changed
iii. as often as possible
iv. when the environment has changed
v. when the project manager says

a) i & ii are true, iii, iv & v are false
b) ii, iii & iv are true, i & v are false
c) ii & iv are true, i, iii & v are false
d) ii is true, i, iii, iv & v are false

Q26. Benefits of Independent Testing
a) Independent testers are much more qualified than Developers
b) Independent testers see other and different defects and are unbiased.
c) Independent Testers cannot identify defects.
d) Independent Testers can test better than developers

Q27. Minimum Tests Required for Statement Coverage and Branch Coverage :-

Read P
Read Q
If p+q > 100
thenPrint “Large”End if
If p > 50 then
Print “pLarge”
End if

a) Statement coverage is 2, Branch Coverage is 2
b) Statement coverage is 3 and branch coverage is 2
c) Statement coverage is 1 and branch coverage is 2
d) Statement Coverage is 4 and Branch coverage is 2

Q28. Minimum Test Required for Statement Coverage :-

Disc = 0
Order-qty = 0
Read Order-qty
If Order-qty >=20 then
Disc = 0.05
If Order-qty >=100 then
Disc =0.1
End if
End if

a) Statement coverage is 4
b) Statement coverage is 1
c) Statement coverage is 3
d) Statement Coverage is 2

Q29. The structure of an incident report is covered in the Standard for Software Test Documentation IEEE 829 and is called as : -
a) Anomaly Report
b) Defect Report
c) Test Defect Report
d) Test Incident Report

Q30. Which of the following is the task of a Test Lead / Leader:
i. Interaction with the Test Tool Vendor to identify best ways to leverage test tool on the project.
ii. Write Test Summary Reports based on the information gathered during testing
iii. Decide what should be automated , to what degree and how.
iv. Create the Test Specifications

a) i, ii, iii is true and iv is false
b) ii,iii,iv is true and i is false
c) i is true and ii,iii,iv are false
d) iii and iv is correct and i and ii are incorrect

Q31. Features of White Box Testing Technique :-
i. We use explicit knowledge of the internal workings of the item being tested to select the test data.
ii. Uses specific knowledge of programming code to examine outputs and assumes that the tester knows the path of logic in a unit or a program.
iii. Checking for the performance of the application
iv. Also checks for functionality.

a) i, ii are true and iii and iv are false
b) iii is true and i,ii, iv are false
c) ii ,iii is true and i,iv is false
d) iii and iv are true and i,ii are false

Q32. Which of the following is a part of Test Closure Activities?
i. Checking which planned deliverables have been delivered
ii. Defect report analysis.
iii. Finalizing and archiving testware.
iv. Analyzing lessons.

a) i , ii , iv are true and iii is false
b) i , ii , iii are true and iv is false
c) i , iii , iv are true and ii is false
d) All of above are true

Q33. Which of the following will be the best definition for Testing :-
a) The goal / purpose of testing is to demonstrate that the program works.
b) The purpose of testing is to demonstrate that the program is defect free.
c) The purpose of testing is to demonstrate that the program does what it is supposed to do.
d) Testing is executing Software for the purpose of finding defects.

Q34. Which of the following is not a type of incremental testing approach?
a) Top down
b) Big-bang
c) Bottom up
d) Functional incrementation.

Q35. Drivers are also known as:
i. Spade
ii. Test harness
iii. Scaffolding

a) i , ii are true and iii is false
b) i , iii are true and ii is false
c) ii , iii are true and i is false
d) All of the above are true

Q36. Exit Criteria may consist of :-
i. Thoroughness measures , such as coverage of code, functionality or risk
ii. Estimates of Defect density or reliability measures.
iii. Residual risk such as defects not fixed or lack of test coverage in certain areas
iv. Verifying the Test Environment.

a) iv is correct and i,ii,iii are incorrect.
b) i,ii,iii is correct and iv is incorrect
c) ii is correct and i,ii,iii are incorrect
d) iii and iv are correct and i,ii are incorrect

Q37. Which of the following helps in monitoring the Test Progress:-
i. Percentage of Test Case Execution
ii. Percentage of work done in test environment preparation.
iii. Defect Information e.g. defect density, defects found and fixed
iv. The size of the testing Team and skills of the engineers

a) iv is correct and i,ii,iii are incorrect
b) i,ii,iii are correct and iv is incorrect
c) i,ii are correct and iii,iv are incorrect
d) i,iv are correct and ii , iii are incorrect

Q38. The selection of a test approach should consider the context :-
i. Risk of Failure of the Project, hazards to the product and risks of product failure to humans
ii. Skills and experience of the people in the proposed technique, tools and methods
iii. The objective of the testing endeavor and the mission of the testing team.
iv. The size of the testing Team

a) i,ii,iii,iv are true
b) i,ii,iii are true and iv is false.
c) ii,iii,iv are true and i is false.
d) i,iv are true and ii, iii are false.

Q39. In case of Large Systems :-
a) Only few tests should be run
b) Testing should be on the basis of Risk
c) Only Good Test Cases should be executed.
d) Test Cases written by good test engineers should be executed.

Q40. The Provision and Management of a controlled library containing all the configurations items is called as
a) Configuration Control
b) Status Accounting
c) Configuration Identification
d) Configuration Identificatio

Business Process Testing (BPT) with QTP and Quality Center

Each scenario that the Subject Matter Expert creates is a business process test. A business process test is composed of a serial flow of components. Each component performs a specific task. A component can pass data to a subsequent component.

Understanding Components: Components are easily-maintained reusable scripts that perform a specific task, and are the building blocks from which an effective business process testing structure can be produced. Components are parts of a business process that has been broken down into smaller parts. For example, in most applications users need to log in before they can do anything else. A Subject Matter Expert can create one component that represents the login procedure for an application. Each component can then be reused in different business process tests, resulting in easier maintenance, updating, and test management.

Components are comprised of steps. For example, the login component's first step may be to open the application. Its second step could be entering a user name. Its third step could be entering a password, and its fourth step could be clicking the Enter button.

You can create and edit components in QuickTest by adding steps on any supported environment, parameterizing selected items, and enhancing the component by incorporating functions (operations) that encapsulate the steps needed to perform a particular task. In Quality Center, a Subject Matter Expert creates components and combines them into business process tests, which are used to check that the application behaves as expected.

Creating Components in the Quality Center Business Components Module:The Subject Matter Expert can create a new component and define it in the Quality Center Business Components module. The Business Component module includes the following:

Details: Provides a general summary of the component's purpose or goals, and the condition of the application before and after a component is run (its pre-conditions and post-conditions).

Snapshot: Displays an image that provides a visual cue or description of the component's purpose or operations.

Parameters: Specifies the input and output component parameter values for the business component. Implementing and using parameters enables a component to receive data from an external source and to pass data to other components in the business process test flow.

Design Steps: Enables you to create or view the manual steps of your business component, and to automate it if required.

Automation: Displays or provides access to automated components. For keyword-driven components, enables you to create and modify the steps of your automated business component in a keyword-driven, table format, and provides a plain-language textual description of each step of the implemented component.

Used by: Provides details about the business process tests that include the currently selected business component. The tab also includes a link to the relevant business process test in the Test Plan module.

Component Requests pane: Enables you to handle new component requests that were generated in the Test Plan module. Component requests are requests to add a new business component to the project.

Implementing Components in QuickTest Professional: Generally, components are created by Subject Matter Experts in Quality Center, although they can also be created and debugged in QuickTest.

In QuickTest, you create components by recording steps on any supported environment or by adding steps manually (if the object repository is populated and the required operations are available). You can parameterize selected items. You can also view and set options specific to components.

QuickTest enables you to create and modify two types of components: business components and scripted components. A business component is an easily-maintained, reusable unit comprising one or more steps that perform a specific task. A scripted component is an automated component that can contain programming logic. Scripted components share functionality with both test actions and business components. For example, you can use the Keyword View, the Expert View, and other QuickTest tools and options to create, view, modify, and debug scripted components in QuickTest. Due to their complexity, scripted components can be edited only in QuickTest. (If needed, you can convert test actions to scripted components. For more information, click the Help button in the Action Conversion Tool window.)

In Quality Center, the Subject Matter Expert can open components created in QuickTest. The Subject Matter Expert can then view and edit business components, but can only view the details for scripted components.

Creating Business Process Tests in the Quality Center Test Plan Module: To create a business process test, the Subject Matter Expert selects (drags and drops) the components that apply to the business process test and configures their run settings.

Note: When you run a business process test from Quality Center, the test run may also be influenced by settings in the QuickTest Remote Agent.

Each component can be used differently by different business process tests. For example, in each test the component can be configured to use different input parameter values or run a different number of iterations.

If, while creating a business process test, the Subject Matter Expert realizes that a component has not been defined for an element that is necessary for the business process test, the Subject Matter Expert can submit a component request from the Test Plan module.

Running Business Process Tests and Analyzing the Results: You can use the run and debug options in QuickTest to run and debug an individual component.

You can debug a business process test by running the test from the Test Plan module in Quality Center. When you choose to run from this module, you can choose which components to run in debug mode. (This pauses the run at the beginning of a component.)

When the business process test has been debugged and is ready for regular test runs, the Subject Matter Expert runs it from the Test Lab module similar to the way any other test is run in Quality Center. Before running the test, the Subject Matter Expert can define run-time parameter values and iterations using the Iterations column in the Test Lab module grid.

From the Test Lab module, you can view the results of the entire business process test run. The results include the value of each parameter, and the results of individual steps reported by QuickTest.

You can click the Open Report link to open the complete QuickTest report. The hierarchical report contains all the different iterations and components within the business process test run.

Understanding the Differences Between Components and Tests: If you are already familiar with using QuickTest to create action-based tests, you will find that the procedures for creating and editing components are quite similar. However, due to the design and purpose of the component model, there are certain differences in the way you create, edit, and run components. The guidelines below provide an overview of these differences.

- A component is a single entity. It cannot contain multiple actions or have calls to other actions or to other components.

- When working with components, all external files are stored in the Quality Center project to which you are currently connected.

- The name of the component node in the Keyword View is the same as the saved component. You cannot rename the node.

- Business components are created in the Keyword View, not the Expert View.
You add resources via the component's application area, and not directly to the component.

- Components use custom keywords created in function libraries to perform operations, such as verifying property values and opening the application you are testing.