• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Question on unit-testing..

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..)
 
Space pants. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic