Question

I have a dunit test project and I am trying to run it in console mode. When I execute the project it runs twice (it opens only one console window and I see it executing twice the tests) and it is also taking much more time to execute than when I run it in GUI mode. Does anyone know how to run a dunit console test only once?

DPR source code:

var  
  R: TTestResult;  

begin  
  Application.Initialize;  
  if IsConsole then begin  
    with TextTestRunner.RunRegisteredTests(rxbHaltOnFailures) do begin  
      R := TextTestRunner.RunRegisteredTests;  
      ExitCode := R.ErrorCount + R.FailureCount;  
      Free;  
    end  
  end  
  else begin  
    GUITestRunner.RunRegisteredTests;  
  end;  
end.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top