03.06.2015 Views

Using Automated Tests to Document Software Architectures - ASPE

Using Automated Tests to Document Software Architectures - ASPE

Using Automated Tests to Document Software Architectures - ASPE

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.

long time = timeToUpdateAndNotifyEvent(userState,<br />

listeners);<br />

assertTrue(time < MAX_TIME * MAX_USERS);<br />

}<br />

...<br />

}<br />

Conclusions<br />

With help from a few agile models and some prose, au<strong>to</strong>mated<br />

tests were capable of documenting some fairly detailed software<br />

architecture requirements like location transparency and<br />

scalability. Although it remains <strong>to</strong> be seen whether or not tests<br />

are sufficient for other software qualities, the approach seems<br />

viable so far.<br />

<strong>Using</strong> tests <strong>to</strong> document architectural requirements helped<br />

reduce the tendency <strong>to</strong> over-engineer a solution. The best<br />

solution is the simplest solution that passes the test. Any<br />

complexity beyond that is unnecessary. The tests provide an<br />

objective measure for minimum simplicity required. <strong>Tests</strong> also<br />

make it obvious where the solution's risks are. Any tests failing<br />

indicate qualities that are at risk.<br />

<strong>Tests</strong> make it much easier <strong>to</strong> estimate the cost of deferring a<br />

design decision. When architecture is documented using tests,<br />

the cost of changing a design later will be roughly proportional <strong>to</strong><br />

the cost of the refac<strong>to</strong>ring required <strong>to</strong> make the change. Without<br />

tests, the true cost of a design change is hidden by how easy it<br />

is <strong>to</strong> update models and descriptions.<br />

The certainty that comes with documenting architecture using<br />

tests comes with a price. Generally, it takes longer <strong>to</strong> write a<br />

test (and code that could pass the test) for a software quality<br />

than it does <strong>to</strong> create UML depictions and explana<strong>to</strong>ry text.<br />

However, it is not clear if time saved with less formal<br />

documentation would result in an increase in re-work due <strong>to</strong><br />

missed requirements later.<br />

Also, it is not clear <strong>to</strong> what limit this technique can be extended.<br />

The example presented in this article is more detailed than the<br />

example given in Extreme Programming Explained, but certainly

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

Saved successfully!

Ooh no, something went wrong!