Coder Social home page Coder Social logo

eggplant-github-action's Introduction

Eggplant DAI Runner

Introduction

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.

Using Eggplant DAI Runner in your workflow

Step 1: Search for Eggplant DAI Runner in GitHub Marketplace

image

Step 2: Click on Use latest version image

Step 3: Copy and paste the following snippet into your .yml file.

image

Sample work flow YML content

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

Inputs

serverURL

[Required] The URL of the Eggplant DAI server, http(s)://dai_server_hostname:portnumber.

testConfigID

[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. image
Alternatively, use testConfigName and remove this input.

testConfigName

[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:

  • modelName

DAI model name for the specified test configuration. (Use this argument if only testConfigName is provided)

  • suiteName

DAI suite name for the specified test configuration. (Use this argument if only testConfigName is provided)

clientID

[Required] The client ID to use to authenticate with the Eggplant DAI server.

clientSecret

[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)

image

requestTimeout

[Optional] The timeout in seconds for each HTTP request to the Eggplant DAI server.
Default: 30

requestRetries

[Optional] The number of times to attempt each HTTP request to the Eggplant DAI server.
Default: 5

backoffFactor

[Optional] The exponential backoff factor between each HTTP request.
Default: 0.5

pollInterval

[Optional] The number of seconds to wait between each call to the Eggplant DAI server.
Default: 5

testEnvironmentTimeout

[Optional] The timeout in seconds for checking test environment readiness.
Default: 15

logLevel

[Optional] The logging level.
Default: INFO

CACertPath

[Optional] The path to an alternative Certificate Authority pem file.

testResultPath

[Optional] Path to a file where the test results will be stored in junit xml format.
Example: C:\results\result.xml

eggplantRunnerPath

[Optional] The path to eggplant runner CLI executable.

Output

Pipeline triggered

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.

image

Console output

image

Release for DAI

DAI Version Release
7.2.0-4 latest
7.1.0-5 v1.0.9
7.0.1-1 v1.0.8
7.0.0-3 v1.0.7
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

Notes

  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.

  2. 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.

  3. Eggplant DAI Runner supports 3 type of operating system:

  • Linux
  • Windows
  • MacOS

License

The scripts and documentation in this project are released under the MIT License

eggplant-github-action's People

Contributors

christopherjameshoward avatar curveenk avatar foomunleong avatar poasungoh avatar tingweichoo avatar ziliangyeoh avatar

Watchers

 avatar  avatar  avatar

eggplant-github-action's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.