My scaffolding tool generates a web server and some unit and integration tests. The tests use Peter Gotz' mocking framework pegomock. If you generate a server with the scaffolder, you can look at the source code and see how it works.
https://github.com/goblimey/scaffolder By the way, not everybody in the Go community believes in the use of mocking frameworks. Donovan and Kernighan's The Go Programming Language advocates a different approach. This is used to test the entire Go infrastructure, so it's clearly effective. However, I come from the London Java community and we use mocking frameworks a lot over here. I used pegomock because I couldn't get gomock to work. I managed to get pegomock working and I found that Peter was much more responsive when I reported a couple of issues with it. For system testing, you can use the Firefox Selenium addon, which works at the HTTP level and doesn't care what language you used to create the server. It records a web session and produces tests in various formats, which you can then edit. For example, if you record a test that creates an object in a database and it produced one with ID 42, and then you record a test that displays object 42, you can edit the test to replace the ID with a wildcard. Before I wrote my scaffolder, I experimented by hand-crafting a very simple web server: https://github.com/goblimey/films. I recorded some Selenium tests for this. They are in tests/system/selenium. Obviously, there is a general point here. There are lots of tools out there that run penetration, performance and other types of testing on http servers and none of them care what technology you used to create the server. -- 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.