[:fr]La parole est aux speakers : Michael Bodnarchuk[:]

Publié le

[: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 Suck

Every 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!

How do you think the BDD approach improves the tests of our applications ?

BDD is a buzzword. Today we can either call BDD as tests focused on specification or the feature files written in a native language. I’d say the quality of tests is highly improved by readability. If you can’t understand what does this test do – maybe it’s time to remove it. BDD approach helps to focus tests around specifications and not to create useless test cases.

How is the Ukrainian PHP community ?

Well, we have really cool but to be honest a bit isolated community. There are lots of PHP developers in Kyiv, members of Yii and Phalcon core teams. In Ukraine we do mostly outsourcing but we do it well so our developers are highly experienced. Our community is really friendly and we are eager to share the knowledge and start learning from the global PHP community. We have PHP Framework Days conference https://frameworksdays.com/en/event/php-fwdays-2018 and I’d like to invite you to visit Kyiv in June to meet PHP community and make new friends. Kyiv is also very beautiful in June. We have a good beer, btw! 🙂

Une conférence présentée par

Michael BODNARCHUK
Michael BODNARCHUK
Michael is a passionate PHP/Ruby/JS web developer from Kyiv, Ukraine. The author of Codeception testing framework. Michael maintains various popular opensource projects and aims to popularize testing. "Testing should be fun" - is his motto. Speaker of PHP Framework Days UA (2013-2015), PHPKonf Istanbul (2015), Dutch PHP Conference 2016, Bulgaria PHP (2016), Scotland PHP (2016), PHP Benelux (2017) and various meetups.

Autres interviews

[:]