fbpx
Have something to share about engineering practices, architecture or DevOps?
Become a speaker now

Reversed Tests Pyramid – dealing with legacy code

Reversed Tests Pyramid – dealing with legacy code

Описание: Almost every experienced test engineer and programmer heard about tests pyramid which tells us that our automated tests should be about 80-90% – unit tests, 5-15% – some functional, integration or acceptance tests and 1-5% – end to end, GUI tests. It sounds great and of course is possible. That structure of tests has some implications like modularand separated architecture, good abstractions model, data model separation from functionality and logic, etc. Everything works and is quite easy to implement when we starting new, “greenfield” project, or dealing with code written in a good, simple way with “is it testable?” question always behind every line of code.

Some Clean Code and TDD practitioners says that you shouldn’t write end-to-end or even functional tests at all and database or user interface are (un)necessary evil. Can you imagine application like this? I can! Writing applications that way would be great, and likelihood ofbugs is pretty low. Maintainability would be wonderful – new changes in modular, almost independent architecture are extremely easy to implement. We can enumerate the advantages of such approach without endlessly… But…

Unfortunately, the reality is completely different. Most of us – developers, are dealing with already written code (written few years or even decades ago), which is not understandable by no-one, and no-one knows which particular lines or functions are really doing. Code which is unpredictable – every change could introduce bugs in other parts of the system which we would never expect that is somehow connected with the changed one. This code is sometimes measured in KLOC’s – Kilo Lines Of Code and this numbers maybe really high. Code like this was implemented sometimes by few hundreds or even thousands programmers, or even by few generations of programmers. Sometimes people who could know something about it are far away in another job, or they even died.

But don’t worry – there are some practices which would help you (us) with “Legacy Code” (because this is the proper name for code described above). One of this practice which I would like to share with you is reversed tests pyramid.

Тип выступления: Доклад (50 минут)
Wiktor Żołnowski

Wiktor Żołnowski

Cracow, Poland

Wiktor is an Agile Coach, Consultant and Trainer focused on process improvements and basic technical practices like TDD, BDD, Emergent Architecture and Pair Programming. He is passionate in pragmatic approach to everything what he is doing and he hates wastes. He has few years of experience in IT business – from Software Tester, through Programmer, QA Engineer to Scrum Master, Manager and QA Lead. Working on various projects in different methodologies like Waterfall, RUP and finally Scrum and Kanban with some XP practices. Some time ago he has learned that every change in organisation starts from the people and their knowledge. Now he is working at Code Sprinters – consulting and training company with development background where he is leading couple agile transitions in various organisations.

Видеозапись выступления

Слайды презентации