Developer Docs

API tests with C#Bot

The API tests in a C#Bot application are a type of integration test which ensure the APIs that are available through the server of the application are working as expected. This involves building requests which are similar to the requests sent by the application’s client-side, sending those requests to the application’s server-side, interpreting the response from the server, and making assertions based on the response that is received. The assertions are primarily checking that the status code returned is equal to the expected response.

As the API tests require sending a request to the application’s server and interpreting the response, you need to have the server running in order to run the API tests.

The requests created during the API tests are created using RestSharp, a C# Library which allows for building and sending API requests, and interpreting the responses.

Was this article helpful?

Thanks for your feedback!

If you would like to tell us more, please click on the link below to send us a message with more details.







On this page

New to Codebots?

We know our software can be complicated, so we are always happy to have a chat if you have any questions.