• 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

Application Testing tools and tests

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

I was just wondering what others have used to test the actual final applications, what types of tests one has completed? obviously locking of course and the basic functionality here etc ....

Has anyone any recommendation in terms of resources to use for testing and what have other used here. Has anyone used junit or has any a good link to resources/test scripts one has used for testing?

Thanks in advance,
David
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there. You can create JUnit tests easily to test your database functionality (including regarding concurrency).
I don't have the links with me, but there are a few threads in this forum that show examples of tests. They are indeed helpful.
 
Ranch Hand
Posts: 759
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

there are a few threads in this forum that show examples of tests



Where is it? can you give the links?

Jeffry Kristianto Yanuar
SCJP 5.0
SCJA
SCJD (Working on UrlyBird 1.3.2)
 
Jo�o Batista
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JUnit This one and this other one are starting points.

Please use the search engine for more information.
[ July 09, 2008: Message edited by: Jo�o Batista ]
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello David,

You can use Junit for testing core functionality of the application.

I hope giving some focus on JUNIT testcases will be helpful.

Some of the good Practices of Junit:

1) A Junit should never test the APIs that are already existing.
Eg: If there is an EntityBean which persists some data into Database table, then there is no need to write JUNIT test case to test that EntityBean. Because JUNIT SHOULD TEST APPLICATION functionality. SUN may have already tested the methods of EntityBean for persistance. We do not have to again test those API

2) Avoid JUNIT test changing the Database. Even if for your functionality, some data needs to be changed in the Database, and you want to test it; a Junit test case may change the DB but later the changes are to be rolled back.

3) Try to avoid a Junit test case interacting with resources which deals with expensive operations.
Eg: while testing functionality related to FTP, while testing DB etc.
You can use mock objects(which does the dependency injection) to deal with these kind of situations.

4) "TEST FIRST CODE NEXT" . This is one of the most important points in Test Driven Development. If one follows this rule, one's code will be well organised and garnished.

Uses:
=====
1) If one uses JUNIT test cases, One would be confident of his/her functionality. It is a good practice to run all the JUNIT test cases before a developer does the checkin of the code so that his/her recent code would not break the already existing functionality.

Many more......

Finally every good thing will have a drawback.

Excessive use of Junits
1)Consumes a good amount of development time.Some times you feel, amount of time spent on writing test cases is more than your actual development.
2) Causes tight coupling with the code.

Hope this may help you

Thanks,
Sandeep.
 
David Winters Junior
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for all the replies guys.

Much appreciated.

David
 
reply
    Bookmark Topic Watch Topic
  • New Topic