Original post

Hi,

I have experimented with table driven tests by some functions. But http handlers have different things. They usually don’t return something and the way this handlers take input is also not like normal functions, as they take user input data through http request object.

I don’t know how to organize table driven tests that will give input to handler functions and checks numerous outputs like status codes, returned data and some other things (with table driven tests).

I know, many of you guys faced this kind of problems and solved it too. So, please share with us what is approach to solve this problem?

I’m using Echo framework, but examples of any framework or even standard library’s Handler Function will also be appreciated.

Thanks