What test cases should I consider when testing this flow?
I have an endpoint that when it gets called, a pdf is generated based on parameters that are coming in from the frontend and then that pdf is returned back to the client side for rendering. In the middle of this, the file itself also gets stored in blob storage before going back to the frontend.
I was wondering, what test cases should I consider writing and what conditions I should be looking for or testing in this scenario?
I'm just looking for a list of things to test for (not the code or anything), just to make sure I hit the right things.
Some things I have thought of are:
-Test that the data coming in from frontend is not null (or at least the required ones).
-Check that File render is not null
-Mock blob storage and test saving file to blob exists there?
What else should I be testing or looking into?
There are many negative scenarios you could test like :
Send a non PDF to client and observe client behaves
Send some corrupted pdf.
Send some exe file and verify that the app does not insecurely deserialise it
Send non supported parameters and see if PDF is getting generated or proper error message is thrown .
Try converting blob to PDF and see you are getting the expected file .
Try storing some executable file or unsupported file as blob and check behavior when system tries to convert it back to pdf
Try updating or downgrading the app and see the blob is still reusable .