The Artima Developer Community
Sponsored Link

Python Buzz Forum
On test-driven development and white-box methods again

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jarno Virtanen

Posts: 109
Nickname: jajvirta
Registered: May, 2003

Jarno Virtanen is a university student for life, it seems, and a part time software developer
On test-driven development and white-box methods again Posted: Jan 14, 2004 12:52 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Jarno Virtanen.
Original Post: On test-driven development and white-box methods again
Feed Title: Python owns us
Feed URL: http://sedoparking.com/search/registrar.php?domain=®istrar=sedopark
Feed Description: A weblog about Python from the view point of Jarno Virtanen.
Latest Python Buzz Posts
Latest Python Buzz Posts by Jarno Virtanen
Latest Posts From Python owns us

Advertisement

Patrick Logan makes a valid point in response to my earlier remark about the lack of white-box testing methods in test-driven development. Indeed, using TDD does not exclude the use of other quality assurance techniques before the delivery to the customer. But what I was concerned about, more specifically, is the mantra about unit tests and refactoring.

In the core of TDD, if I understand it correctly, is a cycle of 1) writing the unit test 2) writing a minimal implementation that passes the test and 3) refactoring the code, if necessary. Thus the mantra goes like this: you can safely refactor the code, since the unit tests (or "regression tests") make sure that you can see if the existing code breaks. In TDD, refactoring is constantly necessary, because writing a minimal implementation might just imply, for example, writing a method that returns a constant string that the test case is expecting. Most often this is not the functionality that the method should ultimately provide.

Now, the essentially black-box testing method, writing the tests before the code, does not guarantee that the existing code does not break when you refactor, because with unit testing in general you cannot find but a fraction of all bugs. So I do not claim that you cannot produce high-quality software with test-driven development, but I do claim that the mantra about the cycle, "you can safely refactor since the unit tests guarantee that you do not introduce bugs", is not accurate. I do not know what that implies. Presumably, TDD advocates say it does not mean anything.

In this issue, I am perfectly willing to accept that I just misunderstood something fundamental here.

Read: On test-driven development and white-box methods again

Topic: The light side beckons Previous Topic   Next Topic Topic: Art

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use