The Artima Developer Community
Sponsored Link

SuiteRunner Forum
org.suitrunner package

5 replies on 1 page. Most recent reply: Mar 28, 2003 3:12 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
Neelesh Korade

Posts: 4
Nickname: neelesh
Registered: Mar, 2003

org.suitrunner package Posted: Mar 17, 2003 12:02 AM
Reply to this message Reply
Advertisement
HI all
I have downloaded suiterunner-1.0beta6 and trying to compile AccountSuite.java given in that. It is not compiling as it is not able to locate the import package org.suitrunner
Could someone help me locate the package, as I am unable to locate it myself, and the Artima site doesnt provide this help either?
thanx and regards


Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: org.suitrunner package Posted: Mar 18, 2003 10:18 AM
Reply to this message Reply
Everything is in the distribution ZIP file that you downloaded. The actual source for the org.suiterunner package is in the suiterunner-[release]-src.zip file, but you don't really need that source. You can just compile with the binaries, which are in the suiterunner-[release].jar file. All you should need to do to compile the AccountSuite.java, is cd to the example directory and type something like:


javac -classpath ../suiterunner-1.0beta6.jar:. com/artima/examples/account/ex6test/AccountSuite.java


The above command works on Unix. If you are using Windows, you would type:


javac -classpath ../suiterunner-1.0beta6.jar;. com/artima/examples/account/ex6test/AccountSuite.java


But you do bring up a good point. I don't mention anywhere how to compile the example. I'll go back and add that to the "Getting Started" article.

Neelesh Korade

Posts: 4
Nickname: neelesh
Registered: Mar, 2003

Re: org.suitrunner package (further query) Posted: Mar 25, 2003 6:48 AM
Reply to this message Reply
hi Bill (and everyone else),
thanx for the response. I have moved further with my Artima Suitrunner and this time facing a new problem. I need to specify runpath in the .srj file relatively. I have given some hardcoded paths and they are working fine. But when I give relative paths (using . or ..) it doesn't work. Is there any way around this?
thanx and regards
neelesh

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: org.suitrunner package (further query) Posted: Mar 27, 2003 7:20 AM
Reply to this message Reply
Neelesh,

Sorry to take a couple of days to respond. I wanted to try out a few things, but haven't yet had time. Did you attempt to edit the file by hand? Or did you just try to use the GUI. My guess (I haven't tried it yet) is that if you edit the file by hand, it might work. If you try that before I get a chance, please post here and let me know if you got it to work.

The think about recipe files that I was originally thinking is that the file path would be absolute, so that no matter what working directory you happened to be in, if you simply ran SuiteRunner with the recipe file name, the classes would be loaded. The runpath is a lot like a classpath, which is usually "fully qualified" non-relative paths (except for .). But I can also see the need for relative paths in recipe files checked in with projects, for example, now that you've brought up the issue.

In short, I hadn't thought about relative paths before. Perhaps Frank did. But we need to think about what the right thing to support from the GUI is.

Neelesh Korade

Posts: 4
Nickname: neelesh
Registered: Mar, 2003

Re: org.suitrunner package Posted: Mar 27, 2003 11:22 PM
Reply to this message Reply
Hi Bill,
I edited the .srj file by hand because we are not much interested in using the GUI. We were not able to use relative runpaths. Neither in the .srj file and (ofcourse) nor on the command line using -p option. This is when we tried using following command.

java -jar suiterunner.jar -p <runpath> -s <suiteclass>

But this thing worked when we gave absolute paths.
So one thing is pretty clear now that the runpath doesn't accept relative path. The solution we adopted was that we use the following command

java -cp <classpath> org.suiterunner.Runner -s suiteclass>

where in classpath we specified the relative path that we wanted to specify in runpath and it worked. So we are no more using .srj file or the runpath. Hope this helps you.
I have a few more problems, I shall post them very soon.
thanx and regards
neelesh

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: org.suitrunner package Posted: Mar 28, 2003 3:12 AM
Reply to this message Reply
> Hi Bill,
> I edited the .srj file by hand because we are not much
> ch interested in using the GUI. We were not able to use
> relative runpaths. Neither in the .srj file and (ofcourse)
> nor on the command line using -p option. This is when we
> tried using following command.
>
> java -jar suiterunner.jar -p <runpath> -s <suiteclass>
>
> But this thing worked when we gave absolute paths.
> So one thing is pretty clear now that the runpath
> ath doesn't accept relative path. The solution we adopted
> was that we use the following command
>
> java -cp <classpath> org.suiterunner.Runner -s suiteclass>
>
>
> where in classpath we specified the relative path that we
> wanted to specify in runpath and it worked. So we are no
> more using .srj file or the runpath. Hope this helps you.
>

Thank you for the info. That does help. At least you have a work-around for now. We did intend that people could use the class path that way if they wished, but we didn't imagine your reason for doing it.

I'm not sure what the right thing to do with relative paths is. Should they be supported in SRJ file or not? Next time I talk to Matt and Frank I'll bring this up and see if we can't come up with an opinion. If anyone else out there has an idea about this issue, please post it here.

Thanks.

Flat View: This topic has 5 replies on 1 page
Topic: Suites for Suites Previous Topic   Next Topic Topic: Bug report? testSucceeded method called even when a test fails...

Sponsored Links



Google
  Web Artima.com   

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