Docsity

Software Test Automator Accredited Program ASTAC Practice Exam, Exams of Technology

Toggle sidebar
bg1
Software Test Automator Accredited Program
ASTAC Practice Exam
**Question 1.** Which metric is most commonly used to calculate the ROI of test automation?
A) Number of test cases executed per day
B) Percentage of code coverage achieved
C) Cost saved by reducing manual testing hours
D) Time taken to develop the automation framework
Answer: C
Explanation: ROI compares the financial benefit (cost saved by reducing manual effort) against the
investment required to build and maintain automation.
**Question 2.** Which of the following is a technical prerequisite for successful test automation?
A) Executive sponsorship
B) Stable and well‑documented APIs
C) High turnover in the QA team
D) Frequent changes to UI design
Answer: B
Explanation: Stable, well‑documented APIs allow reliable automation of service‑level tests; the other
options hinder automation success.
**Question 3.** Which statement best reflects an automation myth?
A) Only regression tests should be automated.
B) All test cases can be fully automated.
C) Automation reduces the need for skilled testers.
D) Test data should be externalized.
Answer: B
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e

Partial preview of the text

Download Software Test Automator Accredited Program ASTAC Practice Exam and more Exams Technology in PDF only on Docsity!

ASTAC Practice Exam

Question 1. Which metric is most commonly used to calculate the ROI of test automation? A) Number of test cases executed per day B) Percentage of code coverage achieved C) Cost saved by reducing manual testing hours D) Time taken to develop the automation framework Answer: C Explanation: ROI compares the financial benefit (cost saved by reducing manual effort) against the investment required to build and maintain automation. Question 2. Which of the following is a technical prerequisite for successful test automation? A) Executive sponsorship B) Stable and well‑documented APIs C) High turnover in the QA team D) Frequent changes to UI design Answer: B Explanation: Stable, well‑documented APIs allow reliable automation of service‑level tests; the other options hinder automation success. Question 3. Which statement best reflects an automation myth? A) Only regression tests should be automated. B) All test cases can be fully automated. C) Automation reduces the need for skilled testers. D) Test data should be externalized. Answer: B

ASTAC Practice Exam

Explanation: It is unrealistic to automate 100 % of tests; some scenarios (exploratory, usability) remain manual. Question 4. Testability of an application is most improved by: A) Adding many conditional statements in the code. B) Designing loosely coupled, modular components. C) Using a monolithic architecture. D) Hard‑coding configuration values. Answer: B Explanation: Modular, loosely coupled design makes it easier to isolate and automate individual units. Question 5. When evaluating tools, which factor is least relevant for a cloud‑native application? A) Support for RESTful API testing B) Ability to run on Windows OS only C) Integration with CI pipelines D) Licensing cost Answer: B Explanation: Cloud‑native apps often run on Linux containers; requiring Windows‑only support is a limitation, not a benefit. Question 6. In the test automation pyramid, which layer should contain the highest number of test cases? A) UI tests B ) API/Service tests C) Unit tests

ASTAC Practice Exam

C) Test data is stored directly in the script. D) It requires no programming knowledge. Answer: B Explanation: Modular frameworks promote reusable code blocks (functions, classes) that can be called across tests. Question 10. In a data‑driven framework, test data is typically stored: A) Inside the test script as hard‑coded values. B) In external sources such as Excel, CSV, or databases. C) In the source code repository as binary files. D) In the application’s UI. Answer: B Explanation: Data‑driven frameworks externalize data to enable the same script to run with many input sets. Question 11. Which of the following best describes a keyword‑driven framework? A) Test steps are expressed as high‑level keywords that map to reusable functions. B) Tests are written in a single monolithic script. C) Only UI locators are stored in an external file. D) It does not support parameterization. Answer: A Explanation: Keyword‑driven frameworks separate test logic (keywords) from implementation, enhancing readability for non‑technical users. Question 12. A hybrid automation framework typically combines:

ASTAC Practice Exam

A) Only record‑and‑playback and BDD. B) Two or more of modular, data‑driven, and keyword‑driven approaches. C) Manual testing and performance testing. D) Cloud execution and desktop execution. Answer: B Explanation: Hybrid frameworks integrate strengths of multiple design patterns to improve flexibility and maintainability. Question 13. In Gherkin syntax, which keyword is used to describe the expected outcome? A) Given B) When C) Then D) And Answer: C Explanation: “Then” defines the observable result of the scenario, completing the Given‑When‑Then structure. Question 14. Which practice helps keep an automation framework maintainable? A) Duplicating code across many test scripts. B) Using hard‑coded waits throughout scripts. C) Centralizing common utilities in shared libraries. D) Embedding test data directly in the UI. Answer: C Explanation: Shared libraries reduce duplication and simplify updates when changes occur.

ASTAC Practice Exam

Answer: C Explanation: Explicit waits are condition‑based and repeatedly check until the condition is satisfied or timeout occurs. Question 18. Which wait allows customizing polling frequency and ignoring specific exceptions? A) Implicit wait B) Explicit wait C) Fluent wait D) Fixed wait Answer: C Explanation: Fluent wait provides fine‑grained control over polling interval and exception handling. Question 19. Proper exception handling in automation scripts should: A) Swallow all exceptions silently. B) Log the error, capture a screenshot, and re‑throw or fail the test. C) Continue execution regardless of failures. D) Only handle NoSuchElementException. Answer: B Explanation: Logging, capturing context, and failing the test ensures traceability and accurate results. Question 20. To achieve detailed execution logs, a test automation framework should: A) Write logs only to the console. B) Use a logging library that supports levels (INFO, DEBUG, ERROR) and timestamps. C) Overwrite the same log file for each run.

ASTAC Practice Exam

D) Disable logging to improve performance. Answer: B Explanation: Structured logging with levels and timestamps aids debugging and reporting. Question 21. Which approach best supports test data cleanup after a test run? A) Leaving test data in the production database. B) Using transactions that roll back at the end of each test. C) Manually deleting data via UI after each test. D) Ignoring cleanup to speed up execution. Answer: B Explanation: Transactional rollbacks ensure test data does not persist, keeping environments clean and repeatable. Question 22. Which tool enables parallel execution of Selenium tests across multiple browsers and machines? A) Jenkins B) Selenium Grid C) Git D) Postman Answer: B Explanation: Selenium Grid distributes tests across nodes, allowing parallel cross‑browser execution. Question 23. In a CI pipeline, the stage that typically triggers automated UI tests is: A) Code commit

ASTAC Practice Exam

Question 26. A “false failure” in test automation is typically caused by: A) A bug in the application under test. B) An outdated locator after UI change. C) Incorrect business logic. D) Missing test data. Answer: B Explanation: False failures arise from the test script or environment, such as stale locators, not from the application itself. Question 27. Which KPI best reflects the breadth of automation coverage? A) Average test execution time B) Percentage of total test cases automated C) Number of bugs found per release D) CPU usage during test runs Answer: B Explanation: Automation coverage KPI measures how many of the overall test cases are automated. Question 28. During script maintenance, the most efficient way to handle a changed UI element is to: A) Delete all affected test cases and rewrite them from scratch. B) Update the locator in a single page‑object class used by all tests. C) Comment out the failing steps. D) Switch to record‑and‑playback for the affected scenario. Answer: B

ASTAC Practice Exam

Explanation: Centralizing locators in page‑object classes allows a single change to propagate to all dependent tests. Question 29. Which document typically contains the high‑level architecture of the automation framework? A) Test Plan B) Software Design Document (SDD) C) User Story D) Release Notes Answer: B Explanation: The SDD outlines framework components, design patterns, and integration points. Question 30. Which of the following is NOT a benefit of using a BDD approach? A) Improved collaboration between business and technical teams. B) Automatic generation of UI code. C) Living documentation through readable scenarios. D) Early validation of acceptance criteria. Answer: B Explanation: BDD focuses on shared specifications, not on generating UI implementation code. Question 31. When selecting an open‑source automation tool, which factor is most critical to assess? A) Number of paid licenses required. B) Community activity and frequency of releases. C) Availability of a dedicated support hotline.

ASTAC Practice Exam

B) Relying solely on implicit waits. C) Implementing explicit waits for specific conditions. D) Ignoring synchronization altogether. Answer: C Explanation: Explicit waits target precise conditions, minimizing unnecessary delays and reducing flaky behavior. Question 35. What is the primary purpose of a “page object” in a test automation framework? A) To store test data in a spreadsheet. B) To encapsulate UI element locators and actions for a specific page. C) To generate HTML reports. D) To manage CI pipeline configurations. Answer: B Explanation: Page objects provide an abstraction layer, centralizing locators and interactions for maintainability. Question 36. Which of the following is a common cause of “environment‑related false failures”? A) Incorrect business logic. B) Missing or mismatched test data. C) Network latency causing timeout errors. D) Faulty assertion statements. Answer: C Explanation: Environment issues like network latency can cause timeouts unrelated to the application functionality.

ASTAC Practice Exam

Question 37. When using a data‑driven framework with Excel files, which library is commonly used in Java? A) Apache POI B) Selenium Core C) TestNG D) JUnit Answer: A Explanation: Apache POI provides APIs to read/write Excel files, enabling external test data management. Question 38. Which CI tool is known for its “pipeline as code” approach using a Jenkinsfile? A) Travis CI B) GitHub Actions C) Jenkins D) CircleCI Answer: C Explanation: Jenkins pipelines are defined in a Jenkinsfile, allowing version‑controlled pipeline definitions. Question 39. In the context of test automation, “flaky test” refers to: A) A test that always passes. B) A test that fails intermittently without code changes. C) A test that runs too quickly. D) A test that only validates UI layout. Answer: B

ASTAC Practice Exam

C) Explicit wait for the presence of a specific element or request completion flag. D) No wait; proceed immediately. Answer: C Explanation: Explicitly waiting for a condition related to the AJAX request ensures the UI is ready before actions continue. Question 43. Which of the following is a typical characteristic of a “maintenance lifecycle” for automation scripts? A) Scripts are written once and never updated. B) Scripts are periodically reviewed and refactored after UI or API changes. C) Scripts are deleted after each release. D) Scripts are only updated when a new tester joins the team. Answer: B Explanation: Ongoing review and refactoring keep scripts aligned with evolving application features. Question 44. In a hybrid framework, which component usually handles test data, while another handles test logic? A) Test runner and logger. B) Data‑driven module and keyword‑driven module. C) UI layer and database layer. D) Continuous integration server and version control. Answer: B Explanation: Hybrid frameworks often combine data‑driven (for input) and keyword‑driven (for actions) modules.

ASTAC Practice Exam

Question 45. Which of the following best defines “automation coverage”? A) The percentage of total project budget spent on automation. B) The proportion of test cases that have been automated. C) The number of browsers supported by the automation suite. D) The amount of code written in the automation framework. Answer: B Explanation: Automation coverage measures how many test cases are automated relative to the total test suite. Question 46. Which of the following is a recommended practice for managing test environments in CI? A) Using a single shared environment for all branches. B) Dynamically provisioning isolated containers or VMs per build. C) Manually configuring the environment before each run. D) Skipping environment setup to speed up builds. Answer: B Explanation: Isolated, dynamically provisioned environments prevent cross‑branch interference and ensure reproducibility. Question 47. When using Selenium WebDriver, which command switches the context to an iframe? A) driver.switchTo().frame(index) B) driver.navigate().to(frame) C) driver.findElement(By.id("frame")).click() D) driver.executeScript("switchToFrame()") Answer: A

ASTAC Practice Exam

Answer: B Explanation: Tracking pass/fail trends reveals stability, regressions, and overall health of the test suite. Question 51. Which of the following is a best practice when handling credentials in automation scripts? A) Hard‑code usernames and passwords in the source code. B) Store them in plain‑text files within the repository. C) Use encrypted vaults or environment variables and retrieve at runtime. D) Write them directly into the test reports. Answer: C Explanation: Secure storage (vaults, env vars) protects sensitive data and complies with security policies. Question 52. In a CI pipeline, which stage should trigger the generation of an automated test execution report? A) Source code checkout. B) Build compilation. C) Test execution. D) Deployment to production. Answer: C Explanation: Reports are generated after tests run, summarizing outcomes for stakeholders. Question 53. Which of the following best describes “service virtualization” in test automation? A) Recording user actions on a UI. B) Simulating dependent services that are unavailable or costly to use.

ASTAC Practice Exam

C) Deploying the full production environment for testing. D) Automating only the front‑end components. Answer: B Explanation: Service virtualization creates mock services, enabling testing without real downstream systems. Question 54. Which Selenium WebDriver method is used to wait until a specific element becomes clickable? A) driver.waitForElementClickable() B) ExpectedConditions.elementToBeClickable(locator) with WebDriverWait C) driver.findElement(locator).click() D) driver.manage().timeouts().implicitlyWait() Answer: B Explanation: Using WebDriverWait with ExpectedConditions.elementToBeClickable ensures the element can be interacted with safely. Question 55. Which of the following is a common sign that an automation suite needs refactoring? A) All tests pass consistently. B) Execution time has increased dramatically after minor UI changes. C) New test cases are added easily. D) Test data files are stored in a single location. Answer: B Explanation: A spike in execution time often indicates inefficient locators or duplicated code, signaling the need for refactor.