PHPTour 2018
[:fr]La parole est aux speakers : Michael Bodnarchuk[:]
[:fr]Jusqu’au PHP Tour 2018, retrouvez nos interviews de speakers pour mieux comprendre leur parcours et le sujet qu’ils aborderont lors de leur conférence !
La conférence
Designing Test Architecture That Does Not SuckEvery PHP application needs its policy about tests. What is important to test, what is not, at which levels should a feature be tested. As we think of application architecture before writing a single line of code, we should think of a test architecture before implementing tests. From this talk you will learn: * how to transform business expectations to tests using ATDD and BDD approaches * how (and why) to incorporate all testing levels (acceptance, functional, integration, unit) * how to prioritize tests * how to write stable tests that won't be the stick in the wheel * how to deal with test data * how to decide, should it be unit or integration test * how to choose the type of a test |
Salle Morpheus 17/05/2018 10:15-10:55 |
You’ve started the Codeception and CodeceptJS projects. Could you introduce us those projects ?
No one loves writing tests. Really. Testing takes our time and our efforts, instead of writing business valuable code we do the voodoo magic with mocks, stubs, and heavy refactoring. This is really hard to explain to business: I spent last few days trying to set up the test suite. To business it may sound like a developer was watching YouTube and playing video games. And that happened to me: when I tried to explain to my CTO what are tests and how do they worked I stepped away. Ok, give me two weeks and I will make tests easy to read, understand, and they will provide a safety belt for our releases. That’s how Codeception started.
Codeception is a testing framework for PHP focused on making tests readable and simple. It keeps focused you on specification, so tests are easy to read and write. If you didn’t use it yet, you should probably try as it will save you much time. We already support testing in all major PHP frameworks and a browser. Unit tests are supported as well!
CodeceptJS is a JavaScript version of Codeception focused around browser tests only. It allows you to write the same tests using in Selenium, Protractor, or Puppeteer the new tool from Google Chrome which allows you to run tests headlessly in Chrome using DevTools protocol.
Codeception and CodeceptJS follow the same philosophy: don’t reinvent a wheel in your tests. If this is a common problem we might have already solved it!