dbtestframework.pas 613 B

123456789101112131415161718192021222324252627282930
  1. program dbtestframework;
  2. {$IFDEF FPC}
  3. {$mode objfpc}{$H+}
  4. {$ENDIF}
  5. {$APPTYPE CONSOLE}
  6. uses
  7. SysUtils,
  8. fpcunit, testregistry, testreport,
  9. toolsunit,
  10. testbasics, testsqlfieldtypes, testdbbasics;
  11. var
  12. FXMLResultsWriter: TXMLResultsWriter;
  13. testResult: TTestResult;
  14. begin
  15. testResult := TTestResult.Create;
  16. FXMLResultsWriter := TXMLResultsWriter.Create;
  17. try
  18. testResult.AddListener(FXMLResultsWriter);
  19. FXMLResultsWriter.WriteHeader;
  20. GetTestRegistry.Run(testResult);
  21. FXMLResultsWriter.WriteResult(testResult);
  22. finally
  23. testResult.Free;
  24. FXMLResultsWriter.Free;
  25. end;
  26. end.