My background: Mostly C & Perl from 1990 – 1997 Mostly Java since then. Telemetry processing, mission ops, EIS @ JPL. BPM, workflow, assorted biz apps.
Goal falls within the larger context of pursuing excellence in software development.
In traditional software development, testing is usually at the end of the schedule. If development runs late, the testing often suffers.
An old man calls the waiter over to his table. &quot;What would you like, sir?&quot; asks the waiter. &quot;Taste the soup,&quot; he says. &quot;Is the soup too cold?&quot; asks the waiter. &quot;Taste the soup,&quot; says the old man. &quot;Is it too salty?&quot; asks the waiter. &quot;Taste the soup!&quot; says the old man. &quot;Is there a fly in it?&quot; asks the waiter. &quot;Taste the soup!&quot; the old man insists. The waiter looks down: &quot;There's no spoon!&quot; &quot;Aha!&quot; exclaims the old man.
Miriam-Webster: “ a program for the systematic monitoring and evaluation of the various aspects of a project, service, or facility to ensure that standards of quality are being met”
Test plan: document Test case: implementation of specific test. Test suite: collection of test cases. Test report: results of running the tests. Test coverage: description of how much code (and which code) was exercised by tests.
Unit test: typically at the granularity of a class. Functional test: a feature or use case. Integration test: multiple modules. System test: all the modules. Acceptance test: defined by user/customer.
Non-functional testing: the “-ilities”. Performance test: how fast. Load test: how many. Soak test: how long.
This is an alternative to “big bang integration”, otherwise known as “integration hell”.
HttpUnit is better suited to situations where you want to examine the DOM at a low level. If you're looking for convenience, and don't need to get deep into the details, look at Selenium instead.
Selenium IDE, a Firefox plugin, lets users or product managers create their own scenarios. Selenium is also useful during development, to quickly fast forward through actions to get the web application into a desired state.
The items in green aren't really a stack, just a collection of technology-specific libraries that can be useful for creating test cases.
Be sure to design Selenium tests so they can be repeatable. Either delete data when they are done, or always start from a fixed known state.
David Noblednoble@exist.comSr. Solutions Architect, Exist GlobalTesting in JavaSan Gabriel Valley Java Users Grouphttp://www.sgvjug.org/June 25, 2007
GoalMotivate excellence in testingwith concepts, practices, and tools 2
Resources: Unit & FunctionalXmlUnit Library http://xmlunit.sourceforge.net/DBUnit Library http://dbunit.sourceforge.net/HttpUnit Library http://httpunit.sourceforge.net/Cactus for JEE Server Code http://jakarta.apache.org/cactus/Cargo for JEE Server Code http://cargo.codehaus.org/ 36
Resources: Test CoverageCobertura http://cobertura.sourceforge.net/ http://www.ibm.com/developerworks/java/library/j-cobertura/Cobertura with Ant http://cobertura.sourceforge.net/anttaskreference.htmlCobertura with Maven http://mojo.codehaus.org/cobertura-maven-plugin/usage.htmlEmma http://emma.sourceforge.net/ 37
Resources: Acceptance TestsSelenium for Web Apps http://www.openqa.org/selenium/ http://www.openqa.org/selenium-ide/download.actionAutomating Selenium (“Remote Control”) http://www.openqa.org/selenium-rc/ http://wiki.openqa.org/display/SRC/Selenium-RC+and+Continuous+IntegrationSelenium & Maven http://raibledesigns.com/rd/entry/selenium_plugin_for_mavenFitNesse http://fitnesse.org/Stiq http://storytestiq.sourceforge.net/ 39
Resources: Cont. IntegrationCruise Control http://cruisecontrol.sourceforge.net/Continuum http://maven.apache.org/continuum/Hudson https://hudson.dev.java.net/ 40
Resources: App used in DemoOpen Source Medical Record System http://www.openmrs.org/Prerequisites: SVN, MySQL 5, Tomcat 5 http://subclipse.tigris.org/update_1.2.x http://mysql.org/ http://tomcat.apache.org/SVN Repository http://svn.openmrs.org/openmrs/branches/alphaInstallation Edit build.properties and properties.xml to set tomcat.user/password, or add test/test to $CATALINA_HOME/conf/tomcat-users.xml file. Edit build.properties and/or properties.xml to set tomcat.home file. Comment out creation of "test" MySQL user in schema if it already exists. Default username/password is admin/test. 41