Answer the question
In order to leave comments, you need to log in
How to organize testing?
Hello.
It is necessary to test the user's work with the database by accessing the controllers via RESTapi. You will need to check the creation of related data, editing this data, updating and deleting. As a result, it turns out that you need to create a class that will have setUpBeforeClass() methods - where all data will be loaded, and tearDownAfterClass() - where all data will be cleaned up. Those. when calling the next class for the test, data will be created in the database.
Is this approach correct?
Answer the question
In order to leave comments, you need to log in
I found a good slideshow on this topic - www.slideshare.net/dlondero/rest-in-practiceenglish . Starting from slide 42, work with tests and fixtures is shown.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question