• 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

Unit test framework

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am in the process of creating framework for unit testing in java.
Can any one suggegt the best way to do this.

The framework should be user friendly. Developers should be able to add new unit test cases to the framework and use it when ever there is a need.
Ex:
if the test case is adding 2 numbers and multiplying 2 numbers, then by simply typing "add.twoNumbers=10,10" and multiply.twoNumbers=10,10 in a file should invoke the appropriate test cases and should be executed and generate results.


Pl help.

Thanks
 
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Purna Koganti.

Welcome to JavaRanch.

In this book http://www.amazon.com/Test-Driven-Development-Kent-Beck/dp/0321146530/ref=sr_1_1?ie=UTF8&qid=1322217162&sr=8-1 Kent Beck shows how to create a TDD tool.

Hope it helps you.
 
Bartender
Posts: 10780
71
Hibernate Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Purna Koganti wrote:...if the test case is adding 2 numbers and multiplying 2 numbers, then by simply typing "add.twoNumbers=10,10" and multiply.twoNumbers=10,10 in a file should invoke the appropriate test cases and should be executed and generate results...


I hate to say, but I suspect you're adding a layer of complexity that isn't really necessary in the form of a "testing language" by this requirement. This language will need a syntax, and no matter how simple you make it (and, as Einstein said, things should be as simple as possible but no simpler), you will still have to allow for the fact that people make mistakes.

Since I assume your audience (developers) are likely to be reasonably well-versed in Java, it makes more sense to me to base the framework on Java, not Strings or commands.

But that just my opinion. Feel free to throw it in File 13 if you wish.

Winston

 
Purna Koganti
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Herbert, for the reference book



 
reply
    Bookmark Topic Watch Topic
  • New Topic