I have a Unit test project for my application using the DUnit framework. This project has a unit surrounded by $IFDEF to output the test results to an xml file instead of gui or just the command line. The XML_OUTPUT definition is activated by switching the assembly configuration.
program DelphiCodeToDoc_Tests; uses TestFramework, TextTestRunner, Sysutils, Forms, GUITestRunner, {$IFDEF XML_OUTPUT} XmlTestRunner2 in 'DUnit_addon\XmlTestRunner2.pas', {$ENDIF} DCTDSetupTests in 'IntegrationTests\DCTDSetupTests.pas', ...
It works great. The problem starts with when I add a new block to this project from the IDE (new device with "File> New> Unit").
Testing project now:
uses TestFramework, TextTestRunner, Sysutils, Forms, GUITestRunner, DCTDSetupTests in 'IntegrationTests\DCTDSetupTests.pas', ... MyNewUnit in 'IntegrationTests\MyNewUnit.pas';
As you can see, the XML_OUTPUT test has disappeared ... Each time I add a module, the Delphi IDE removes this test.
Do you know why and how I can avoid this?
source share