Forum PHP 2019
[:fr]La parole est aux speakers : Paula Čučuk[:]
[:fr]Jusqu’au Forum PHP 2019, retrouvez nos interviews de speakers pour mieux comprendre leur parcours et le sujet qu’ils ou elles aborderont lors de leur conférence !
La conférence
When you get lost in API testingIf you are not writing tests yet, you should start. Tests will improve the quality of your code, reduce bugs and probably force you to think more about design and quality. Actually, the hardest thing is to start and figure out which type of tests to write. So you start researching and you find a lot of different materials and get even more confused.Even when you decide what type of tests to use, it can be hard to decide how to test some specific logic in your app. Don’t give up! We have some tips we learned along the way that will hopefully make your life easier. In this talk you will hear about different test types and when to use them. We’ll also show some tools for checking quality of your test. See you in Paris! 🙂 |
Grace Hopper 24/10/2019 14:30-15:10 |
Which tools did you try for API testing? What are the important points to consider?
Back when I started writing tests, I actually tried different frameworks like Behat, PhpUnit and PhpSpec. Even though PhpUnit suited me the most, I still believe that the framework choice is not that important, as long your tests are easy to maintain and they make sure that your code works as expected.
When it comes to tools, there are a few tools that check the test quality and suggest possible improvements, and I actually use Code Coverage and Infection (mutation testing) on a daily basis.
All in all, I don’t believe that it’s crucial to pick a certain tool or a framework, you just have to be persistent because writing tests can be confusing at the first glance. Once you master it, development and code maintenance will become easier, but also much faster.