planety / prologue

Powerful and flexible web framework written in Nim
https://planety.github.io/prologue
Apache License 2.0
1.23k stars 47 forks source link

Add docs that provide a general approach to testing prologue #205

Open PhilippMDoerner opened 1 year ago

PhilippMDoerner commented 1 year ago

Given that I'm currently working my way through how to do this with snorlogue and started stealing a lot of ideas from how you did it in the end in prologue, I thought we might as well have docs for it. I'll write them up when I can find the time, for now I want to get Snorlogue finally releasable and out the door.

The general idea would be to do it exactly as we did: Define the server in a separate file, compile it with a command, run it via the osproc module in its own process and poll it till you can interact with it. Combine that with a tiny example to call an endpoint on it and you're left with at the very least a way to do integration tests.