Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regression testing using Junit

Status
Not open for further replies.

emptee

Programmer
May 2, 2007
4
IN
A manual testing process of an application written in Java is to be automated using JUnit and some custom built framework. (I am not talking of unit testing but a regression testing)

how feasible is this? Is this a common practice?

My next question depends on response of this.
 
But regression testing involves running all your unit tests to ensure that a recent change hasn't broken existing code, doesn't it? JUnit will be suitable for this.

Tim
 
Ok great, so using junit is normal practice. Now I have a situation. I am testing a utility (similar to cygwin) which fires unix like commands on remote machine (This utility goes on remote machine fires command and returns). For example it has a 'cp' like command which copies file from one remote machine to other machine. I am supposed to test this command from a junit based custom framework. I have methods in place which readily fire those commands, now to verify that files are actually copied I cannot rely on this very utility which I am testing (i.e I can use 'cat' like command that this utility provides to verify that file is actually copied, but how can I rely on somthing which I am testing?? I need an external way to do this). So how do I do this? Is rmi an answer? (which is not implemented in my framework) I mean using rmi, going to remote machine, looking for file and thus verifying.

Or is there any easy way to do this?

PS I am new to java, so forgive me if u find this a stupid problem.
 
Why not FTP? That is, from the local machine, FTP (get) the file and take a look at it.

_________________
Bob Rashkin
 
Bob, your solution is practical for above situation. But what if i need to collect signature (lstat) of a file from remote machine? I need to fire that command (which some method implements) on remote machine and collect result back to my machine.
 
I'd write a script for that, and if you want to stick with JUnit, use System.exec to call it.

Anyway, JUnit, as I see it, is intended to test Java programs or frameworks based on its results, ie, the values the return, not the actual modifications the Java program is doing ...

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top