V
V
VitaliyBorys2019-09-26 23:15:25
Software testing
VitaliyBorys, 2019-09-26 23:15:25

How to test API on Swager Json?

Good afternoon. I have a project written in Laravel. I was given the task to write an API for the application. I wrote it and made documentation on swagger. The application is written in a strongly typed language - C#.
And often, application developers complain that where a string is specified, an integer comes, or where an integer, a number comes. In general, I need to write tests for this API in a strongly typed language, which I do not know.
There are only 5 endpoints in the API (not many). How can I get by with little blood in this situation?
I have experience only in PHP.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Wells, 2019-09-27
@Alex_Wells

Make resources for everything you need, cast them to the desired type, use only them in the output.
You can only cover them with tests if you are too lazy to cover everything with integration ones.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question