Categories
News Programming

Automated unit tests from Asis

This tool allows you to periodically grab stack traces and record calls to a library that are then saved as unit tests. It’s a shortcut to getting coverage for a library that’s already in production and stable.

zavg/Asis · GitHub

Asis – Tool to deal efficiently with legacy code through creating and running characterization tests automatically.

The main idea is the following: while user or tester is using your product (for example, Web site) the Asis tool records the function calls which are performed, the sets of arguments which are passed to the function and the received output. Output can be any, starting from strings, integers, HTML, JSON and finishing with serialized objects with complex internal structure. We don’t care what we receive – we just record it and approve as correct result, because we know that we are working with the stable release version.