Generating unit tests in Go

  • This is a really poor demo.

    I opened up the demo page and generated the tests. On first glance, I see a bunch of tests that just verify that the given code does exactly what it was written to do. That misses the _entire_ point of tests. Oh, and only a single test case for each function.

    Looking a bit more closely, the test cases wouldn't even pass. They're just filled with placeholder values. Okay, fine, the boilerplate is generated, but you have to fill in the expected returns.

    What about mocks? Why can I only have one test case per function? Also, None of these test cases are documented. You're really still writing the bulk of the tests yourself anyway.

    I'm not saying there is no value here, but if there is value, that demo shows none of it.

  • This would be great if it were implemented as a "go generate" compatible script or executable. [1]

    [1] https://blog.golang.org/generate

  • I assumed this was a joke about how bad some unit tests are. Then i thought it might be a satire on unit tests, from someone who really thinks they're pointless.

    Then i realised that this is a demo of a company that someone actually wants to make their fortune with:

    http://magictests.com/

    https://angel.co/magictests

  • 500 Internal Server Errors out the wazoo; e.g. http://magictests.com/static/js/bootstrap.min.js

  • For some reason pasting code into it in chrome on Mac, it gets completely mussed up.