The Eggplant DAI Runner is an Eggplant DAI integration tool that build as GitHub Action. It enables the functionality to launch DAI tests from within a GitHub workflow pipeline. You can use it to continuously test your application's model-based approach to testing. For more information about Eggplant, visit https://www.eggplantsoftware.com.
The core integration of the Eggplant DAI Runner are with DAI Test Configuration. Eggplant DAI Runner basically will communicate with the API services provided by Eggplant DAI to perform test configuration execution.
Step 1: Search for Eggplant DAI Runner in GitHub Marketplace
Step 2: Click on Use latest version
Step 3: Copy and paste the following snippet into your .yml file.
name: "YOUR WORK FLOW NAME"
# Configure which branch that will trigger Eggplant DAI GitHub Action
# on:
# push:
# branches:
# - main
# pull_request:
# branches:
# - main
jobs:
Run-DAI-Test-Configuration:
strategy: # Optional configuration by using matrix strategy
max-parallel: 1 # To set the maximum number of jobs that can run simultaneously
matrix:
os: [ubuntu-latest, windows-latest, macos-latest] # Operating support by Eggplant DAI GitHub Action
runs-on: ${{ matrix.os }} # Provide OS matrix
name: Run Test Configuration
steps:
- run: echo "Trigger event.. ${{ github.event_name }}. Runner OS.. ${{ runner.os }}."
- name: Eggplant Runner
uses: keysight-eggplant/[email protected]
with:
serverURL: "" # Required. Details below
testConfigID: "" # Required. Details below
clientID: "" # Required. Details below
clientSecret: "" # Required. Details below
[Required] The URL of the Eggplant DAI server, http(s)://dai_server_hostname:portnumber
.
[Required if testConfigName is not given] The ID of the Eggplant DAI test configuration that you want to run, e.g. 389fee3e-9d6b-43e6-b31e-f1d379f27cdf
.
Test configuration ID can be obtained by go to Test Config > Look for a particular test config > Test config id can be obtain from url
.
Alternatively, use testConfigName and remove this input.
[Required if testConfigID is not given] The name of the Eggplant DAI test configuration that you want to run.
Must provide one of the following supporting arguments:
DAI model name for the specified test configuration. (Use this argument if only testConfigName is provided)
DAI suite name for the specified test configuration. (Use this argument if only testConfigName is provided)
[Required] The client ID to use to authenticate with the Eggplant DAI server.
[Required] The client secret to use to authenticate with the Eggplant DAI server.
Alternatively, you could set a repo secret in Repo Settings > Secrets > Actions
and refer to it like below:
clientSecret: "${{ secrets.DAI_CLIENT_SECRET }}"
.
The DAI Client Secret can be obtained by go to http(s):/dai_server_hostname:portnumber/ > System > API Access > Add New
(for new API access creation)
[Optional] The timeout in seconds for each HTTP request to the Eggplant DAI server.
Default: 30
[Optional] The number of times to attempt each HTTP request to the Eggplant DAI server.
Default: 5
[Optional] The exponential backoff factor between each HTTP request.
Default: 0.5
[Optional] The number of seconds to wait between each call to the Eggplant DAI server.
Default: 5
[Optional] The timeout in seconds for checking test environment readiness.
Default: 15
[Optional] The logging level.
Default: INFO
[Optional] The path to an alternative Certificate Authority pem file.
[Optional] Path to a file where the test results will be stored in junit xml format.
Example: C:\results\result.xml
[Optional] The path to eggplant runner CLI executable.
Based on the pipeline .yml configuration, when there is commits or pull request action performed. The pipeline will be triggered and Eggplant DAI Runner will be executed.
DAI Version | Release |
---|---|
7.0.0-3 | latest |
6.5.0-3 | v1.0.6 |
6.4.0-5 | v1.0.5 |
6.3.0-3 | v1.0.4 |
6.2.1-2 | v1.0.3 | v1.0.2 |
6.1.2-1 | v1.0.1 |
-
This workflow .yml file needs to in the
.github/workflows
directory in your repository on GitHub.
Reading: https://docs.github.com/en/actions/quickstart. -
On
strategy: max-parallel: 1
: SUT(System Under Test) is locked for one Eggplant DAI test configuration run at a time.
Hence, we can only do unilateral testing. -
Eggplant DAI Runner supports 3 type of operating system:
- Linux
- Windows
- MacOS
The scripts and documentation in this project are released under the MIT License