Tests for Login
Explore testing strategies for Laravel login endpoints by using factories to generate test users, applying database refresh techniques, and automating token management in Postman. This lesson helps you ensure secure authentication functionality through effective automated tests.
Factories in motion
Time to use one more Laravel goodie called Factory. Usually, developers need to manually add a record in the database table to quickly test data retrieval. But that does not scale in terms of the number of records and the number of times we need to repeat the process.
Laravel factories allow us to add any number of records with random data according to different types of columns. By executing a single line, we can add thousands of records in one go. You will see their usage throughout this course.