• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java RMI Test Cases

 
KA Gupta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this fits more in Linux/Unix forum. Moving ...
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
KA Gupta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic