DevopsArtFactory / goployer

AWS Deployer with Go
https://goployer.dev
Apache License 2.0
72 stars 13 forks source link

Multiple API test configurations #110

Closed GwonsooLee closed 3 years ago

GwonsooLee commented 3 years ago

Currently goployer provides single api test configuration in the manifest which results in continuous changes for different test configurations.

I think it would be better if we could support multiple definitions for api test and make users select the specific api calls for the stack.

Current configuration is like this

api_test_template:
  name: api-test
  duration: 5s
  request_per_second: 10
  apis:
    - method: GET
      url: https://hello-artd.devopsartfactory.com
    - method: POST
      url: https://hello-artd.devopsartfactory.com/post
      body:
        - id=198355
        - username=gslee
        - test=test

This will be changed like below


stacks:
  - stack: wed
    env: wed
    api_test_enabled: true
    api_test_template: api-test-1

api_test_templates:
  - name: api-test-1
    duration: 5s
    request_per_second: 10
    apis:
      - method: GET
        url: https://hello-artd.devopsartfactory.com
      - method: POST
        url: https://hello-artd.devopsartfactory.com/post
        body:
          - id=198355
          - username=gslee
          - test=test

  - name: api-test-2
    duration: 5s
    request_per_second: 10
    apis:
      - method: GET
        url: https://hello-artd.devopsartfactory.com
      - method: POST
        url: https://hello-artd.devopsartfactory.com/post
        body:
          - id=198355
          - username=gslee
          - test=test
``