Symfony’s Panther: Unleash the Tests Beast

End-to-end tests are going savagely easy

Alexandre Daubois
5 min readDec 7, 2021
Panther logo from Github

Testing an application isn’t the easiest thing on earth, it is not the quickest thing either and it may not be the most exciting part of an application development. But that’s just a necessary thing. You can’t take the risk of making your application crash and loose users — and maybe money at the same time. You got to be relaxed when pushing new code edits to your production. Tests exist for this reason and check the non-regression of your application. If your tests pass (and you wrote good tests, which is another whole and huge topic), you’ll be way more confident about sending new features and bugfix to your production without the fear of breaking everything.

We can roughly find three main types of tests when creating application:

1. Unit tests, which consists in testing little snippets of codes, like functions or maybe classes. It doesn’t involve anything more than the executed code and you mock external dependencies like the database by creating fake datasets (in the test code for example) just for those tests. They are really fast to execute ;

2. Functional tests, which test in general a feature in its globality, without having to worry on how things are done internally. A common use case of functional tests is API testing…

--

--

Alexandre Daubois
Alexandre Daubois

Written by Alexandre Daubois

Lead Developer at Wanadev // Open-source contributor

No responses yet