Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3975758
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:43:24+00:00 2026-05-20T04:43:24+00:00

In our Delphi2007 environment we have a SGLibrary groupproj which contains some 30 bpls.

  • 0

In our Delphi2007 environment we have a SGLibrary groupproj which contains some 30 bpls. We’re just starting out creating unittests for these libraries and are not sure what the most convenient way of organizing the Unittest projects would be.

We are inclined to create a test-executable for each bpl, as this will make compilation an running easy and fast. The test-exe can be set as the active project and Compilation of the bpl can be forced by setting a dependency. It is also easy to run tests, ie by setting the test-executable as the Hostapplication of the bpl.

But the downside is that the library groupproject will be expanded with another 30 items, making it a very large group (why can’t we make subgroups in Delpi ???).

The opposite arrangement would be to create 1 test executable which contains all unit-tests but that would create a executable with over a hundred units, and lots of depencies which all have to be compiled before a single test can be run.

So my question … Does anybody have any suggestions, best practices, or other ideas on how to organize this into a manageable and fast running setup?

Extra consideration: We want to have the possibility to run all tests at once, and of course this will be easier in we put all tests in one executable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:43:25+00:00Added an answer on May 20, 2026 at 4:43 am

    There is a little known feature of DUnit that supports running tests from a dll. You basically create a dunit exe project that has no tests of its own, rather it loads tests from dlls.

    Each dll needs to export a single function:

    library MyTests;
     
    uses
      TestFramework{, add your test units};
     
    function Test: ITest;
    begin
      result := RegisteredTests;
    end;
     
    exports
      Test;     
    end;
    

    Then you just add test cases to the dll as normal. The tests are automatically registered in each unit’s initialization section.

    IMHO its a pity this isn’t promoted as the standard way of working with DUnit. Most unit testing frameworks for other languages are organized this way. They provide a single test runner executable which dynamically loads test cases from any number of loadable modules.

    In addition to letting you break up your tests for easier organization it also allows you to run the same tests under multiple scenarios. Perhaps you want to run your tests using different compiler options for your debug and release builds (or even different versions of the compiler) so you are more confident that the code behaves consistently. You can build multiple dlls from the same source and run them in the same session.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Our company produces cross-platform software and we have Bamboo instance which is building projects
I have just used FastMM4 to detect leaks. I did not realise our application
I have just ported several of our home-made Outlook COM-addins from Delphi 2007 to
We have a little annoying problem with our delphi 2007 IDE, from time to
We are upgrading our application from Delphi 2007 to Delphi XE2, which includes unicode
Our application is a Java-GWT application that uses Guice-Persist and Guice-Servlet extensively. We have
Our Django project is getting huge. We have hundreds of apps and use a
Our company web site generates feeds, but for some reason, white space is being
Our application uses an animation to fade out a message window when it's closed.
Our project does some Java bytecode instrumentation. And we stumbled upon some strange behavior.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.