vendredi 4 mai 2018

Testing JDBC methods, including transactional aspect and connection closeds

I would like to define tests for JDBC methods for educational purposes. In particular, in addition to test whether the JDBC methods have the functionality required (I have seen that there are solutions such as DBUnit, etc), I would also like to check whether the methods verify specific requirements: - if they consider transactional issues when modifying (setAutocommit(false)/commit/rollback) - if they close the connection, - etc.

I have not found any testing solution that checks whether spectific methods are invoked (methods such as the previous ones). The only thing that comes to my mind is trying to use a testing solution (such as DBUnit) together with AOP (for example AspectJ) for advising whether such methods are invoked.

Any other idea? Thank you!

Aucun commentaire:

Enregistrer un commentaire