The Artima Developer Community
Sponsored Link

SuiteRunner Forum
ext subdirectory

5 replies on 1 page. Most recent reply: Feb 6, 2003 9:46 AM by Bill Venners

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 5 replies on 1 page
Don McLane

Posts: 1
Nickname: dmclane
Registered: Jan, 2003

ext subdirectory Posted: Jan 30, 2003 3:46 PM
Reply to this message Reply
Advertisement
For me the most irritating thing about JUnit is that you can't stick the jar file in the jre/lib/ext subdirectory. It just doesn't work. SuiteRunner appears to have the same limitation. Does this annoy anyone else?

Why does this bother me? Because I can't create any simple examples. If I try to demonstrate it to a coworker, I spend 3 minutes stumbling with the classpath--by then I've lost their interest.

Don McLane


Brooke Wilmoth

Posts: 7
Nickname: brooke
Registered: Jan, 2003

Re: ext subdirectory Posted: Jan 30, 2003 4:09 PM
Reply to this message Reply
This annoys me also. When I use JUnit I have to run a script that a coworker of mine wrote to set up complicated environment variables (Windows 2000) so that when I start JUnit it has the necessary classpath information. In fact the script is called "setupJunitClasspath". Yuck.

Suiterunner has the recipe files so that you only have to set up the classpath for any given test ONE time. I thought this was a great improvement over fighting with the command line every time!

If you use a tool like JBuilder (I am a big fan), the recent enterprise editions include a place to set up junit information to run the tests which is also a one time set up. I believe that Suiterunner definitely has a less steep learning curve than an IDE like JBuilder.

Brooke

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: ext subdirectory Posted: Feb 1, 2003 9:17 PM
Reply to this message Reply
> For me the most irritating thing about JUnit is that you
> can't stick the jar file in the jre/lib/ext subdirectory.
> It just doesn't work. SuiteRunner appears to have the same
> limitation. Does this annoy anyone else?
>
Well you can stick suiterunner.jar in the extensions directory, but the extensions directory is intended to house libraries. suiterunner.jar is a library, but it is also an application. Since you have to mention the JAR file to start your application, you don't need to put the JAR file in the extensions directory because the JVM will by definition already be able to find the classes inside the executable JAR file.

> Why does this bother me? Because I can't create any simple
> examples. If I try to demonstrate it to a coworker, I
> spend 3 minutes stumbling with the classpath--by then I've
> lost their interest.
>
I think I have a better solution for you. If the first argument to SuiteRunner is not -s, -p, or -r, it interprets the first argument as a recipe file name. If it opens the recipe file successfully, it runs the test specified in the recipe.

What you probably want to do is associate the extension ".srj" with the command "java -jar /wherever/you/installed/suiterunner-[release].jar". Replace [release] with whatever release you have, such as suiterunner-1.0beta2.jar. Once you've done that, you can just double click on a recipe file and it will run the test. That's a convenient way to show demos, but it is also a convenient way to run any of a number of tests that you run often. Just create recipe files for each of the tests, and when you want to run one, just double click on the desired recipe file's icon.

Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Re: ext subdirectory Posted: Feb 3, 2003 11:53 PM
Reply to this message Reply
> This annoys me also. When I use JUnit I have to run a
> script that a coworker of mine wrote to set up complicated
> environment variables (Windows 2000) so that when I start
> JUnit it has the necessary classpath information. In fact
> the script is called "setupJunitClasspath". Yuck.
>
> Suiterunner has the recipe files so that you only have to
> set up the classpath for any given test ONE time. I
> thought this was a great improvement over fighting with
> the command line every time!
>

With SuiteRunner, you don't need to set up environment variables. What I do when starting a new project is to run:

java -jar suiterunner.jar

That brings up the SuiteRunner main window, with no suites, no runpath, etc. Then I go to
File -> Edit recipe

and specify my classpath, suites to run, etc. Then I save that configuration as a new recipe, e.g., myrecipe.srj.

Next, I create a desktop icon, and associate a command with it:
java -jar suiterunner.jar C:\myrecipe.srj.

The whole thing takes less than time writing this down. Then I just click on that icon to fire up SuiteRunner and run my tests.

Jamison DeLorenzo

Posts: 1
Nickname: crayfish
Registered: Jan, 2003

Re: ext subdirectory Posted: Feb 6, 2003 9:23 AM
Reply to this message Reply
> With SuiteRunner, you don't need to set up environment variables.

That is a handy feature. What's troubling me is that my classpath environment variable, in order for the testing to run, requires a list of about 15 different directories, and I would rather just tell SuiteRunner to use the $CLASSPATH as its runpath. What is the trick to getting that part to happen?

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: ext subdirectory Posted: Feb 6, 2003 9:46 AM
Reply to this message Reply
> That is a handy feature. What's troubling me is that my
> classpath environment variable, in order for the testing
> to run, requires a list of about 15 different directories,
> and I would rather just tell SuiteRunner to use the
> $CLASSPATH as its runpath. What is the trick to getting
> that part to happen?

Well, you can also run SuiteRunner from the classpath, though that would require that you add suiterunner-[release].jar to the classpath. Information on how to do that is here:

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

Flat View: This topic has 5 replies on 1 page
Topic: Thanks! Previous Topic   Next Topic Topic: Already Existing Reporters ?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use