29.10.2012 Views

UNIFACE TEST DRIVEN DEVELOPMENT - Compuware Corporation

UNIFACE TEST DRIVEN DEVELOPMENT - Compuware Corporation

UNIFACE TEST DRIVEN DEVELOPMENT - Compuware Corporation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

WHAT IS <strong>TEST</strong> <strong>DRIVEN</strong> <strong>DEVELOPMENT</strong> (TDD)<br />

AND HOW CAN IT HELP? (Continued)<br />

The TDD approach has a number of benefits:<br />

• It results in better design, as the process of creating tests helps<br />

the developer to decide how best to implement the code<br />

• The tests document the code behavior, as they are an up-to-date<br />

record of expected results when calling the code with given test<br />

data<br />

• Breaking changes are identified early, and are more likely to be<br />

fixed prior to acceptance testing<br />

• The developer thinks about failure scenarios in advance, and, by<br />

documenting them in the form of tests, ensures that they are not<br />

forgotten<br />

• The underlying cause of runtime problems can be identified more<br />

easily.<br />

The screenshot below shows the interactive test runner with some<br />

errors that the developer is working on. When the code is fixed, the<br />

developer will re-run tests and should see green ticks indicating that<br />

the code is working correctly.<br />

Figure 1: Interactive test runner.<br />

<strong>Compuware</strong> <strong>Corporation</strong>, the technology performance company, provides software, experts and best practices to ensure<br />

technology works well and delivers value. <strong>Compuware</strong> solutions make the world’s most important technologies perform<br />

at their best for leading organizations worldwide, including 46 of the top 50 Fortune 500 companies and 12 of the top 20<br />

most visited U.S. web sites. Learn more at: compuware.com.<br />

<strong>Compuware</strong> <strong>Corporation</strong> World Headquarters • One Campus Martius • Detroit, MI 48226-5099<br />

REFACTORING AND TDD<br />

© 2011 <strong>Compuware</strong> <strong>Corporation</strong><br />

<strong>Compuware</strong> products and services listed within are trademarks or registered trademarks of <strong>Compuware</strong> <strong>Corporation</strong>.<br />

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their<br />

respective owners.<br />

12.10<br />

During both development and maintenance, it makes sense to re-use<br />

existing code wherever possible. ‘Refactoring’ is the term used for the<br />

process of re-organizing code so that it performs well when re-used.<br />

The process also creates an elegant interface to facilitate re-use.<br />

COMPUWARE CAN HELP YOU IMPLEMENT TDD<br />

If you’re thinking of adopting TDD, it makes sense to talk to <strong>Compuware</strong><br />

Uniface. We can provide a service that includes the following:<br />

• Test runner software, as shown above<br />

• A framework for writing and running tests with assertions<br />

• Experienced consultants who can share knowledge of best<br />

practices<br />

• Test framework documentation<br />

• Low-cost implementation (typically only a 2-day engagement is<br />

required).<br />

In addition, you get to keep the source code for the test framework and<br />

test runner, so you can customize the solution if required.<br />

COMPLEMENTARY OFFERINGS<br />

When our TDD approach is combined with Continuous Integration<br />

(see separate fact sheet), all your tests can be re-run automatically<br />

whenever someone makes a change. That gives you extra confidence<br />

that changes aren’t breaking other parts of the system, and makes it<br />

easy to build releases on demand.<br />

If you’d like to know more about TDD, or about our products and<br />

services in this area, <strong>Compuware</strong> Uniface Services can help.<br />

E-mail: askuniface@compuware.com<br />

Tel: +44 (0)1628 611000<br />

To learn more, visit: www.uniface.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!