I am writing test code to test a client-server application. The test application consists of
- an application running on Tomcat or another Java EE application server, and
- client banks that expose the API.
I mainly write test code that uses this client API to connect to the server.
In addition to intensive testing of API operations, my bosses advised me to connect to the database on the server and check that the fields are filled in correctly. I did this for some of my test cases, but he did not find any errors in regression.
Errors are caught when any particular functionality fails, but is still detected in the code that the API itself checks. It seems that checking database data is not very useful, especially given the extra effort required to write and maintain all this code.
My question is:
Is there any real benefit to writing test code to connect to the database and verify records in this way? Do you pay the benefits of writing such code?
source
share