Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Dashboard
Ashcroft
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<p><img class="confluence-embedded-image" src="/download/attachments/230400711/ashcroft5.jpg?version=1&modificationDate=1369001285240" data-image-src="/download/attachments/230400711/ashcroft5.jpg?version=1&modificationDate=1369001285240" data-linked-resource-id="230565219" data-linked-resource-type="attachment" data-linked-resource-default-alias="ashcroft5.jpg" data-base-url="http://docs.codehaus.org" data-linked-resource-container-id="230400711" title="null > ashcroft5.jpg"></p><p><strong>When you are coding, how often do you run your unit test suite? Once a day? Once an hour? Once a minute? Could you even run the suite once a minute if you wanted to?</strong> <a class="confluence-link" href="/display/ASH/Project+Background" data-linked-resource-id="8752" data-linked-resource-type="page" data-linked-resource-default-alias="Project Background" data-base-url="http://docs.codehaus.org">Project Background</a></p><p>Also see <a class="confluence-link" href="/display/ASH/Extreme+XP+Tools" data-linked-resource-id="11675" data-linked-resource-type="page" data-linked-resource-default-alias="Extreme XP Tools" data-base-url="http://docs.codehaus.org">Extreme XP Tools</a>.</p><h2>General Information</h2><h3>Introduction</h3><p>Regardless of your political beliefs, as an agile and test-infected developer, we'd like you to consider the benefits of adhering to strict, some might say "dictatorial", limits on the way that you write your unit tests as well as the code being tested (<a class="confluence-link" href="/display/ASH/SUT" data-linked-resource-id="8719" data-linked-resource-type="page" data-linked-resource-default-alias="SUT" data-base-url="http://docs.codehaus.org">SUT</a>).</p><p>We should clarify that these restrictions apply only to <a class="confluence-link" href="/display/ASH/unit+tests" data-linked-resource-id="8847" data-linked-resource-type="page" data-linked-resource-default-alias="unit tests" data-base-url="http://docs.codehaus.org">unit tests</a> (and not <a class="confluence-link unresolved" data-content-title="system tests" data-linked-resource-default-alias="system tests" href="#">system tests</a> or <a class="confluence-link unresolved" data-content-title="integration tests" data-linked-resource-default-alias="integration tests" href="#">integration tests</a>, which are also of great importance to the success of any project). However, your unit tests, at least one for each class in your codebase, should be clean and decoupled from one another. Your unit test suite should run ultra-fast, so that you're encouraged to run it often. We think you should be able to run thousands of unit tests and get your green bar in a few seconds. Achieving that kind of performance takes major discipline on the part of the developer, and Ashcroft helps you learn that discipline by failing tests which stray from acknowledge best practices.</p><p>Remember, the most severe restrictions often lead to the most creative solutions.</p><h3>Ten Commandments of Unit Tests</h3><ol><li><a class="confluence-link" href="/pages/viewpage.action?pageId=10464" data-linked-resource-id="10464" data-linked-resource-type="page" data-linked-resource-default-alias="I am the class being tested. Thou shalt not test any other class but me." data-base-url="http://docs.codehaus.org">I am the class being tested. Thou shalt not test any other class but me.</a></li><li><a class="confluence-link unresolved" data-content-title="Thou shalt write isolated tests" data-linked-resource-default-alias="Thou shalt write isolated tests" href="#">Thou shalt write isolated tests</a></li><li><a class="confluence-link unresolved" data-content-title="Thou shalt not access files during unit tests" data-linked-resource-default-alias="Thou shalt not access files during unit tests" href="#">Thou shalt not access files during unit tests</a></li><li><a class="confluence-link unresolved" data-content-title="Thou shalt not write two tests which depend upon each other" data-linked-resource-default-alias="Thou shalt not write two tests which depend upon each other" href="#">Thou shalt not write two tests which depend upon each other</a></li></ol><p>There are more of these to come... we are currently soliciting feedback.</p><h2>How Does This Work</h2><p>Ashcroft has an implementation of the Java seurity manager. Once registered (See <a class="confluence-link" href="/display/ASH/FAQ" data-linked-resource-id="8712" data-linked-resource-type="page" data-linked-resource-default-alias="FAQ" data-base-url="http://docs.codehaus.org">FAQ</a>), it will start monitoring the process. Ashcroft can be configured through additional VM parameter (See <a class="confluence-link" href="/display/ASH/Ashcroft+Configuration" data-linked-resource-id="10482" data-linked-resource-type="page" data-linked-resource-default-alias="Ashcroft Configuration" data-base-url="http://docs.codehaus.org">Ashcroft Configuration</a>).</p><h2>More Details</h2><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2luY2x1ZGU6RkFRfQ&locale=en_GB&version=2" data-macro-name="include" data-macro-default-parameter="FAQ"></p><h3>Download</h3><p>You can download the <a class="confluence-link unresolved" data-filename="ashcroft.jar" data-linked-resource-default-alias="ashcroft.jar" href="#">attached jar</a> at this page.</p><p>Or you can build it from the Subversion repository: svn://beaver.codehaus.org/ashcroft/scm</p><h3>Open issues and bugs</h3><p><img class="editor-inline-macro" src="/plugins/servlet/confluence/placeholder/macro?definition=e2luY2x1ZGU6T3BlbiBJc3N1ZXN9&locale=en_GB&version=2" data-macro-name="include" data-macro-default-parameter="Open Issues"></p><h3>License</h3><p>Copyright 2004-2005 (C) Obie Fernandez and Aslak Hellesoy. All Rights Reserved.</p><p>Redistribution and use of this software and associated documentation<br /> ("Software"), with or without modification, are permitted provided<br /> that the following conditions are met:</p><p>1. Redistributions of source code must retain copyright<br /> statements and notices. Redistributions must also contain a<br /> copy of this document.</p><p>2. Redistributions in binary form must reproduce the<br /> above copyright notice, this list of conditions and the<br /> following disclaimer in the documentation and/or other<br /> materials provided with the distribution.</p><p>3. The name "ashcroft" must not be used to endorse or promote<br /> products derived from this Software without prior written<br /> permission of Aslak Hellesoy and Obie Fernandez. For written permission,<br /> please contact aslak.hellesoy@gmail and obiefernandez@gmail.</p><p>THIS SOFTWARE IS PROVIDED BY OBIE FERNANDEZ AND CONTRIBUTORS<br /> ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT<br /> NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND<br /> FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL<br /> OBIE FERNANDEZ OR HIS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,<br /> INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES<br /> (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR<br /> SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)<br /> HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,<br /> STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<br /> ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED<br /> OF THE POSSIBILITY OF SUCH DAMAGE.</p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced