If you are starting a new project, you will find DevMate easy to adopt. The only fundamental requirement is that you write properly testable code.
However, almost all companies have major legacy codebases that have to be maintained. We often encounter the following issues with codebases, and you probably have too.
5+ year old codebases are often monolithic and often/usually did not follow modern testing practices.
A lot of tightly coupled code that is not really unit testable.
The original developers are long done and the documentation is scant.
Maintainers are terrified to change any code as it is very likely to break.
Example - Wind Power Programmable Logic Controller
A customer we have helped is a major PLC-vendor for Wind Power Generation company. All of the points listed above applied. The codebase in question was responsible for the process control of the turbines and managing all related inputs and outputs.
Most of the knowledge was stored in the heads of the domain experts and the developers with the thankless maintenance responsibility.
Whenever a change to the PLC was required, there was a lot of wailing and gnashing of teeth from management through to the developers. Changes usually resulted in unexpected problems, often with serious consequences.
There was, of course, no silver bullet. The team realized they needed a medium to long term strategy in order to achieve the following.
Incrementally increase quality
Take a requirements led approach to testing
Through this, achieve a level of documentation at the code level through the visually represented test cases
Accompanied by some traditional documentation in parallel
Catch issues in development, not staging/production (shifting left)
Based on the little existing documentation, extended by the knowledge of the business domain experts and field application engineers, we specified a set of suitable test cases for each function of the system as the basis for ongoing development and maintenance. This organic approach led to much improved documentation over time.
Where code components were already suitably decoupled, unit tests were easy to implement. Where not, and depending on the complexity of the undertaking, code was refactored to in order to make it testable.
Where this was not practical, integration tests were created.
After 9 months, they had achieved most of their goals.
Far fewer failures
Much improved documentation without taking a “monolithic” approach to writing it
Much improved perception of quality by Management and Customers
Much less sweat produced by the Product team
So they startet a black box test case specification and automation project.
How DevMate helps
Once the requirements have been analysed and documented, test cases can be added to Devmate.
Test code is then automatically generated and runs within the normal developer workflow as any other tests would and alongside any existing tests using your preferred test runner.
DevMate creates a single parameterized test that is readable, maintainable and editable.
All supporting code appears underneath and does not need to be changed but is also clear and readable.
You can even write your own custom code for creating factory methods or custom assertions on complex objects.