Adding test automation

We were creating a software project for an e-retailer that involved requirements such as sale prices, quantity discounts, and international currency conversions. The software development was outsourced and we didn’t have a good feel for the quality of the code being reproduced. Everyone had access to the requirements document which contained hundreds of rules. 

The code was being developed in Java, and we asked for an API to be developed so we could input many scenarios and see the result of the calculations. 

Python has a great framework for developing independent test programs. The reporting is detailed and assertions are written in simple English language structure. Using the rules provided by the business, a pytest program was written to assert inputs and outputs based on examples from the requirements document. For a regression test, a  docker program was configured to run in Jenkins at the push of a button. When requirements changed, a document with expected inputs and outputs could be changed without touching the original program. 

The process worked well, as many bugs and missing exceptions were uncovered while the calculation software was being developed. We could quickly give feedback to the developers, and they eventually delivered a version that worked perfectly. When the tests and code can be developed like this in tandem, it’s a form of test-driven development. Everyone finds it easier to develop software when there is good feedback. It’s also much better when the software is originally developed and they still have the functionality in their head. No more–oh what was I doing 3 weeks ago?

Leave a Reply

Your email address will not be published. Required fields are marked *