I'm working on a Laravel application with authentication. The application also has an API. Now I want to test all the API endpoints of the application. The Problem is, that the some Endpoints Need data in the database to "work" with.
How is it possible to test such an application? Do I have to test the application in the correct order to archieve something like that?
For example:
- create user
- create new post
- edit new post
- create new user
- comment post of user 1
- login with user 1
- see comments of post
- delete post
Or is it possible to simulate stuff like this so I don't Need a specific order?
I saw that Laravel has build in HTTP testing, but I don‘t know how to handle the data dependencies. Thanks for your help!
Aucun commentaire:
Enregistrer un commentaire