Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Unit test framework

 
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
 
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.
 
Bartender
Posts: 10777
71
Hibernate Eclipse IDE 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



 
It's weird that we cook bacon and bake cookies. Eat this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!