1. Stefan Glienke
  2. TestInsight

Wiki

Clone wiki

TestInsight / FAQ

FAQ

I started the IDE but cannot see it!

Look in the main menu under View -> TestInsight Explorer. This should bring up the window. You can dock or move it to a good spot and save it as part of your desktop using the save option in the IDE.

Why are the run buttons disabled?

The project needs to be enabled for TestInsight. You can do that either by selecting the "TestInsight Project" menu from the project manager context menu or add the "TESTINSIGHT" conditional define to your project.

Why does my project not report any results?

Please make sure that your project is enabled for TestInsight and that you added the TestInsight client units to your project and called them. You need to add the TestInsight.<framework> unit to your project that is for the test framework you are using (DUnit, DUnit2 or DUnitX). Then you need to call the RunRegisteredTests routine. Make also sure that TestInsight created a proper TestInsightSettings.ini next to your binary. This is where the TestInsight client gets its connection information.

How can I make my project use TestInsight only when the plugin is running?

How you integrate TestInsight into your project is totally up to you. Here is an example that falls back to using the DUnit GUI when TestInsight is not available - either because the TestInsightSettings.ini is not available or because the IDE with the TestInsight plugin is not running:

program Project1;

uses
  TestInsight.Client,
  TestInsight.DUnit,
  GUITestRunner,
  SysUtils;

function IsTestInsightRunning: Boolean;
var
  client: ITestInsightClient;
begin
  client := TTestInsightRestClient.Create;
  client.StartedTesting(0);
  Result := not client.HasError;
end;

begin
  if IsTestInsightRunning then
    TestInsight.DUnit.RunRegisteredTests
  else
    GUITestRunner.RunRegisteredTests;
end.

I have installed TestInsight 1.1 (XE8) and 1.0 (XE2-XE7) in parallel and I get exceptions when running tests

This happens because the second installation overwrites the "source" folder of the first installation if you install both into the same location. Either reinstall both versions of TestInsight into different locations or rename the "source" folder of the first before you install the second version and adjust the Delphi library path (Tools->Options->Delphi Options->Library) for your first installation accordingly.

Updated