The Artima Developer Community
Sponsored Link

News & Ideas Forum (Closed for new topic posts)
Drive Your Unit Tests with Custom Scripts

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Bill Venners

Posts: 2242
Nickname: bv
Registered: Jan, 2002

Drive Your Unit Tests with Custom Scripts Posted: Mar 11, 2003 2:15 AM
Reply to this message Reply
Advertisement
Artima.com has published a tutorial that shows you how to customize an org.suiterunner.Suite subclass so that it executes tests by interpreting a script written in a custom test language.

http://www.artima.com/suiterunner/scriptdriven.html

Here's an excerpt:

In Artima SuiteRunner's API contracts, "test" is used abstractly. A test method is one kind of test, but not the only kind. Executing test methods, as performed by Suite's implementation of execute, is one way to execute tests -- but not the only way. To execute tests in a different way, Suite subclasses can override execute. When execute is invoked on such a Suite subclass, its own execute implementation can execute tests in a custom way.

This article shows an example of a Suite subclass whose execute method:

- Reads in a file, written in a simple custom scripting language, that contains test commands
- Interprets the commands in the file, and executes the requested tests
- Invokes execute on each sub-Suite

Topic: Optimizing Java Applications Previous Topic   Next Topic Topic: JSP Standard Tag Library Eases Webpage Development


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us