Before Test Driven Development (TDD) the only thing that applied a pressure for high-quality in software development was the knowledge, experience and commitment of an individual software developer.
After TDD there was something else.
High quality in software is widely agreed to include the following properties.
High quality software:
- Is modular.
- Is loosely-coupled.
- Has high cohesion.
- Has a good separation of concerns.
- Exhibits information hiding.
Test Driven Development is only partially about testing, of much greater importance is its impact on design.
Test Driven Development is development (design) driven by tests. In Test Driven Development we write the test before writing code to make the test pass. This is distinct from Unit Testing. TDD is much more than “Good unit testing”.
Writing the test first is important, it means that we always end up with “testable” code.
What makes code testable?
- It is modular.
- Loosely-coupled.
- Has high cohesion.
- Has a good separation of concerns.
- Exhibits information hiding.
Precisely the same properties as those of high quality code. So with the introduction of TDD we now have something else, beyond the knowledge, experience and commitment of a programmer to push us in the direction of high-quality. Cool!
Like to know more?…
http://www.davefarley.net/?p=180
http://c2.com/cgi/wiki?TestDrivenDevelopment
http://www.agiledata.org/essays/tdd.html
http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd
http://unitmm.sourceforge.net/fibonacci_example.shtml
The steps of test first development are The first step is to quickly add a test, basically just enough code to fail. Next you run your tests, often the complete test suite although for sake of speed you may decide to run only a subset, to ensure that the new test does in fact fail. You then update your functional code to make it pass the new tests. The fourth step is to run your tests again. If they fail you need to update your functional code and retest. Once the tests pass the next step is to start over (you may first need to refactor any duplication out of your design as needed, turning TFD into TDD).
1. The Steps of test-first development (TFD)
2. How acceptance TDD and developer TDD work together.
3. Testing via the xUnit Framework.
Also I have a web page which describes about the selenium testing. If your audience is also interested in Selenium Testing, they can take a look here:
Best selenium Training
Pingback: The Impact of Continuous Delivery | Dave Farley’s Weblog
Pingback: Infobip Developers Hub
Lots of words, but convincing people is never easy 😔
My best advice is to be tolerant of disagreement, and respectful of the people you disagree with. You never change anyone’s mind by treating them like an idiot. The best way to change minds is to show people the difference, ideally by solving a problem that they have in a way that demonstrates how your approach works better.