Introduction to test development in PHP

My workplace consists of many cowboy coders. Many of them are younger. Which randomly affects many code quality issues.

I am looking for suggestions on how best to weaken my team in using TDD (we can start with unit tests and move on to regression tests, and then more automated testing).

Ultimately, I want us to quickly learn about our mistakes and develop better code and create better developers.

I hope there are some practical suggestions on how to introduce TDD into a team. In particular, which tools are best chosen on the LAMP (php) stack.

Sorry if this question is too open.

+5
source share
5 answers

After going through this process four times now, I found that any introduction of TDD would not be completed without any control. Programmers do not want to switch the style and will not write their first unit test and suddenly they see the light.

You can apply at the management level, but it takes a lot of time for all participants. Some level of this is necessary in any case, but ultimately you will need automatic enforcement. The answer to this question is the introduction of continuous integration.

I have found that the CI server is the main cornerstone for any TDD environment. If the developers do not know that something bad will happen if they do not write tests, you will always have cowboys who feel this under them.

+3
source

.

  • TestFramework . SimpleTest
  • , , script.
  • script, -, / . ( )

.
. " " " "

, , , , . . /testcript echo var_dump(). .

UnitTest. ?

+2

, , - Joel Spolski: http://joelonsoftware.com/ .

0
0

TDD - PHP. unit test .

0

All Articles