Karate interview questions — Easy
106 easy-level Karate questions from our API Testing bank, each with the correct answer and an explanation of why it is correct.
This topic slice is available to practise but is not yet part of our indexed set.
What this covers
Karate appears throughout API Testing interviews. At easy level, interviewers are typically checking that you know the fundamentals and can describe them precisely — definitions, defaults, and the basic mechanics. Work through these, then explain your answer out loud; the second part is what interviews actually test.
20 example questions
1. In the context of Karate, karate-config.js is best described as:
- A. Utility generating arrays for data-driven loops.
- B. Asserts the response HTTP status code.
- C. Steps run before each scenario in a Karate feature.
- D. Global configuration returning environment variables.correct
Why: karate-config.js: Global configuration returning environment variables.
2. In a CI/CD pipeline review, consider this: A defining feature of Karate is:
- A. Heavy Java step code.
- B. Gherkin syntax with no glue code needed.correct
- C. No assertions.
- D. SOAP only.
Why: Karate runs Gherkin features directly with built-in HTTP/assert steps.
3. Which of the following best describes gatling integration in Karate?
- A. Reusing Karate tests as performance tests via Karate-Gatling.correct
- B. Global configuration returning environment variables.
- C. Steps run before each scenario in a Karate feature.
- D. Utility generating arrays for data-driven loops.
Why: gatling integration: Reusing Karate tests as performance tests via Karate-Gatling.
4. Which of the following best describes karate.repeat in Karate?
- A. Utility generating arrays for data-driven loops.correct
- B. Keywords composing the request endpoint.
- C. Reusing Karate tests as performance tests via Karate-Gatling.
- D. Global configuration returning environment variables.
Why: karate.repeat: Utility generating arrays for data-driven loops.
5. Which of the following best describes karate-config.js in Karate?
- A. Global configuration returning environment variables.correct
- B. Fuzzy matcher validating a UUID-formatted value.
- C. Reusing Karate tests as performance tests via Karate-Gatling.
- D. Keywords composing the request endpoint.
Why: karate-config.js: Global configuration returning environment variables.
6. Which Karate keyword does powerful (fuzzy/schema) comparison?
- A. Assert.
- B. Match.correct
- C. Verify.
- D. Check.
Why: Karate's 'match' supports exact, contains, and schema markers.
7. What is the purpose of karate-config.js in Karate?
- A. Reusing Karate tests as performance tests via Karate-Gatling.
- B. Defines a variable in a Karate scenario.
- C. Keywords composing the request endpoint.
- D. Global configuration returning environment variables.correct
Why: karate-config.js: Global configuration returning environment variables.
8. In Karate, what does gatling integration do or refer to?
- A. Asserts the response HTTP status code.
- B. Utility generating arrays for data-driven loops.
- C. Keywords composing the request endpoint.
- D. Reusing Karate tests as performance tests via Karate-Gatling.correct
Why: gatling integration: Reusing Karate tests as performance tests via Karate-Gatling.
9. Which of the following best describes Background: in Karate?
- A. Utility generating arrays for data-driven loops.
- B. Fuzzy matcher validating a UUID-formatted value.
- C. Keywords composing the request endpoint.
- D. Steps run before each scenario in a Karate feature.correct
Why: Background:: Steps run before each scenario in a Karate feature.
10. In Karate, what does karate-config.js do or refer to?
- A. Global configuration returning environment variables.correct
- B. Reusing Karate tests as performance tests via Karate-Gatling.
- C. Defines a variable in a Karate scenario.
- D. Keywords composing the request endpoint.
Why: karate-config.js: Global configuration returning environment variables.
11. What is the purpose of Background: in Karate?
- A. Steps run before each scenario in a Karate feature.correct
- B. Reusing Karate tests as performance tests via Karate-Gatling.
- C. Utility generating arrays for data-driven loops.
- D. Defines a variable in a Karate scenario.
Why: Background:: Steps run before each scenario in a Karate feature.
12. In Karate, what does Background: do or refer to?
- A. Asserts the response HTTP status code.
- B. Keywords composing the request endpoint.
- C. Defines a variable in a Karate scenario.
- D. Steps run before each scenario in a Karate feature.correct
Why: Background:: Steps run before each scenario in a Karate feature.
13. In Karate, what does karate.repeat do or refer to?
- A. Steps run before each scenario in a Karate feature.
- B. Utility generating arrays for data-driven loops.correct
- C. Asserts the response HTTP status code.
- D. Keywords composing the request endpoint.
Why: karate.repeat: Utility generating arrays for data-driven loops.
14. What is the purpose of karate.repeat in Karate?
- A. Fuzzy matcher validating a UUID-formatted value.
- B. Reusing Karate tests as performance tests via Karate-Gatling.
- C. Utility generating arrays for data-driven loops.correct
- D. Asserts the response HTTP status code.
Why: karate.repeat: Utility generating arrays for data-driven loops.
15. What is the purpose of #uuid in Karate?
- A. Reusing Karate tests as performance tests via Karate-Gatling.
- B. Asserts the response HTTP status code.
- C. Steps run before each scenario in a Karate feature.
- D. Fuzzy matcher validating a UUID-formatted value.correct
Why: #uuid: Fuzzy matcher validating a UUID-formatted value.
16. In Karate, what does status 200 do or refer to?
- A. Defines a variable in a Karate scenario.
- B. Reusing Karate tests as performance tests via Karate-Gatling.
- C. Fuzzy matcher validating a UUID-formatted value.
- D. Asserts the response HTTP status code.correct
Why: status 200: Asserts the response HTTP status code.
17. In Karate, what does def do or refer to?
- A. Reusing Karate tests as performance tests via Karate-Gatling.
- B. Utility generating arrays for data-driven loops.
- C. Fuzzy matcher validating a UUID-formatted value.
- D. Defines a variable in a Karate scenario.correct
Why: def: Defines a variable in a Karate scenario.
18. Which of the following best describes def in Karate?
- A. Keywords composing the request endpoint.
- B. Reusing Karate tests as performance tests via Karate-Gatling.
- C. Utility generating arrays for data-driven loops.
- D. Defines a variable in a Karate scenario.correct
Why: def: Defines a variable in a Karate scenario.
19. Which of the following best describes url / path in Karate?
- A. Global configuration returning environment variables.
- B. Keywords composing the request endpoint.correct
- C. Defines a variable in a Karate scenario.
- D. Asserts the response HTTP status code.
Why: url / path: Keywords composing the request endpoint.
20. In Karate, what does #uuid do or refer to?
- A. Defines a variable in a Karate scenario.
- B. Global configuration returning environment variables.
- C. Steps run before each scenario in a Karate feature.
- D. Fuzzy matcher validating a UUID-formatted value.correct
Why: #uuid: Fuzzy matcher validating a UUID-formatted value.