I want to know how rigid do we have to stick to the notion of end to end testing, please consider the following explanation:
Basically, when we talk about end to end test we send a request and expect a response, in an end to end test we verify this request and response with a reference payload that we have.
But, consider this scenerio: An api affects two tables, I'd like to verify that if a request fails, the number of rows that are in the second table remain constant. The request fails, and nothing but the status code and error message are returned. Currently there are no apis that return the row count of the second table. Would it be okay to use the service layer to verify the second condition for the second table in the end to end test? Would this violate the notion of an end to end test?