📜 ⬆️ ⬇️

Some engineering practices to improve the quality of a web application in PHP

This topic is my answer to the complaint of one person that “bugs got”.

For starters, no position methodology will save. You need to start with engineering practices - by introducing them and feeling confident in your code, you can implement any methodology.

The first tasks may be:


In my opinion, the introduction of Continuous Integration suggests itself. I do not know how you are now collecting projects, but this is not done by the IDE, but with the help of bodies like Ant. The same Ant runs automatic tests. Yes, it’s not very easy to start writing tests, but you don’t need to cover everything at once - the introduction of CI will not make additional bugs in your projects.
')
1. The best article about CI is Martin Fowler: www.martinfowler.com/articles/continuousIntegration.html#EveryCommitShouldBuildTheMainlineOnAnIntegrationMachine

2. Next - the presentation of “A Quick Start to Continuous Integration” - true with the example of phpUnderControl: sebastian-bergmann.de/archives/818-A-Quick-Start-to-Continuous-Integration.html

3. Presentation of the tests PHPUnit and Selenium "Quality Assurance in PHP Projects":
sebastian-bergmann.de/archives/817-Quality-Assurance-in-PHP-Projects.html

Here are specific tools - like these are normal, but see for yourself:
1. xinc code.google.com/p/xinc - CI for PHP
2. Phing - Ant type for PHP
3. PHPUnit - www.phpunit.de
4. Selenium - en.wikipedia.org/wiki/Selenium_ (software) - interface testing, integrates with PHPUnit
5. SVN

You said that you have no idea how to write tests - even on the PHPUnit website itself there are a lot of excellent articles: www.phpunit.de/wiki/ArticlesAndPresentations .
In general, a good review of Testing & QA on the website of the company McConnell:
construx.com/Page.aspx?nid=208

In general, I wrote this document not because I do not believe that you can find the tools in the internet I just want to support you, to show that there is nothing catastrophic in your situation and it is not difficult to begin to introduce competent engineering.

Just take it on board and try to start on some test code, do the CI process, and then implement it in the projects (best of all in one). But in general, the practice of all these builds, etc. very useful, if only because it is then easier to apply any methodology - because the tools are already working.

I'm talking about CI, because I consider this practice to be the very first for implementation. Any code metrics there, code quality checking, etc. only then will they be useful (if they are needed at all). Well, it is necessary to learn to write tests (no one is forcing to push into the project right away) - there is enough material in the internet, incl. for PHP.

Good luck! If there are any ideas you can discuss.

Source: https://habr.com/ru/post/41746/


All Articles