blob: 8ff1f9005de5a748d540d35e8f771dd56502f0d3 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<org.eclipse.epf.uma:ContentDescription xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:org.eclipse.epf.uma="http://www.eclipse.org/epf/uma/1.0.5/uma.ecore"
xmlns:epf="http://www.eclipse.org/epf" epf:version="1.5.0" xmi:id="_8ngBgMPdEdmbOvqy4O0adg"
name="maintaining_automated_test_suite,_0kF5kMlgEdmt3adZL5Dmdw" guid="_8ngBgMPdEdmbOvqy4O0adg"
changeDate="2006-09-26T11:31:15.615-0700">
<mainDescription>&lt;h3>&#xD;
Introduction&#xD;
&lt;/h3>&#xD;
&lt;p>&#xD;
At some point in your test effort, you may find it necessary to manage your test effort by creating test suites for&#xD;
your test assets.&amp;nbsp;Maintaining test suites can take many different forms. To facilitate your testing, you may want&#xD;
to introduce some&amp;nbsp;level of&amp;nbsp;automation of your test suites.&amp;nbsp;The fact that you've automated your test&#xD;
suites does not necessarily make your testing easier however. It may actually increase the maintenance burden of your&#xD;
suites.&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
This guideline introduces you to useful heuristics on how to facilitate the maintenance of your automated test suites.&#xD;
&lt;/p>&#xD;
&lt;h4>&#xD;
Plan your test&amp;nbsp;suites&#xD;
&lt;/h4>&#xD;
&lt;p>&#xD;
Automating your testing without planning increases&amp;nbsp;the chances that testing will be ineffective&#xD;
and&amp;nbsp;inefficient.&amp;nbsp;Some level of planning should take place whether implicit or explicit.&amp;nbsp;An essential&#xD;
part of any test plan is the definition of a strategy for test automation.&amp;nbsp;Use your plan to articulate to the&#xD;
development team how you plan to maintain your test assets.&amp;nbsp;In many cases, this is never done.&amp;nbsp;The rest of&#xD;
the development team may be unaware of how you intend to maintain your tests.&amp;nbsp;It is also a good practice to get&#xD;
the rest of the development team to understand that this maintenance can be a substantial part of the overall&#xD;
development effort.&amp;nbsp;Use your test tooling to capture this information and treat this plan just like you would&#xD;
treat any other test asset in your test repository.&#xD;
&lt;/p>&#xD;
&lt;h4>&#xD;
Centrally locate your test assets&#xD;
&lt;/h4>&#xD;
&lt;p>&#xD;
To facilitate the maintenance of your automated test suites, locate your test assets in a repository that can be&#xD;
accessed by the development team.&amp;nbsp;Many test automation environments provide test management tools that make it&#xD;
easier to organize and access your test assets by maintaining the test assets (test cases, test scripts, and test&#xD;
suites) in a common repository.&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
In addition, some form of access control is enforced by the automation test tool.&amp;nbsp;This eases the maintenance&#xD;
burden by ensuring the integrity of your test suites.&amp;nbsp;You may choose to grant stakeholders and managers read-only&#xD;
access, whereas developers and testers at the practitioner level may have read/write access.&#xD;
&lt;/p>&#xD;
&lt;h4>&#xD;
Treat your test assets like any other software&#xD;
&lt;/h4>&#xD;
&lt;p>&#xD;
Software must be maintained.&amp;nbsp;This also applies to the software in your test suites.&amp;nbsp;Test cases and their&#xD;
associated test scripts, whether recorded or programmed, should be maintained.&amp;nbsp;And just as software has different&#xD;
kinds of maintenance (e.g., corrective, preventative, or adaptive) so too do the assets in your automated test suites.&#xD;
As you lifecycle your test suites, identify, if only informally,&amp;nbsp;how&amp;nbsp;you plan to disposition the test suite&#xD;
corrective maintenance (e.g., syntactical errors in your scripts),&amp;nbsp;preventative maintenance (e.g., where possible&#xD;
to write generalized test scripts), and adaptive maintenance (e.g., how you&amp;nbsp;can use your test tooling to re-assign&#xD;
test&amp;nbsp;assets within one suite to&amp;nbsp;another suite or suites).&amp;nbsp;This can be captured, as described in the&#xD;
section &lt;strong>Plan Your Test Suites&lt;/strong> above, in your test plan.&#xD;
&lt;/p>&#xD;
&lt;h4>&#xD;
Improve the testability of your test suites through collaboration with developers&#xD;
&lt;/h4>&#xD;
&lt;p>&#xD;
It's one thing to say that your test suites will need to be maintained due to changes in the application, changes in&#xD;
the testing target, etc.&amp;nbsp;It's quite another thing to actually determine whether a test suite needs to be&#xD;
revamped&amp;nbsp;and, if it does, what test assets within it need to be addressed.&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
One way to facilitate this is to use test suites as a way to communicate test decision to the developers.&amp;nbsp;One way&#xD;
to perform continuous perfective maintenance of test suites is to think of your test suites as assets that belong to&#xD;
the development team rather than just the testers.&amp;nbsp; You can perform a kind of perfective maintenance on test in&#xD;
the following ways:&#xD;
&lt;/p>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
use test suites to raise the level of abstraction&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
use test suites to provide focus for the developer&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
use test suites to articulate areas that the developers would like testers to focus on&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
make the construction and maintenance&amp;nbsp;of test suites more efficient&amp;nbsp;by understanding what area(s)&#xD;
developers want to focus on&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
use test suites to clarify test targets with developers&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;h4>&#xD;
Don't be afraid to clean up your suites&#xD;
&lt;/h4>&#xD;
&lt;p>&#xD;
Your test assets will evolve just as the application under test will.&amp;nbsp;As requirements to the system change, the&#xD;
application will change as well.&amp;nbsp;To maintain your test suites, you should continually&amp;nbsp;check whether test&#xD;
assets are valid.&amp;nbsp;If possible, validity checks should be performed after each new release of the software,&#xD;
preferably more frequently.&amp;nbsp;Keeping your test suites relevant is a full-time job.&amp;nbsp;Assume that changes in the&#xD;
software will lead to some degree of invalid tests within your test suites.&amp;nbsp;Once these test assets have been&#xD;
identified as invalid, get rid of them.&amp;nbsp;This will make the maintenance burden much more tolerable.&amp;nbsp;Some&#xD;
automated test tooling environments make this task easier by providing ways to package outdated or invalid&#xD;
tests.&amp;nbsp;In some cases, you may not be absolutely sure whether you want to completely get rid of tests within your&#xD;
test suite or even of getting rid of test suites altogether.&amp;nbsp; To alleviate this burden, you can create packages&#xD;
for obsolete tests or test suites and dispose of tests or test suites by putting them in packages labeled for this&#xD;
purpose.&#xD;
&lt;/p></mainDescription>
</org.eclipse.epf.uma:ContentDescription>