The Artima Developer Community
Sponsored Link

Getting Started with Artima SuiteRunner
How to Run the Simple Example Included with the Distribution
by Bill Venners
February 3, 2003

<<  Page 3 of 9  >>

Advertisement

Understanding the Recipe File

In the following command, the first and only argument to the Artima SuiteRunner executable JAR file is the name of a recipe file, account.srj:
java -jar suiterunner-[release].jar account.srj

A recipe file is a Java properties file that supplies information needed by Artima SuiteRunner to run a suite of tests. Recipe files contain values for three properties: org.suiterunner.Runpath, org.suiterunner.Suites, and org.suiterunner.Reporters. The contents of account.srj are:

org.suiterunner.Runpath=-p "example"
org.suiterunner.Suites=-s com.artima.examples.account.ex6test.AccountSuite
org.suiterunner.Reporters=-g

In account.srj:

When invoked via the previous command that specifies account.srj as a command line parameter, Artima SuiteRunner will:

  1. Create a URLClassLoader that can load classes from the example directory, the directory specified via the recipe file's org.suiterunner.Runpath property.
  2. Via the URLClassLoader, load class com.artima.examples.account.ex6test.AccountSuite, the class specified in via the recipe file's org.suiterunner.Suites property.
  3. Discover that com.artima.examples.account.ex6test.AccountSuite class is a subclass of org.suiterunner.Suite.
  4. Instantiatecom.artima.examples.account.ex6test.AccountSuite.
  5. Run the suite of tests by invoking execute on the com.artima.examples.account.ex6test.AccountSuite instance.
  6. Report test results via the graphical reporter, the reporter specified via the recipe file's org.suiterunner.Reporters property.

<<  Page 3 of 9  >>


Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2017 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us