Your API's GET operation might return different HTTP status codes (e.g., 200 OK, 404 Not Found) based on the resource being requested. You need to write a Rest Assured test that asserts a specific status code for a particular scenario. Among the following, which is the most effective way of prompting so that GitHub Copilot can best assist you?

Providing an example of how status code assertions are done in other Rest Assured tests and a comment specifying the expected status code for the current scenario.
Commenting "// Assert status code." and mentioning the expected code.
Describing the scenario and the expected outcome (including the status code) in natural language comments.
Expecting Copilot to automatically infer the expected status code based on the request URL.
Verified Answer
Correct Option - a

To get all Infosys Certified Generative AI Testers-Foundation Exam questions Join Telegram Group https://rebrand.ly/lex-group-70b557

Telegram

We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.

Qtr No. 213, New Town Yehlanka Indore 454775

admin@prepflix.in

Updated on Tue, 16 Sept 2025