wood burning stoves 2.0*
The moose likes Linux / UNIX and the fly likes Java RMI Test Cases Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Java RMI Test Cases " Watch "Java RMI Test Cases " New topic
Author

Java RMI Test Cases

KA Gupta
Greenhorn

Joined: Feb 17, 2009
Posts: 2
Hi,

I have developed a Chat Application using JAVA RMI. Now I want to develop Test Cases. My main aim is to develop a test script. The test script should run client applications in different JVM and store the appropriate results.

Can we run multiple java application running in different JVM using single shell script, if yes then can you send me link where I can learn to do this stuff as I am new to Shell script.

Thanks,
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

I think this fits more in Linux/Unix forum. Moving ...


apigee, a better way to API!
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8876
    
    8

At it's simplest, a shell script is simply a list of shell commands (similar to Windows batch or command files). The most trivial implementation of your requirement would be something like:


Your requirements are pretty vague on exactly what constitutes a test and how to store the results. Maybe if you gave us some more information we could help.
If you want to dive in, this is a good introduction to the BASH shell and This is a more in-depth look at scriping.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
KA Gupta
Greenhorn

Joined: Feb 17, 2009
Posts: 2
Hi Joe and Nitesh,

Thanks for the reply, I guess I didn,t mentioned my question correctly. Actually I just wanted to test my Java RMI application. As in distributed programming we expected to run clients in different JVM . My misunderstanding was that if my shell script is having multiple lines of java x program , all these x program will run on same JVM, which was further corrected by one of the student - all run in different JVM. And thats what I needed. But some how I got hold of IBM tool for testing (14 days trial versionn )don't know exact name. This tool auto generates the testing script .

Thanks once again for your replies.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16019
    
  20

One of the easiest ways to test services written in Java is by using the JUnit test kit.

It's as easy to test RMI calls with JUnit as it is to test any other kind of API. In fact, it's a good idea to make the backend logic testable as local logic as well as to write a test suite that actually invoked the remote interface.

If you prefer to write your tests as shell scripts, just remember that each time you run the "java" command in a shell script, you're starting up a new VM. If that VM wants to talk to other VMs - as many of them as it wants - it may do so as long as it follows the protocols. Which in this case is RMI.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java RMI Test Cases