Domanda

Ho un progetto di test DUNIT e sto cercando di eseguirlo in modalità console. Quando eseguo il progetto viene eseguito due volte (apre solo una finestra di console e lo vedo eseguire il doppio dei test) e ci vuole anche molto più tempo per essere eseguito rispetto a quando lo eseguo in modalità GUI. Qualcuno sa come eseguire un test della console Dunit solo una volta?

Codice sorgente DPR:

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.

Nessuna soluzione corretta

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top