Coder Social home page Coder Social logo

eggplant-azure-devops's Introduction

Eggplant Runner with Azure DevOps

Introduction

The Eggplant Runner is an Eggplant DAI integration tool that enables the functionality to launch DAI tests from within a Azure DevOps 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 Runner are with DAI Test Configuration. Eggplant Runner basically will communicate with the API services provided by Eggplant DAI to perform test configuration execution. Eggplant Runner currently provides "Run Test Config" as its main action.

Using run-test-config.yml in your pipeline

In order to use the Eggplant Runner with Azure DevOps, you need to add this to your Azure Pipelines .yml file:
Reading: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/templates?view=azure-devops#use-other-repositories

trigger:
  - main
  
resources:
  repositories:
    - repository: sourceRepo
      type: github
      name: TestPlant/eggplant-azure-devops
      endpoint: # your service connection name. Details below under Notes(4).
jobs:
  - job: Run_Test_Config
    strategy:
      maxParallel: 1
      matrix:
        linux:
          imageName: 'ubuntu-latest'
        mac:
          imageName: 'macOS-latest'
        windows:
          imageName: 'windows-latest'
    pool: 
      vmImage: $(imageName)
    steps:
      - template: templates/run-test-config.yml@sourceRepo
        parameters:
          serverURL: # Required. Details below
          testConfigID: # Required. Details below
          clientSecret: # Required. Details below

Inputs

serverURL

Required The URL of the DAI server, e.g. http://localhost:8000.

testConfigID

Required The ID of the test config that you want to run, e.g. 09c48b7d-fc5b-481d-af80-fcffad5d9587.

Test configuration ID can be obtain by go to test config > look for a particular test config > test config id can be obtain from url. image

clientSecret

Required The client secret to use to authenticate with the DAI server, e.g. e9c15662-8c1b-472e-930d-aa0b11726093.
Alternatively, you could set a pipeline secret and refer to it like below:
clientSecret: $(DAI_CLIENT_SECRET).
Reading: https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables

The DAI Client Secret can be obtain by go to http://kc-localhost:8000/auth > clients > search for client:dai:agent:integration > credential > secret image

clientID

Optional The client ID to use to authenticate with the DAI server.
Default: client:dai:agent:integration

requestTimeout

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

requestRetries

Optional The number of times to attempt each HTTP request to the 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 DAI server
Default: 5

logLevel

Optional The logging level
Default: INFO

CACertPath

Optional The path to an alternative Certificate Authority pem file

dryRun

Optional Dry Run mode only validates the parameters without executing a test config run. It does not require a connection to the DAI server.
Default: False.

Notes

  1. This pipeline .yml file needs to in the root directory of your repository.

  2. On strategy: max-parallel: 1: SUT(System Under Test) is locked for one test config run at a time.
    Hence, we can only do unilateral testing.

  3. Eggplant Runner supports these OS: Linux, Windows, MacOS.

  4. In order to reference our template run-test-config.yml script, you need to create a GitHub Service Connection.
    In Azure DevOps page: Project settings > Pipelines > Service connections > New service connection > GitHub.
    Then, populate resources: repositories: endpoint with the newly created Service connection name.

eggplant-azure-devops's People

Contributors

christopherjameshoward avatar foomunleong avatar poasungoh avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

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.