0% found this document useful (0 votes)
25 views1 page

Ezy Test Backend

The document outlines a test scenario for creating a .NET Web API endpoint that returns destination airports based on a given origin airport. It includes steps for setting up the project, creating an AirportController, implementing business logic, adding logging, and manually testing the API. The scenario emphasizes the importance of logging requests and responses for debugging and monitoring purposes.

Uploaded by

Pri Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views1 page

Ezy Test Backend

The document outlines a test scenario for creating a .NET Web API endpoint that returns destination airports based on a given origin airport. It includes steps for setting up the project, creating an AirportController, implementing business logic, adding logging, and manually testing the API. The scenario emphasizes the importance of logging requests and responses for debugging and monitoring purposes.

Uploaded by

Pri Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Test Scenario: Create a .

NET Web API Endpoint for Airport Routing

Test Objective:

 To create a .NET Web API endpoint that takes an origin airport as a parameter and returns a
list of destination airports.

 To ensure that the API logs the requests and responses for debugging and monitoring
purposes.

Test Steps:

1. Set up the .NET Web API Project

 Create a new .NET Web API project using Visual Studio or your preferred development
environment.

 Make sure you have all the necessary packages and dependencies installed.

2. Create an AirportController with the Desired Endpoint

 Create an AirportController class with the necessary attributes and methods.

 Implement a GET endpoint, e.g., GetDestinations, that accepts the origin airport code as a
parameter.

3. Implement the Business Logic

 Inside the GetDestinations action, write the logic to retrieve a list of destination airports
based on the origin airport provided. You may use any airports of choice with made up
routes. For example: NYC as origin airport may service the following airports: LON, PAR, LAX;
ROM etc.

 You can use a sample list of airports for testing purposes or connect to a database or
external service to fetch this information.

4. Add Logging

 Configure and implement logging within your API project. You can use a library, or the built-
in logging provided by ASP.NET Core or even a text file will be fine.

 Ensure that requests, responses, and any errors are logged for debugging and monitoring
purposes.

5. Test the API Manually

 Start the API project.

 Use tools like Postman or curl to manually test the API endpoint by sending GET requests
with various origin airports.

 Verify that the API returns the expected results and that logs are generated.

Remember that this is a high-level test scenario, and the actual implementation may vary based on
your project's specific requirements. You can adapt and expand this test scenario to suit your needs
and project specifications.

You might also like