PhilKz's avatar

Pre-made Test Libraries

Are there any libraries/packages/checklists of pre-written tests that can be imported as starters for projects? When I write my own tests, I always have a nagging thought in the back of my mind that there are some "unknown unknowns" that I'm missing.

Ideally, I would like something that works like php artisan, with a menu of common test classes and stubs of methods that should be in there (e.g. something like make:LoginTest, make:PaymentTest, make:SubscriptionTest).

Any suggestions much appreciated!

0 likes
4 replies
bugsysha's avatar

I haven't heard about anything similar to that. Would it be useful? I have a feeling that it wouldn't be useful if I understand your question.

martinbean's avatar

@philkz No.

Write tests for your particular use case. No one can possibly come up with a boilerplate that’s magically going to cover your app’s functionality.

channaveer's avatar

Why don't you give it a try to https://laravelshift.com/laravel-test-generator it's not that bad. It's a paid one though.

The best thing about this is it will create a separate branch in GitHub and sends you pull requests.

Worth spending $19 bucks to understand how your existing application tests can be written.

PhilKz's avatar

Turns out Laravel Breeze actually contains a bunch of what I was talking about.

Please or to participate in this conversation.