aspose file tools*
The moose likes Testing and the fly likes testing with junit using xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "testing with junit using xml" Watch "testing with junit using xml" New topic
Author

testing with junit using xml

vipul patel
Ranch Hand

Joined: Oct 16, 2005
Posts: 146
hi guys,

any idea of testing with junit with xmls? i mean without actually writing the java class which extends TestCase but rather writing an xml file stating all rules and then give it to some framework (?) where it will be translated to java class.

reg
dilip
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I'm not aware of such a framework. Could you shed some light on why are you looking for something like that?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24184
    
  34

That's kinda what Fit/Fitnesse does, isn't it? You still have to write some Java, but then you can supply test data from an externalized source. I imagine that's the best you're going to do for a non-trivial test framework.


[Jess in Action][AskingGoodQuestions]
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Ernest Friedman-Hill:
That's kinda what Fit/Fitnesse does, isn't it? You still have to write some Java, but then you can supply test data from an externalized source. I imagine that's the best you're going to do for a non-trivial test framework.

Right. Fit does translate tabular formats like HTML tables into method calls to a Java class but, as Ernest said, you still have to write the Java class that takes in the parameters from the HTML and invokes your production code with them.

Fit is not really a testing tool but more of an "executable specification" tool. I.e. it gives you a way to express your test in a language and format that doesn't scare off business analysts and customers as much as raw Java code would.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: testing with junit using xml