github.com/jaylevin/jenkins-library@v1.230.4/resources/metadata/newmanExecute.yaml (about)

     1  metadata:
     2    name: newmanExecute
     3    description: Installs newman and executes specified newman collections.
     4    longDescription: |
     5      This script executes [Postman](https://www.getpostman.com) tests from a collection via the [Newman](https://www.getpostman.com/docs/v6/postman/collection_runs/command_line_integration_with_newman) command line tool.
     6  spec:
     7    inputs:
     8      resources:
     9        - name: tests
    10          type: stash
    11      params:
    12        - name: newmanCollection
    13          description: The test collection that should be executed. This could also be a file pattern.
    14          scope:
    15            - PARAMETERS
    16            - STAGES
    17            - STEPS
    18          type: string
    19          default: '**/*.postman_collection.json'
    20        - name: newmanRunCommand
    21          description: +++ Deprecated +++ Please use list parameter `runOptions` instead.
    22          scope:
    23            - PARAMETERS
    24            - STAGES
    25            - STEPS
    26          type: string
    27        - name: runOptions
    28          description: The newman command that will be executed inside the docker container.
    29          scope:
    30            - PARAMETERS
    31            - STAGES
    32            - STEPS
    33          type: "[]string"
    34          default:
    35            - run
    36            - "{{.NewmanCollection}}"
    37            - --reporters
    38            - cli,junit,html
    39            - --reporter-junit-export
    40            - target/newman/TEST-{{.CollectionDisplayName}}.xml
    41            - --reporter-html-export
    42            - target/newman/TEST-{{.CollectionDisplayName}}.html
    43        - name: newmanInstallCommand
    44          description: The shell command that will be executed inside the docker container to install Newman.
    45          scope:
    46            - PARAMETERS
    47            - STAGES
    48            - STEPS
    49          type: string
    50          default: npm install newman newman-reporter-html --global --quiet
    51        - name: newmanEnvironment
    52          description: Specify an environment file path or URL. Environments provide a set of variables that one can use within collections.
    53          longDescription: see also [Newman docs](https://github.com/postmanlabs/newman#newman-run-collection-file-source-options)
    54          scope:
    55            - PARAMETERS
    56            - STAGES
    57            - STEPS
    58          type: string
    59        - name: newmanGlobals
    60          description: Specify the file path or URL for global variables. Global variables are similar to environment variables but have a lower precedence and can be overridden by environment variables having the same name.
    61          longDescription: see also [Newman docs](https://github.com/postmanlabs/newman#newman-run-collection-file-source-options)
    62          scope:
    63            - PARAMETERS
    64            - STAGES
    65            - STEPS
    66          type: string
    67        - name: failOnError
    68          description: Defines the behavior, in case tests fail.
    69          scope:
    70            - PARAMETERS
    71            - STAGES
    72            - STEPS
    73          type: bool
    74          default: true
    75        - name: cfAppsWithSecrets
    76          description: List of CloudFoundry apps with secrets
    77          longDescription: Define name array of cloud foundry apps deployed for which secrets (clientid and clientsecret) will be appended to the newman command that overrides the environment json entries (--env-var <appName_clientid>=${clientid} & --env-var <appName_clientsecret>=${clientsecret})
    78          scope:
    79            - PARAMETERS
    80            - STAGES
    81            - STEPS
    82          type: "[]string"
    83    outputs:
    84      resources:
    85        - name: influx
    86          type: influx
    87          params:
    88            - name: step_data
    89              fields:
    90                - name: newman
    91                  type: bool
    92        - name: reports
    93          type: reports
    94          params:
    95            - filePattern: "**/TEST-*.xml"
    96              type: acceptance-test
    97            - filePattern: "**/requirement.mapping"
    98              type: requirement-mapping
    99            - filePattern: "**/delivery.mapping"
   100              type: delivery-mapping
   101    containers:
   102      - name: newman
   103        image: node:lts-stretch
   104        workingDir: /home/node