DUnit in Delphi 3, 7 and Turbo Delphi 2006 studio .net

How to automate DUnit? Because I see only NUnit.

Create your DUnit tests as console applications, and just run them as part of your build with the execute program action. Closer integration is not possible due to the binary nature of DUnit (changes with each delphi compiler version).

There is a XmlTestRunner in DUnit Contrib folder that outputs all of the results to XML. It makes it easy for us to parse the result to find out of test has failed or not.

When the custom Iterator support is added to action studio, I was hoping to add one to execute the test loop through all of the tests, optionally only looking at success or failures. And optionally fail the build if any test failed.

Hi!

Would you care to explain a little what you mean by "not possible due to the binary nature".

I have written a DUnit Final Builder Action currently working for FB4 that runs a compiled DUnit dll.
Where would I expect to get into trouble with that?

Must the FBAction for DUnit be compiled with the same version of delphi as the DUnit dll?
If so, that would explain why you do not want to do it.
One DUnit action for each delphi version does not seem like a good thing.

/Micke

FinalBuilder is currently compiled using Delphi 2006 (well most if it is, some is C# or JScript or VBScript). To create an action that would load binary dunit tests created with other versions of Delphi would not work (I did try this a while back). We cannot compile FB actions using any version of Delphi, since they are delphi packages they must all be compiled with the same version as the FinalBuilder core is compiled with.

i tried to run the dunit using the Execute Program, use the dunit  test that you did in turbo delphi then execute it in FB…does this make sense?what do you think?

Hello Vincent!

Thank you for your response.

I did not realize that all your actions are Delphi packages.
The FB action I made is a com dll implementing IFBCustomAction.
The com object also implements ITestListener from dunit.

This object is then used to send events from dunit to FB with
the Context object I get in OnExecute.

Because the action I made is a com dll it does not matter
what delphi version FB core is compiled with.

If you are interested in what I have done I could send you the code for the action?
It is quite small 150 lines or so.

regards

/Micke

Micke,

Thank you for the reply.  Yes im interested, can you send me the code.  My email add is eiknarf@gmail.com