Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unit test framework

 
Purna Koganti
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • 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.
 
Winston Gutkowski
Bartender
Pie
Posts: 10490
64
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Thanks Herbert, for the reference book



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic