ISTQB Certified Tester Advanced Level - Test Automation Engineer (CTAL-TAE) — Questions and Answers
Question 1: How do you handle a JavaScript alert using Selenium WebDriver?
- driver.alert().dismiss()
- driver.handleAlert()
- driver.switchTo().alert().accept() (Correct answer)
- driver.switchTo().popup().accept()
Correct answer: driver.switchTo().alert().accept()
driver.switchTo().alert() returns the Alert interface, then accept() clicks OK and dismiss() clicks Cancel.
Question 2: What is REST in the context of API testing?
- Representational State Transfer — an architectural style for distributed hypermedia systems (Correct answer)
- A database query language
- A programming language
- A testing methodology
Correct answer: Representational State Transfer — an architectural style for distributed hypermedia systems
REST (Representational State Transfer) is an architectural style using standard HTTP methods for stateless client-server communication.
Question 3: Which tool can be used to create API mock servers for testing in Node.js projects?
- cors
- nodemon
- json-server (Correct answer)
- express-validator
Correct answer: json-server
json-server creates a full fake REST API from a JSON file in seconds, making it ideal for frontend and integration test mocking.
Question 4: In functional testing, what should an assertion primarily verify?
- The network bandwidth
- The expected outcome of a behavior (Correct answer)
- The number of test files
- The CPU usage of the browser
Correct answer: The expected outcome of a behavior
Assertions check that actual results match expected functional outcomes.
Question 5: 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 Default Checkbox forthe recoveries at Recovery pane of test setting
- Selecting Set as Default button at Recovery Scenario manager
- Selecting Set as Default button at Recovery pane of test setting (Correct answer)
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 6: What is contract testing in API test automation?
- Validating API documentation completeness
- Testing API SLA compliance
- Verifying that an API provider and consumer agree on the API structure via a shared contract (Correct answer)
- Testing API rate limits
Correct answer: Verifying that an API provider and consumer agree on the API structure via a shared contract
Contract testing (e.g., with Pact) ensures the API consumer and provider independently verify they honor the agreed interface contract.
Question 7: In GitLab CI, what keyword defines the sequence of execution phases in a pipeline?
- phases
- stages (Correct answer)
- scripts
- jobs
Correct answer: stages
The `stages` keyword in .gitlab-ci.yml defines the ordered list of pipeline phases; jobs within each stage run in parallel.
Question 8: In k6 performance testing, what language are test scripts written in?
- JavaScript (ES6+) (Correct answer)
- Ruby
- Python
- Groovy
Correct answer: JavaScript (ES6+)
k6 uses modern JavaScript (ES6+) for test scripts, making it accessible to developers already familiar with JS.
Question 9: What is 'soft assertion' in test automation?
- An assertion without a message
- An assertion that always passes
- An assertion that retries on failure
- An assertion that logs a failure but continues test execution (Correct answer)
Correct answer: An assertion that logs a failure but continues test execution
Soft assertions collect all failures without stopping the test, allowing multiple assertions to be evaluated in a single run.
Question 10: What is a 'think time' in a JMeter load test script?
- Server processing time
- Network latency measurement
- Test setup time
- A simulated pause between user actions to mimic realistic human behavior (Correct answer)
Correct answer: A simulated pause between user actions to mimic realistic human behavior
Think time introduces delays between requests in a test script to simulate realistic user pauses while reading or interacting with pages.
Question 11: What is the primary purpose of load testing in software quality assurance?
- To find security vulnerabilities
- To validate UI rendering
- To verify the system performs acceptably under expected peak user load (Correct answer)
- To test individual functions in isolation
Correct answer: To verify the system performs acceptably under expected peak user load
Load testing simulates the expected maximum concurrent users to verify the system meets performance requirements under realistic conditions.
Question 12: In QTP,— is an extension of the Action template.
- .mtr
- .mst (Correct answer)
- .mta
- .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 13: Which HTTP status code indicates a successful API request that returned data?
- 204 No Content
- 200 OK (Correct answer)
- 301 Moved Permanently
- 201 Created
Correct answer: 200 OK
HTTP 200 OK is the standard response for a successful GET request that returns the requested data.
Question 14: What is the purpose of an API authentication header like Authorization: Bearer <token>?
- To provide credentials proving the caller is allowed to access the API resource (Correct answer)
- To enable CORS
- To specify the response format
- To set the request content type
Correct answer: To provide credentials proving the caller is allowed to access the API resource
The Authorization Bearer token header carries a JWT or OAuth access token that the server verifies to authenticate and authorize the request.
Question 15: What is a 'ramp-up period' in a load test?
- The time to gradually increase virtual users to the target load level (Correct answer)
- The warmup time for the server
- The time to decrease load after peak
- The test setup duration
Correct answer: The time to gradually increase virtual users to the target load level
A ramp-up period gradually adds virtual users over time to reach peak load, avoiding sudden spikes that don't reflect real traffic patterns.
Question 16: What is 'flakiness' in mobile test automation and one common cause?
- Intermittent test failures caused by timing issues such as animations or slow network responses (Correct answer)
- Tests that always fail
- Tests written in the wrong language
- Tests that are too slow
Correct answer: Intermittent test failures caused by timing issues such as animations or slow network responses
Flaky mobile tests fail intermittently due to timing issues — like animations completing, network delays, or async operations not finishing before assertions.
Question 17: What is the purpose of the 'And' and 'But' keywords in Gherkin syntax?
- They import external feature files and their scenarios into the current file
- They define alternative execution paths within a single scenario
- They mark optional steps that may be conditionally skipped during execution
- They extend Given, When, or Then steps to improve readability without repeating the same keyword (Correct answer)
Correct answer: They extend Given, When, or Then steps to improve readability without repeating the same keyword
'And' and 'But' are syntactic conveniences in Gherkin that allow chaining multiple steps without repeating Given, When, or Then, making scenarios more natural and readable.
Question 18: What is a 'step definition' in a BDD framework like Cucumber?
- A Gherkin keyword that introduces sub-steps within a scenario
- A report generated after BDD test suite execution
- Code that maps each Gherkin step to executable test code (Correct answer)
- A description of test prerequisites in the feature file
Correct answer: Code that maps each Gherkin step to executable test code
Step definitions are the code implementations (in Java, Python, Ruby, etc.) that correspond to and execute each Gherkin step written in a feature file.
Question 19: What is a Docker container's primary benefit for test automation environments?
- Generates test data automatically
- Manages browser licensing
- Provides consistent, isolated environments that eliminate 'works on my machine' issues (Correct answer)
- Speeds up test script writing
Correct answer: Provides consistent, isolated environments that eliminate 'works on my machine' issues
Docker containers package the application and all dependencies together, ensuring tests run in identical environments across all machines.
Question 20: Which Python library is most commonly used for BDD-style test automation with Gherkin feature files?
- unittest
- pytest-django
- mock
- behave (Correct answer)
Correct answer: behave
behave is the most widely used Python BDD framework, supporting Gherkin feature files with Python-based step definitions following the Given-When-Then format.
Question 21: What is a mobile emulator vs. a real device in test automation?
- Real devices only work with manual testing
- An emulator is software that simulates a device; a real device is physical hardware running actual OS (Correct answer)
- An emulator is faster but real devices can't be used for automation
- They are equivalent in testing accuracy
Correct answer: An emulator is software that simulates a device; a real device is physical hardware running actual OS
Emulators/simulators run on host machines and are convenient but lack real hardware behaviors; real devices catch hardware-specific and performance issues.
Question 22: In TDD, what should a developer do immediately after writing a test that fails (the red phase)?
- Refactor the existing codebase first
- Write the minimum code necessary to make the test pass (Correct answer)
- Add more tests before fixing the current failure
- Delete the failing test and rewrite it differently
Correct answer: Write the minimum code necessary to make the test pass
After a test fails, the developer writes only the minimal production code needed to make that specific test pass, moving to the green phase.
Question 23: In BDD, which tool is most commonly used for writing feature files with Gherkin syntax in Java projects?
- Cucumber (Correct answer)
- JUnit
- TestNG
- Selenium
Correct answer: Cucumber
Cucumber is the most widely used BDD tool that parses Gherkin-syntax feature files and maps their steps to executable Java step definitions.
Question 24: Which of the following is NOT a standard Gherkin keyword used in BDD feature files?
- Execute (Correct answer)
- Given
- Then
- When
Correct answer: Execute
'Execute' is not a Gherkin keyword; standard keywords include Given, When, Then, And, But, Feature, Scenario, and Background.
Question 25: What HTTP method should be used for an API call that only retrieves data without side effects?
- GET (Correct answer)
- POST
- PUT
- PATCH
Correct answer: GET
GET is the idempotent, safe HTTP method for retrieving resources without modifying server state.
Question 26: In REST Assured, which method is used to specify the base URL for all API requests?
- RestAssured.baseURI (Correct answer)
- given().baseUrl()
- RestAssured.url()
- request.setUrl()
Correct answer: RestAssured.baseURI
Setting RestAssured.baseURI globally sets the base URL so all requests automatically prepend it without repeating the full URL.
Question 27: What is test parallelization using Selenium Grid in a CI environment?
- Testing multiple versions of an application
- Running tests sequentially on a remote server
- Distributing test execution across multiple browser/OS nodes simultaneously to reduce run time (Correct answer)
- Running the same test twice to verify stability
Correct answer: Distributing test execution across multiple browser/OS nodes simultaneously to reduce run time
Selenium Grid paired with CI distributes tests across multiple nodes in parallel, significantly reducing feedback time in pipelines.
Question 28: In Gherkin syntax, what does the 'Given' keyword represent in a test scenario?
- The test data table used to parameterize the scenario
- The expected outcome of the tested behavior
- The action or event performed during the test
- The initial context or preconditions before the action being tested (Correct answer)
Correct answer: The initial context or preconditions before the action being tested
'Given' describes the initial context, state, or preconditions that exist before the action under test is performed.
Question 29: Which metric best reflects the maintainability cost of a test suite?
- Length of variable names only
- Frequency of tests needing updates due to minor UI changes (Correct answer)
- Number of monitors used
- Color of the IDE theme
Correct answer: Frequency of tests needing updates due to minor UI changes
High churn from brittle locators signals poor maintainability and rising upkeep cost.
Question 30: What is the purpose of WebDriverWait in Selenium?
- To scroll the page
- To pause execution until an expected condition is met (Correct answer)
- To slow down the browser
- To capture screenshots
Correct answer: To pause execution until an expected condition is met
WebDriverWait implements explicit waits, polling until a specified condition (like element visibility) is true before a timeout.
ISTQB Certified Tester Advanced Level - Test Automation Engineer (CTAL-TAE)
The ISTQB CTAL-TAE certification validates expertise in designing, implementing, and maintaining test automation solutions, covering automation architecture, API testing, BDD/TDD practices, CI/CD integration, and mobile test automation.
Exam Rules
- You can skip questions and return to them later
- Flag questions for review before submitting
- No feedback shown until you submit the entire exam
- Unanswered questions count as wrong — answer everything
- 10 pretest questions are mixed in and don't affect your score
- Timer auto-submits when time runs out
- Your progress is auto-saved every 30 seconds