wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Application Testing tools and tests Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Application Testing tools and tests" Watch "Application Testing tools and tests" New topic
Author

Application Testing tools and tests

David Winters Junior
Ranch Hand

Joined: Oct 30, 2007
Posts: 47
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
Jo�o Batista
Ranch Hand

Joined: May 25, 2008
Posts: 40
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.
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
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

Joined: May 25, 2008
Posts: 40
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 ]
sandeep Kumar
Ranch Hand

Joined: Sep 19, 2007
Posts: 41
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

Joined: Oct 30, 2007
Posts: 47
Thanks for all the replies guys.

Much appreciated.

David
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Application Testing tools and tests
 
Similar Threads
Required answers to these Testing questions
For Mr. Cohen: Testing Java vs. testing .NET
Multiple Threads and Swing
Testing Multithreaded Code
Testing