SRF and Jenkins

This topic describes how to configure the Micro Focus Application Automation Jenkins plugin to run SRF tests as part of a continuous delivery process.

Supported versions

SRF is supported when using the following Jenkins software versions:

  • Jenkins 2.8.7 and higher.
  • Application Automation Tools Plugin 5.3 and higher.

For more details, see the Application Automation Tools plugin page on the Jenkins site.

Back to top

Add an SRF server to your Jenkins configuration

Add an SRF server to start working with SRF and Jenkins.

Update your Jenkins configuration

  1. In Jenkins, browse to Manage Jenkins > Configure system, and scroll down to the SRF Common Settings area.

  2. Click Add SRF Server, and enter the following details:

    I would explain in more details the "motivation" to use this capability, which is: other than running the tests using a tunnel which is already open, it is possible to instruct Jenkins to open a tunnel when start running tests from Jenkins.

    SRF Tunnel Client Path

    Optional.

    The path to a tunnel application file you want Jenkins to run.

    For example: C:\Jenkins\srf-automation-tools-plugin\ftaas-tunnel.exe

    • Define this value to instruct Jenkins to open a tunnel when the a test run starts.
    • Use tunnels to have SRF access an application behind a firewall.

    For more details, see Manage tunnels.

    SRF Server

    Your SRF tenant URL.

    For example: https://ftaas.saas.hpe.com

    SRF Proxy

    The URL and port of the proxy server used to access your SRF tenant, if relevant.

    For example: proxy.mycorp.net:8080

    Client ID / Client Secret

    Your SRF client ID and secret values.

    For more details, see Manage remote access.

  3. Click Test Connection to test your connection to SRF.

    Click Delete SRF Server to delete this SRF connection.

Back to top

Add SRF build steps

When configuring your build job, add the following build steps:

Create tunnel

Optional, if the apps you are testing sit behind a firewall.

If you add this step, make sure to add it before the Run tests in SRF step.

  1. Click Add build step, and select Create Tunnel.
  2. In the SRF Tunnel Config File field, enter the path to the tunneling config.json file you want to use when running your tunnel. Ensure that this file is placed in the same location as the tunnel client application.

For more details, see Manage tunnels.

Run tests in SRF

Add a step to specify the test you want to run:

  1. Click Add build step, and select Execute tests by SRF.

  2. Enter the relevant details for your test run:

    • SRF Test ID. Enter a specific SRF test ID.
    • SRF Test Tags. Enter one or more tags to run all tests associated with all of the tags.
    • SRF Tunnel Name. If you are using a tunnel to connect to your apps, enter the SRF tunnel name. To enhance system security, we recommend also selecting Close Tunnel When Job Completed.
    • Build number. Define a product build to display in your test result.
    • Release number. Define a product release number to display in your test result.
    • SRF Test Parameters. Click Add Parameter to specify parameter details and run your test with specific parameter values.
Display run results in SRF

Add a post-build action to display your SRF test runs in Jenkins.

Click Add post-build action, and select Publish SRF Test Results.

Back to top

See also: