Hi Agis, Thanks for sharing the package! A couple of more general thoughts re testing: * We (at Parquery) define our server/clients in Swagger spec and then use swagger-to to generate the code (https://github.com/Parquery/swagger-to). Having client and server code automatically generated made testing much, much easier for us compared to manually making the requests. Let me know if you'd like to have swagger-to-Go client.
* It seems to me that your scenario includes a single executable. However, I'd expect that with many microservice architectures you'd need to start multiple executables. Your tests should fatal as soon as one of the executables stops running. This might be worth an example. * We found component testing to be much easier in Python. (That's just a matter of taste, of course.) Cheers, Marko Le jeu. 20 sept. 2018 à 14:27, Agis <agis.an...@gmail.com> a écrit : > Hello. > > Recently I've wrote a small (hacky) package so that I could easily spin up > a Go server I was writing right from within its tests. > > I often find the need to write some end-to-end tests for a main package > (usually some kind of server) and to do that I want to > spin the actual binary, so that I test the full flow as much as possible. > Doing this involved much boilerplate code, so I thought > other people could benefit from this too. > > To get an idea what this feels like, refer to this example: > https://github.com/agis/spawn/tree/master/examples > > I'd love to hear thoughts and feedback. > > Cheers. > > P.S. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.