• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

testing with junit using xml

 
vipul patel
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not aware of such a framework. Could you shed some light on why are you looking for something like that?
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic