dbtestframework_gui.lpr 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. program dbtestframework_gui;
  2. {$mode objfpc}{$H+}
  3. // Note that this Lazarus project by default re-compiles all DB units! This eases
  4. // developing, but requires some attention from the developer.
  5. // It could very well be that after compiling this project, you have to manually clean
  6. // the .ppu files before you can build fcl-db in the regular way. (Using fpmake)
  7. // If you want to use the default installed db units, use the
  8. // Default_no_local_ppus build mode which clears the search path in the compiler
  9. // options.
  10. uses
  11. Interfaces, Forms,
  12. // GUI:
  13. GuiTestRunner, inieditor,
  14. // Generic DB test framework units
  15. ToolsUnit,
  16. // Connectors for different database-types
  17. sqldbtoolsunit,
  18. dbftoolsunit,
  19. bufdatasettoolsunit,
  20. memdstoolsunit,
  21. SdfDSToolsUnit,
  22. tcsdfdata,
  23. // DB unittest
  24. testbasics,
  25. TestFieldTypes,
  26. TestDBBasics,
  27. TestDatasources,
  28. TestBufDatasetStreams,
  29. TestSpecificTBufDataset,
  30. TestSpecificTDBF,
  31. TestDBExport;
  32. {$R *.res}
  33. var
  34. DBSelectForm: TFormIniEditor;
  35. TestRunForm: TGUITestRunner;
  36. begin
  37. Application.Initialize;
  38. DBSelectForm:=TFormIniEditor.Create(nil);
  39. try
  40. DBSelectForm.INIFile:='database.ini';
  41. DBSelectForm.ProfileSelectSection:='Database';
  42. DBSelectForm.ProfileSelectKey:='type';
  43. // We can ignore resulting db selection as the file is saved already:
  44. DBSelectForm.ShowModal;
  45. finally
  46. DBSelectForm.Free;
  47. end;
  48. // Manually run this form because autocreation could have loaded an old
  49. // database.ini file (if the user changed it using DBSelectForm)
  50. TestRunForm:=TGUITestRunner.Create(nil);
  51. try
  52. TestRunForm.Show;
  53. Application.Run;
  54. finally
  55. TestRunForm.Free;
  56. end;
  57. end.