Magic Test for Laravel

Hey folks!
Mateus Guimarães here.

Some of you might remember me from my screencasts, but today I'm here for something else 🙂

I just released the "Beta" version of Magic Test for Laravel. Magic Test is a library that allows you to write browser tests in an interactive way — basically, you click and type stuff on your screen and then a test is generated for you. The best way to understand how it works is [by watching it in action.](https://twitter.com/mateusjatenee/status/1368905554790334464)

The project is now public and you can access it here: [https://github.com/magic-test/magic-test-laravel](https://github.com/magic-test/magic-test-laravel)

I'm working on this with Andrew Culver who developed the Rails version first. I have high hopes for this package since I think it can not only reduce the TDD entry barrier drastically, but it also can improve productivity immensely.

This is just an MVP version. There are lots of code improvements to be made and features to be added. I'm 100% open to suggestions, PRs and issues. In fact, I'm eager to get them!

I haven't been this excited for something programming-related for a long time, and I really hope some of you guys can get as excited as I am!

i'd love to know what you guys think and which improvements can be made!

10 thoughts on “Magic Test for Laravel”

  1. Just wanted to stop by and say thank you for your efforts Mateus. Reducing the TDD barrier is one of the best things one can do for the community. Will check it out on my project!

    Reply
  2. Nice work!

    Couple of things, but wasn’t sure they belonged as ‘issues’ yet, in that you may already be aware of them.

    1. Doesn’t work with PHP 8
    2. Doesn’t seem to work with IDs from vue components? Laravel 8 login vue component has ‘id=email’ but when clicking it, the name in the generated ‘click’ method is empty.

    Thanks for your efforts!

    Reply
  3. This almost makes me want to ditch cypress haha. Really nice package! Adding support for dusk=“login” click=“@logon” would be useful. Would be pretty insane if you could some how have a devtools that lets you see and click the steps like cypress. Even just console logging different steps to start maybe? Idk.

    Reply
  4. hey! this looks amazing.

    as a person almost now nothing about testing, can i ask a (dumb) question? i have an application, backend (laravel 7) and frontend (vue 2) sepearted and i wanted to write tests for a long time. is this library going to work for my app?

    thanks!

    Reply
  5. Amazing package! Only issue I had, was that the ->magic() method didn’t work, but as soon as I took a look at your fixtures, I found the magic_test($browser) it worked like a charm. 10/10 would recommend!

    Reply
  6. This is awesome! And definitely something I’ll use, but I do think the no support for Vue part is a problem and hope to see support for it.

    Reply

Leave a Comment