I have been tasked with unit testing a management software (think about SAP, just a lot less complicated) but I have encountered a serious issue.
the software is basically divided in three parts, the interface, the database code and the rest (class definitions and data formatting and managing for the use of the interface).
The problem is that the inteface is not something you can easily unit test with code (I'm using NUnit) as it relies heavily on whether things are properly displayed and such, the database code relies on the data managing and formatting code to keep data consistency (such as checking that when you delete an object you're not leaving orphaned objects in the databases that are referencing something that does no longer exist), besides I haven't been provided with a schema, and the data managing and formatting code relies on the database code to work (I've considered creating some test data but the data in the application is heavily interdependent and the methods in that code often call code in the database package to make queries which ultimately fail because the data was fake).
In other words I just can't test 99% of this code as independent pieces of code, I'm questioning whether to propose integration testing instead or not, I fear I might have missed an angle to tacke this problem.
Aucun commentaire:
Enregistrer un commentaire