Azure functions Plugin

The plugin provides functionality to interact with Azure Functions

Installation

  1. Copy the below line to dependencies section of the project build.gradle file

    Example 1. build.gradle
    implementation(group: 'org.vividus', name: 'vividus-plugin-azure-functions', version: '0.5.8')
  2. If the project was imported to the IDE before adding new plugin, re-generate the configuration files for the used IDE and then refresh the project in the used IDE.

Configuration

Authentication

The authentication process relies on the configuration of the environment variables.

See the official "Azure identity" guide to get more details on what types of authentication could be used.

Azure environment selection

Azure environment could be optionally specified using the property azure.environment (sets the environment for all Azure plugins). The default value is AZURE.

The supported environments are only:

  • AZURE

  • AZURE_CHINA

  • AZURE_GERMANY

  • AZURE_US_GOVERNMENT

Azure subscription selection

Azure subscription must be configured via AZURE_SUBSCRIPTION_ID environment variable.

Steps

Function triggering

Triggers a function

When I trigger function `$functionName` from function app `$functionAppName` in resource group `$resourceGroup` with payload:$payload and save response into $scopes variable `$variableNames`
  • $functionName - The name of the function to trigger

  • $functionAppName - The name of the function app

  • $resourceGroup - The resource group function relates to

  • $payload - The JSON payload to send to a function (could be empty)

  • $scopes - The comma-separated set of the variables scopes.

  • $variableName - The variable name to store results in JSON format. If the variable name is my-var, the following variables will be created:

    • ${my-var.body} - The response body

    • ${my-var.status-code} - The HTTP status code

    • ${my-var.headers} - The response headers

    • ${my-var.url} - The request URL

Example 2. Trigger function
When I trigger function `HttpTrigger1` from function app `vividus-http-function` in resource group `vividus` with payload:
and save response into scenario variable `functionTrigger`
Then `${functionTrigger.status-code}` is equal to `202`