Categories

Main
Database
Java
Microsoft.NET
Adabas
DB2
Informix
Microsoft SQL Server
MySQL
Oracle
Pervasive.SQL
PostgreSQL
Sybase
Other
ASP
ColdFusion
Crystal Reports
Delphi, C etc
JAVA
Microsoft.NET
Perl and the DBI
PHP
ANSI SQL
Unix Shell Scripts
Visual Basic
XML & XSLT
Corel Paradox
FileMaker
Microsoft Access
Microsoft Excel
Other PC Databases
Applications & Tools
Database Concepts & Design
EJB programming & troubleshooting
EJB design
General J2EE
XML & Web services
Web tier: servlets, JSP, Web frameworks
Performance and scalability
Industry news
TSS feedback
Mobicents Contributors
Mobicents Users
JSLEE Resource Adaptor Types
Planning JavaOne 2008
Sun Tech Days
Other Java conferences
Binary Web Services and XML
Metro and JAXB
GlassFish
GlassFish Plugins
Project jMaki
GlassFish WebTier
Mural
Java Development Tools
Java WS & XML Community News
JAXP
Java SE
6uN Early Access
Java Quick Starter
Java SE Snapshots: Project Feedback
JCK Forum
Feedback and Suggestions
JDK Distros
JDK Open Source
General JSR Discussion
JCP 2.6
JXTA Community Forum
ME Interest
ME Cool Apps
ME General Help
ME Feedback & Suggestions
ME Application Developer Interest
Blu-ray Disc Java
ME Developer Days
Squawk
Mobile Developer Alliance
OpenCable
LWUIT
JavaFX Script Language Discussion
OpenJFX General Discussion
Scene Graph
General Performance Discussion
Your Java Career
NetBeans 6.0
Servlets
JSP
JSF
Portals and Portlets
EJB and Other Java EE Technologies
Distributed Java
Object Relational Mapping
JDBC
Web Services
Swing / AWT / SWT / JFace
JNLP and Web Start
Java Micro Edition
Sockets and Internet Protocols
Threads and Synchronization
Performance
Applets
I/O and Streams
Other Java APIs
Game Development
Java in General (beginner)
Java in General (intermediate)
Java in General (advanced)
Programmer Certification (SCJP)
Developer Certification (SCJD)
Associate Certification (SCJA)
Web Component Certification (SCWCD)
EJB Certification (SCBCD)
Mobile Application Certification (SCMAD)
Architect Certification (SCEA)
Web Services Certification (SCDJWS)
XML Certification
Product and Other Certifications
Mock Exam Errata
Sun Certification Results
Authors' Corral
Book Reviews
Events
Bunkhouse Porch
Teachers' Lounge
Testing
OO, Patterns, UML and Refactoring
IDEs, Version Control and other tools
Ant, Maven and Other Build Tools
Linux / UNIX
Mac OS
HTML and JavaScript
XML and Related Technologies
Agile and Other Processes
General Computing
Security
Groovy
Scala
Other Languages
Struts
Application Frameworks
Other Open Source Projects
BEA/Weblogic
IBM/Websphere
Oracle/OAS
Apache/Tomcat
JBoss
Other Java Products and Servers
JavaRanch
Cattle Drive (java college)
Moderators Only
Trash Can
Jobs Offered
Jobs Wanted
Jobs Discussion
Meaningless Drivel
Programming Diversions
Blatant Advertising
Java Announcements
New To Java
Advanced Java
Java Applets
Networking
Threads and Synchronization
Java 2D
AWT / Swing
SWT / JFace
CLDC and MIDP
CDC and Personal Profile
Sun Java Wireless Toolkit
Enterprise JavaBeans
JavaServer Pages (JSP) and JSTL
Java Servlet
JavaServer Faces
Web Frameworks
Database
XML
Lucene
NetBeans
Eclipse
IntelliJ IDEA
JCreator
Other IDEs
Java Tutorials
Java Tips
Jobs Discussion
Jobs Offered
Jobs Wanted
Professional Certification
Forum Lobby
Java Blogs
Introductions
Reviews / Advertising
Suggestions & Feedback

Resources

Java Database
Linux
Coding
Mobile
Hardware
Software Development
Software Development
iOS,OS X
iOS,OS X
ORACLE
IBM DEVELOPER
IBM DEVELOPER
MSDN
MSDN


Tags

Testing

Unit testing, integration testing, system testing, test first programming, JUnit, JTest, WinRunner, QA, etc.

What is the Completion Criteria of Unit Testing?


When are we done unit testing?How do we know that we've tested enough during this phase and are to move to next step?--------------------Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep

   
   
   
 
   
      quote:Originally posted by Doug Wang:When are we done unit testing?How do we know that we've tested enough during this phase and are to move to next step?Ah! A trick questionUnit testing isn't a a milestone or phase in the development process. It's a pervasive practice that takes place as your coding. It's just like compiling, or commiting changes to version control, or all those other things that go on. Unit testing is just an aspect of coding.How do you know you're done? When you've written tests for all the stuff you can think might go wrong with the method you've just written. And how do you know you've thought of everything? Well, in reality you never will know that, but in practice the book is chock full of ideas and acronyms that might help.The kind of testing that goes at the end of a phase is more likely to be functional testing, and that's a totally separate beast. Unit testing is solely for the benefit of developers, and takes place minute by minute.CheersDave--------------------Dave Thomas Author of "The Pragmatic Programmer: From Journeyman to Master

   
   

   
   
      quote:Originally posted by Dave Thomas:Unit testing is just an aspect of coding.Thanks Dave. You enlighten me a lot!So the developer codes, does unit testing, codes again, does unit testing again... But when does this developer feel enough confidence to move to code next module? Should all logic paths of the module be covered by unit tests? Should the module's interface be proved to comply with the specification of module?--------------------Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep

   
   
   
 
   
      Doug,You move one to the next module when the tests demonstrate that the code does what it is supposed to.  In other words, you have test cases for the non-trivial things your class does.  (most people don't write tests for getters/setters)Yes, all logic paths should be covered.  Otherwise, you would be leaving out valid cases.  It's not neccessary to prove the spec, just to be convincing.--------------------[JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]

   
   
   
 
   
      Also, test driven development helps solve the problem of knowing when to stop.  Since the tests are written first, you stop when all the tests pass and tests cover all needed functionality.--------------------[JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]

   
   
   
 
   
      quote:Originally posted by Doug Wang:When are we done unit testing?How do we know that we've tested enough during this phase and are to move to next step?Hi Doug Wang,I guess the following two threads might be useful for u to think of the role of unit tesing in COding phase... There u will see a lot of info, concerning with the time for unit testing...http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=68&t=000334http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=68&t=000324--------------------Author of JMADPlus: 5 Full Sized Tests, 300+ Quality Questions, Try trial version here!SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0


Related Links

Announcing TestNG 2.0, now with JDK 1.4 support!
Testing JSP
TagUnit problem, need help ...
Jtest seems have some problem...
Is there auto test tool like junit?
JavaScript in JMeter
A few questions about Mock Objects and JDBC
offshore and onshore companies
test life cycle
What does this mean?
Performance test tool for message based j2ee application
JUnit and AbstractTestCase Problem
testing a func that uses another class(which contains static and instance methods)
HttpUnit: Attempted to assign to parameter... the extraneous value...
fitNesse vs junit
EasyMock failure behavior