What is UnitTestBot?
UnitTestBot generates test cases by code, trying to cover maximum statements and execution paths. We treat source code as source of truth assuming that behavior is correct and corresponds to initial user demand. Generated tests are placed in so-called regression suite. Thus, we fixate current behavior by generated test cases. Using UnitTestBot developers obtain full control of their code. No future change can break the code without being noticed once it's covered with tests generated by UTBot. This way, modifications made by developers to an existing code are much safer. Hence, with the help of generated unit tests, UTBot provides dramatic code quality improvement.
UnitTestBot attempts to generate test cases, such that they both maximize code coverage and minimize number of tests at the same time. So, if a developer drops any test case from generated suite, the percentage of code coverage will decrease. UnitTestBot doesn't endeavour to cover every execution path of program (so-called path coverage), as the number of such paths is often infinite due to loops and recursion. Instead, UTBot aims to maximize statement and branch coverage, commonly used in coverage quality assessment tools. Besides, UnitTestBot provides a convenient way to monitor code coverage via gutter coloring of the code editor you are using.
UnitTestBot is not only able to fixate an existing code, but it also helps to find real bugs in your project. Some code fragments might be invalid, while developers don't know about it. The notorious examples are buffer overflows, assertion failures, segmentation faults, etc. In such scenarios, UTBot can find an execution path that leads to critical problem, and then create special test case that is added to so-called error suite. While all tests from regression suite are green right after their generation, tests from error suite are red as they fail. Such tests generated by UnitTestBot are a convenient way to discover critical problems as soon as possible.