• 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
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Question on unit-testing..

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a question on unit-testing..
The design for a complex application with a large number of classes has just been completed. Which of the following is the BEST approach for unit-testing the classes? (One answer)
a)Use the package diagrams to group classes logically and perform unit-testing on a package-by-package basis.
b)Use activity diagrams to identify parallel behavior and test classes that use threads.
c)Use the interaction diagrams to step through the interactions between the classes and perform visual inspection of the code to identify discrepancies
d)Use the class diagram to ensure that the classes have been correctly coded and perform unit-testing for each class association and for each class
From 'UML distilled', I think the answer would be (a) - ie. on a package-by-package basis.
But, I do have some doubts it could be (d) too.
Please express your comments on this.
Thanks.
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Initially, I thought it would be (c), but after reading the question carefully, it says the DESIGN has been completed for...
I have few questions: Do we assume that, by "unit-testing" the classes, they mean preparing a unit test plan? Reason, being the coding has not been started yet, so how can one unit-test the classes?
Please explain, if anyone differ in opinion regarding the above comment..
I think (a) is the best answer.
Answer (d) is incorrect in my opinion since class diagrams represent Static modelling and may not capture the dynamic behaviour represented in the Interaction diagrams.
If we consider that, the question specifically says "DESIGN" has been completed, not the coding, then we can rule out (c) & (d). ( I may be wrong on this one, please comment if anyone thinks otherwise..)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic