-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate test cases #111
Comments
@johnfercher Thank you for your kind words. Unfortunately, these days I mostly write Python, so you likely are getting more use out of this project than I am. Nevertheless, I'm happy to answer your questions:
I believe that generating test cases is more difficult than generating the test boilerplate. The latter can be done deterministically by parsing a method-under-test's signature and building its AST, then writing the boilerplate from it. Conversely, the former requires understanding the code being tested, and I'm not sure how you would do that in a way that isn't terribly complex. If you have any suggestions, I'm open to hearing them. :)
The table-driven style is the one that the Go-team recommends. Of course, if you think it would be better to have a non-table-driven style, I'll accept a PR for that. |
Do you got any idea of how to generate the test case ? I'm very curious about that. |
The long-term vision for this project is for it to generate test code, including test cases, for you automatically based on the signature and high level description. With OpenAI's recent release of GPT-3 on May 2020 which can generate high quality code that actually compiles, generating Golang test cases may actually be feasible! Here are some repos that use GPT-3 to generate code. If anyone has ML expertise, and is looking for a cool project, I think this has a ton of potential. I just wish I had the cycles to work on it myself... |
First of all, very nice your project. I would like to contribute too, and I have some questions.
Do you have plans to generate the test cases too? Would be difficult to do it?
Do you have plans to generate separated test functions instead of the table style?
The text was updated successfully, but these errors were encountered: