Does automatic golden master unittest generation exist/or is it feasible?

fleshw at gmail.com fleshw at gmail.com
Tue Apr 4 22:40:03 EDT 2017


I have a really large and mature codebase in py2, but with no test or documentation.

To resolve this I just had a simple idea to automatically generate tests and this is how:

1. Have a decorator that logs all arguments and return values

2. Put them in a test case

and have it run in production.

Here's a quick prototype I just wrote, just to illustrate what I'm trying to achieve:

http://codepad.org/bkHRbZ4R

People told me that there's a similar concept called "Golden Master Testing" where it keeps a "golden record" and runs test case on it. So it looks like I'm trying to automate golden master testing.

So my question is this: 

1. Is this a concept already explored?

2. Is there already a framework for doing this? 



More information about the Python-list mailing list