Use your own frameworks with LeanFT

When you create your tests using the LeanFT project templates provided with the LeanFT plugin, your projects are created with everything you need to use the LeanFT SDK, communicate with the LeanFT runtime engine, and generate LeanFT HTML run reports.

You can also work with LeanFT using your own frameworks. You can build on top of the LeanFT-provided templates or create everything from scratch.

Initialize the SDK

  1. Reference the SDK files:

    Visual Studio Add references to the DLLs located in: <LeanFT installation>\SDK\DotNet
    Eclipse, Spring Tool Suite, JBoss Developer Studio, or IntelliJ IDEA

    Add the jar files (except the javadoc.jar) from: <LeanFT installation>\SDK\Java to your build path

  2. Use SDK.Init to initialize the SDK:

    SDK.Init applies the required test settings and enables communication with the LeanFT runtime engine.

    You must initialize the SDK once, at the beginning of each run.

    If you want to use default values for the SDK, you need only the following line to initialize the SDK:

    SDK.Init(new ModifiableSDKConfiguration());

  3. Optional. To generate the LeanFT HTML report:

    • Initialize the report by running Reporter.Init after SDK.Init at the beginning of each run.

    • Use the relevant ReportConfiguration and Reporter properties and methods to control the way the report is generated.  Make sure to use Reporter.GenerateReport as shown in the examples below, to ensure the report gets generated. For details, see the relevant SDK reference.

Back to top

Initialize the SDK and report - Code samples

The samples below demonstrate how to initialize both the SDK and Report, and to modify one of the SDK default values:

Back to top

See also: