Jump to content

Test Cases vs UML


roopurt18

Recommended Posts

I didn't want to steer the following thread off into a wild tangent, but I did want to respond to the emerging argument about design process:

http://www.phpfreaks.com/forums/index.php/topic,149945.0.html

 

If you're going to pick one between test cases and UML then I agree with Jenk; it is a matter of preference.

 

However, I think it's important to understand that both are intended for a different purpose.  Test cases exist so that we can be reasonably sure that as we add new features to software we don't break existing features.  UML exists primarily to describe a software's design and use in a common language understandable by programmers, users, and business people.

 

In a large scale application, which I think very few of us are actually working on, they would be used in tandem, each for a different purpose.

Link to comment
Share on other sites

A simple UML can be a great tool in teaching or explaining what some body of code is meant to do.  Tests can do that as well, but I believe they take more time to consume.  This is because understanding tests requires reading and consuming the test code, and by and large people are slower at consuming and understanding code (even relatively simple test code) than they are pictures.

Link to comment
Share on other sites

Every thing in life is a matter of preference. No other arguments can hold their ground against that one.

 

I personally design using class and transaction diagrams. Once I think I've got everything pretty much figured out I have my editor generate some of the code for me. Then it's off writing and testing each class, then the next, and the next. The design is likely to change while doing so, so the diagrams have to be periodically updated. Having up-to-date diagrams is important IMO. What if I decide to port my framework to Java? I can simply generate a new codeframe, fill in the blanks and the iterations begin again.  :)

Link to comment
Share on other sites

I appreciate others use them and that it helps them, debatable if they are for good measure though. I'd much prefer to see those same people knocking up code than spending time making diagrams. (Which is opinion - as is everything you'll see on any forum) There was an article I read somewhere that phrases this much better than I ever could, but I can't find it at the moment.

 

The point about porting is not a very strong one - if you have found yourself needing to change platform like that, you've made a poor decision (of which platform to use) in the first place.

 

Personally I gain far more from reading/creating Test Cases (not just Unit Tests) than I do from connecting boxes with labels.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.