Share this page

# Use your own frameworks

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

You can also create tests using your own frameworks. You can build on top of the FTD project templates or create everything from scratch.

In this topic:

## Initialize the SDK

1. Reference the SDK files:

   IDE | Instructions
   --- | ---
   Visual Studio | Add references to the DLLs located in: <Installdir>\SDK\DotNet
   Eclipse, Spring Tool Suite, JBoss Developer Studio, or IntelliJ IDEA | Add the jar files (except the javadoc.jar) from: <Installdir>\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 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 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:

SDK+Reporter.Init Code Sample (C#) :

    public void Test()
    	{
    	//Initialize the SDK and report once per process

      //Modify the default value for the SdkConfiguration ServerAddress

      //Initialize the Reporter with default values
    		SDK.Init(new SdkConfiguration
    		{
    			ServerAddress = new Uri("ws://myServerAddress:5095")
    		});
    			Reporter.Init(new ReportConfiguration() {
    			TargetDirectory = "C:\Results\"
    		});
    		//Put your test code here

              //Generate the report and cleanup the SDK usage
    		Reporter.GenerateReport();
    		SDK.Cleanup();
    	}

SDK+Reporter.Init Code Sample(Java):

        public static void main(String [] args){
            // initialize the SDK and report only once per process
            try{
                ModifiableSDKConfiguration config = new ModifiableSDKConfiguration();
                config.setServerAddress(new URI("ws://myServerAddress:5095"));
                SDK.init(config);
                Reporter.init();

                //put your test code here.

                //Generate the report and cleanup the SDK usage.
                Reporter.generateReport();
                SDK.cleanup();
            }
            catch(Exception e){
            }

Back to top

See also:

- Testing with Cucumber

https://admhelp.microfocus.com Functional Testing for Developers 8942
Tips to improve your search results... OpenText™ Functional Testing for Developers Help Center OpenText™ Functional Testing for Developers Help 25.2 All View Local Help Center View Online Help Center Version: