• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why XML for units tests?

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi.
Writing tests should be easy and fast.
Why did you decide to use XML files to configure test suites?
Thanks.
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At first you talked about writing tests and then latter you are asking why about configuring. So, its clear and you know that we write test in Java using JUnit or other extensions and then configure the test suite using XML.

Now there are several benefits of configuring a test suite.

- You can use your test suite in continuous integration
- You can use your test suite to analyse code coverage
- Typically test suites are flexible enough to run a single test.
- Sometimes you need different database configuration say, test, prod, dev. It helps configuring these.

Its not at all difficult to configure a test suite. There are lots of tools available for that.
[ December 18, 2007: Message edited by: Adeel Ansari ]
 
Hussein Baghdadi
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I understand this but writing XML file for test seems overkill to me.
Why not to write a Java class instead of XML?
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by John Todd:
Yes, I understand this but writing XML file for test seems overkill to me.


Me too!


Yes, I understand this but writing XML file for test seems overkill to me.


One reason listed frequently is that it avoids a recompile. I don't fully understand the benefits of avoiding the recompile though, hence my question:
Why is recompiling bad?
 
author
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One thing worth clarifying, you do NOT need an xml configuration file to run a test, it's just one of the (many) options.

Other options include:
- ant
- IDEA
- Eclipse
- command line

None of the above require an xml file, you can just select a test class and run it directly.

I'll cover the benefits of using an xml configuration file in another thread.
 
reply
    Bookmark Topic Watch Topic
  • New Topic