Automation Functional Testing Practice Test 1 — Questions and Answers
Question 1: Which of the following is a World Wide Consortium (W30) concern?
- Image Checkpoint
- XML checkpoint
- Accessibility Checkpoint (Correct answer)
- Bitmap checkpoint
Correct answer: Accessibility Checkpoint
The World Wide Web Consortium (W3C) is dedicated to developing standards that ensure the long-term growth and accessibility of the Web. Therefore, an Accessibility Checkpoint, which verifies that web content is usable by people with disabilities, directly aligns with W3C's core concerns and guidelines.
Question 2: Any QTP user can access the test's active screen information.
- decrease
- increase
- Both A & B (Correct answer)
- None of the above
Correct answer: Both A & B
Active Screen information in QTP (UFT) provides visual context that can be used to both increase and decrease aspects of testing. For instance, it can increase the accuracy of object identification and decrease debugging time, but if poorly managed, it might also increase test complexity or maintenance efforts. Thus, its impact can be multifaceted.
Question 3: In QTP, which of the following isn't a separate file?
- Both local and shared object repository
- local object repository (Correct answer)
- shared object repository
- None of the above
Correct answer: local object repository
In QTP (now UFT), a local object repository is stored as an integral part of the test script file itself, meaning it is not a separate, standalone file. In contrast, a shared object repository is a distinct file (.tsr) that can be linked to and used by multiple tests.
Question 4: Which of the following is used in the object repository for easy access to a specific item for modifying an object's properties?
- Identify in Repository
- Highlight in Application
- Locate in Repository (Correct answer)
- Search in Repository
Correct answer: Locate in Repository
The 'Locate in Repository' feature in QTP (UFT) is specifically designed to find a particular object within the object repository. This functionality is crucial for easily accessing, verifying, and modifying an object's properties or description, especially when dealing with large and complex repositories.
Question 5: ____ is a characteristic of bitmap checkpoints that allows the checkpoint to pass even if the bitmaps aren't identical.
- RGB tolerance (Correct answer)
- image tolerance
- bit tolerance
- BW tolerance
Correct answer: RGB tolerance
RGB tolerance is a characteristic of bitmap checkpoints that allows for minor variations in color between the expected and actual images. By setting an RGB tolerance, the checkpoint can pass even if there are slight differences in the Red, Green, and Blue color values, which is useful for handling minor rendering variations without failing the test.
Question 6: What is the Low Level Recording shortcut key?
- SHIFT+ALT+F3
- SHIFT+ALT+F4
- CTRL+SHIFT+F3 (Correct answer)
- None of the above
Correct answer: CTRL+SHIFT+F3
In QTP (UFT), the shortcut key combination CTRL+SHIFT+F3 is used to activate Low-Level Recording. This recording mode captures every mouse click and keyboard input, regardless of whether QTP recognizes the specific object, making it valuable for testing applications with non-standard or custom controls.
Question 7: To add an object to the local object repository, which of the following is used?
- Highlight in Application.
- Object Spy (Correct answer)
- Update from Application.
- All of the above
Correct answer: Object Spy
The Object Spy tool in QTP (UFT) is primarily used to identify and learn objects from an application under test. While spying on an object, testers can add it directly to the local object repository, enabling QTP to recognize and interact with that object during subsequent test execution.
Question 8: Which checkpoint type is used to verify the property values of an object in a test application and is supported by all add-in environments in QTP?
- File content
- Standard (Correct answer)
- Table
- Bitmap
Correct answer: Standard
A Standard Checkpoint is the most common and versatile type of checkpoint in QTP (UFT). It is specifically designed to verify the property values of any object in the test application and is universally supported across all add-in environments, making it a fundamental tool for validating application behavior.
Question 9: What defines the documentation cell?
- Write-only
- Read, write & execute
- Read-only (Correct answer)
- Read and Write
Correct answer: Read-only
In QTP (UFT), a documentation cell is intended to hold descriptive text or comments about the test steps. These cells are read-only during test execution, meaning their content cannot be modified by the script. This ensures that the documentation remains static and serves purely for informational purposes.
Question 10: The Merge Object Repositories Tool is used by
- Object Repository Comparison Tool
- Map Repository Parameters Tool
- Update from Application Tool
- Update from Local Repository Tool (Correct answer)
Correct answer: Update from Local Repository Tool
The Merge Object Repositories Tool in QTP (UFT) is used to combine objects from one object repository into another. Specifically, it allows you to update a shared object repository by merging objects from a local object repository or another shared repository, making 'Update from Local Repository Tool' the most relevant option describing its function.
Question 11: The standard checkpoint's shortcut key is .
- 11
- 10
- 8
- 11 (Correct answer)
Correct answer: 11
In UFT/QTP, F11 is the dedicated shortcut key used to quickly insert a Standard Checkpoint into a test script. Standard checkpoints are fundamental for verifying expected values of properties for objects during test execution. This shortcut provides a convenient way for testers to add these verification points, ensuring the application behaves as intended.
Question 12: Which of the following will execute the current line in the script, with the condition that if the line has a method, the method name will be displayed in the view but not executed?
- Step Till
- Step Over
- Step Out
- Step Into (Correct answer)
Correct answer: Step Into
The 'Step Into' debugging command executes the current line of code. If that line contains a call to a method or function, 'Step Into' will move the execution pointer to the first line *inside* that method. This allows the tester to trace its internal execution line by line, effectively displaying the method name and then proceeding to execute its contents in detail.
Question 13: The first sheet of the run-time data table is returned by which Data Table object attribute.
- SyncSheet
- GlobalSheet (Correct answer)
- ParallelSheet
- LocalSheet
Correct answer: GlobalSheet
In UFT/QTP, the `GlobalSheet` object attribute is specifically used to access the first sheet of the run-time data table. This sheet holds data that is accessible and shared across all actions within a test. It serves as a central repository for test data that is not specific to any single action.
Question 14: Which of the following tabs in QTP allows you to run a script line to change the current value of a variable in a function library?
- Command (Correct answer)
- View
- Current
- Variables
Correct answer: Command
The 'Command' tab, also known as the Immediate window, in QTP (now UFT) debugging mode allows testers to execute single lines of VBScript code on the fly. This powerful feature enables users to inspect and modify the current values of variables, including those defined in loaded function libraries, during a test run without having to stop and restart the entire execution.
Question 15: Which of the following will be called via an object and will wait for the object's expected property value?
- Exit
- WaitForProperty (Correct answer)
- Wait
- All of the above
Correct answer: WaitForProperty
The `WaitForProperty` method is specifically designed to synchronize test execution by pausing until a specified object property attains a particular expected value or until a defined timeout occurs. This is crucial for handling dynamic application behavior, ensuring that the test script interacts with UI elements only when they are in the correct and stable state, unlike a generic `Wait` statement.
Question 16: To encrypt strings in Data Table cells, which option in the Data Table menu is used?
- Encrypt Code
- Decrypt
- Decrypt Code
- Encrypt
To encrypt strings within Data Table cells in UFT/QTP, the 'Encrypt' option is used. This feature is typically found within the Data Table menu or context menu. Encrypting data is essential for securing sensitive information, such as passwords or personal details, that are stored directly in the test's data table, protecting them from unauthorized access.
Question 17: In the Keyword view, which of the following are the four main columns?
- Item, Operation, Property, Documentation
- Item, Operation, Value, Comments
- Number, Operation, Value, Documentation
- Item, Operation, Value, Documentation (Correct answer)
Correct answer: Item, Operation, Value, Documentation
The Keyword View in UFT/QTP provides a structured, table-like interface for viewing and editing test steps. Its four main columns are 'Item,' which identifies the object or step; 'Operation,' which specifies the action performed; 'Value,' which holds any data or parameters for the operation; and 'Documentation,' for adding descriptive comments to each step.
Question 18: To make a list of recovery scenarios the default for all new tests, which of the following parameters would you choose?
- adding all recovery files to data folder of installation folder
- Selecting Set as Default button at Recovery pane of test setting (Correct answer)
- Selecting Set as Default button at Recovery Scenario manager
- Selecting Default Checkbox forthe recoveries at Recovery pane of test setting
Correct answer: Selecting Set as Default button at Recovery pane of test setting
To configure a list of recovery scenarios as the default for all new tests in UFT/QTP, you must access the Test Settings. Within the 'Recovery' pane of the Test Settings dialog, there is a 'Set as Default' button. Clicking this button saves the current recovery scenario configuration as the global default, ensuring it's automatically applied to any new tests created thereafter.
Question 19: Which types of actions are read-only in the calling test, but can be utilized locally for the external action with an editable copy of the Data Table information?
- External ReusableThe type of checkpoints in QTP is determined by elements such as screen resolution, operating systems, and RG8 settings. (Correct answer)
- Non-reusable
- Reusablesable
- None of the above
Correct answer: External ReusableThe type of checkpoints in QTP is determined by elements such as screen resolution, operating systems, and RG8 settings.
External Reusable actions are actions that are stored in a separate test and called by the current test. When such an action is called, its script is read-only in the calling test, preventing accidental modifications to the original. However, a local, editable copy of its associated Data Table information is created, allowing the calling test to provide specific data for that particular execution without altering the source action's data.
Question 20: The type of checkpoints in QTP is determined by elements such as screen resolution, operating systems, and RG8 settings.
- File content
- Standard
- Table
- Bitmap (Correct answer)
Correct answer: Bitmap
Bitmap checkpoints are used to compare a captured image of an application area (a bitmap) during test creation with the same area during test execution. Factors like screen resolution, operating systems, and RGB settings are critical because even minor variations in these can cause the checkpoint to fail. This is due to its reliance on precise pixel-level comparison for verification.
Question 21: What are the filter criteria provided in the Test Results Window to filter reports?
- Node type
- Iterations (Correct answer)
- Status
- All of the above
Correct answer: Iterations
In the UFT Test Results Window, 'Iterations' is a valid filter criterion that allows users to narrow down the displayed test results. For data-driven tests, where an action or test runs multiple times with different data sets, filtering by iteration enables testers to focus on the results of a specific run, making it easier to analyze failures or successes for particular data inputs.
Question 22: Which of the following components constitutes a UFT test?
- calls to OuickTest Professional tests
- calls to actions (Correct answer)
- callsC) calls and copies of actions to actions (reusable only)
- calls to actions (reusable only) (Correct answer)
Correct answer: calls to actions
A UFT (Unified Functional Testing) test is fundamentally composed of one or more actions. Actions are modular blocks of code that encapsulate specific tasks or workflows within the application under test. A complete test is built by arranging and calling these actions in a defined sequence, which can include both local actions and calls to external reusable actions.
Question 23: In QTP,— is an extension of the Action template.
- .mta
- .mst (Correct answer)
- .mtr
- .mta
Correct answer: .mst
In QTP (now UFT), the `.mst` file extension is specifically used for Action templates. These templates define the default structure, initial steps, and settings for new actions. When a new action is created, it is based on an existing action template, providing a consistent and standardized starting point for test development.
Question 24: What's the connection between RGB and Pixel Tolerance?
- Image checkpointkpoint (Correct answer)
- Bitmap checkpointAll (Correct answer)
- of the above
- None of the above
Correct answer: Image checkpointkpoint
RGB values and Pixel Tolerance are directly connected to Bitmap or Image checkpoints in UFT/QTP. RGB values represent the color of each pixel, and Pixel Tolerance defines the permissible difference in these color values between the expected (baseline) image and the actual image captured during test execution. This tolerance is crucial for preventing minor, visually insignificant pixel variations from causing a checkpoint to fail.
Question 25: What is the value in the keyword view's Value cell?
- Image checkpoint
- Both A & B (Correct answer)
- None of tNone of the abovehe above
Correct answer: Both A & B
The 'Value' cell in the Keyword View is used to specify the data or parameters required for a particular operation. This can include literal values (like text or numbers) or references to variables and data table entries. For operations like an Image checkpoint, the Value cell would contain parameters such as the name of the baseline image or comparison settings, thus accommodating various types of data.
Which of the following is a World Wide Consortium (W30) concern?