Testing / Karate Framework Interview questions
What is a Karate feature file?
A feature file is a plain-text file with a .feature extension that contains one or more test scenarios written in Karate's Gherkin-based syntax. It's the fundamental unit of a Karate test suite, similar in spirit to a Cucumber feature file, but Karate interprets the steps directly rather than mapping them to separately written glue code.
Feature: user API tests Scenario: get a user by id Given url 'https://api.example.com/users/1' When method get Then status 200 And match response.name == 'John'
Each Scenario inside a feature file is an independent test case, and a single feature file commonly groups related scenarios together, such as every scenario testing a particular API resource or endpoint.
More Related questions...