?
Solved

DUnit - Appropriate use??

Posted on 2004-08-23
3
Medium Priority
?
209 Views
Last Modified: 2010-04-05
Hi folks,

I've been asked to look at DUnit for one of our existing projects, and I'm not really convinced it's going to be something that'll be easy to implement.

The project in question has around 200,000 lines of code in it.  It's not based around any object oriented code at all (in fact, there is a ton of Delphi 1 legacy code still in it).  There is a heap of inter-form dependencies - which may or may not be there depending on the way the method is called.  So, we could have a component on Form2 that we're using, but only if the method is called in that particular way.  Call it another way, and form2 may not even be looked at (or there for may not even be in memory).

Also, a single function may return many different results based on how it was initially called.  What this means is, within the function, a set of different parameters are checked, and depending on those parameters, different formulas/actions are used which in turn returns a different result.

It's pretty much a dogs breakfast of code.  It's been tacked onto for years now, and it's at the point now were changing something can bugger up other things due to it's heavy dependencies on shared stuff (that's bad sharing, not good sharing).  The person who recommended we use DUnit believe that we can use it to fix some of these problems.  I believe adding it into the program will just introduce even more issues and possibly won't work anyway due to the dependency issues.

Does anyone have any thoughts at all?  I know it needs to be rewritten - and it will be.  None of us have used DUnit before.

Any info greatly appreciated.

Stuart.
0
Comment
Question by:Stuart_Johnson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 11878550
Hello

  I have never used DUnit for any projects, but these links maybe help you

http://www.elvenware.com/charlie/delphi/
http://www.thedelphimagazine.com/samples/1339/1339.htm

HTH
0
 

Accepted Solution

by:
jschmied earned 1000 total points
ID: 11879065
Hallo!

I would not see much gain from writing DJunit tests for such a project.

If you start a new development, try it in the following way:
1. - try to construct your business logic as a clean set of objects, write only the empty objects at this time
2. - define your requirements to the business logic as JUnit test cases
3. - implement the testcase
4. - implement the businesslogic

loop throu 2..4 until you are ready

Such a development helps to get a clean implementation.

Bye

Juergen


0
 
LVL 6

Author Comment

by:Stuart_Johnson
ID: 11886975
Hi Juergen,

That's what I thought too.  Thanks for that.

Thanks for the links too, mnasman.

Stu.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question