Testing untestable code

Stephan Hochdörfer (14.May.2011 at 11:30)
Talk at phpDay 2011 (English - UK)

Rating: 4 of 5

Testing software applications with the help of unit testing facilities is an widely-adopted standard in the software development industry today. Even the PHP community provides such tools to automate the testing of PHP applications. Unfortunately there exist legacy applications that are not testable by their internal design. Testing an single component of such an application in isolation is not possible in those cases due to their dependencies on other components. This often leads to the point of manual testing which is cost-intense and error-prone. In the first part of the session it is shown how the dynamic nature of PHP itself can be used to manipulate existing dependencies to be able to test a single component of the application on its own. In the second part of the session an additional layer of abstraction is introduced. By using that layer it is shown how to transform components of the original source code into testable code fragments.

Who are you?

Claim talk

By clicking this button you are declaring that you are the speaker responsible for it and a claim request will be sent to the administrator of the event.

If the claim is approved you will be able to edit the information for this talk.

Are you sure?

 
Comments closed.

Comments

Rating: 4 of 5

14.May.2011 at 12:20 by lea (21 comments)

some interesting ideas on how to mock certain parts to make an app testable

Rating: 4 of 5

14.May.2011 at 12:25 by Christian Schaefer (35 comments)

very good overview of what you can do. also very keen on the dea of generative programming.

Rating: 5 of 5

14.May.2011 at 12:36 by Iacopo Papalini (27 comments)

A lot of 'nasty' ideas on how to do something otherwise impossible.
Terribly useful for those condemned to upgrade bad software

Rating: 5 of 5

15.May.2011 at 15:36 by Anonymous

Great tricks! Every PHP developer should know.

Rating: 5 of 5

15.May.2011 at 16:09 by Marco Albarelli (13 comments)

Wonderful tricks, some were simply things that we needed to see in a different perspective.
Enlightening

Rating: 4 of 5

16.May.2011 at 07:06 by Carlo Beschi (27 comments)

nice and clear presentation, solid concepts, useful tips

© Joind.in 2014