-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathazure-pipelines.yml
More file actions
44 lines (37 loc) · 1.72 KB
/
Copy pathazure-pipelines.yml
File metadata and controls
44 lines (37 loc) · 1.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
trigger:
- main
jobs:
- job: postman_newman_api_serve_rest
pool:
# agente de execução/runner
vmImage: ubuntu-22.04
steps:
- task: NodeTool@0
inputs:
versionSpec: '18.x'
displayName: "Instalar node versão 18"
- script: |
npm install -g newman
displayName: "Instalar newman"
- script: |
npm install -g newman-reporter-htmlextra
displayName: "Instalar newman-reporter-htmlextra"
- script: |
newman run ./api-serve-rest_collection.json -e ./api-serve-rest_prod-environment.json --delay-request 2 --reporters cli,htmlextra,junit --reporter-htmlextra-export ./reports/postman-api-serve-rest-report-htmlextra-newman.html --reporter-junit-export ./reports/postman-api-serve-rest-report-junit-xml-newman.xml
displayName: "Executar com Newman testes automatizados de API REST da collection e environment do Postman em um ambiente de produção e Gerar os resultados dos testes"
continueOnError: true
- task: PublishBuildArtifacts@1
displayName: "Armazenar os resultados dos testes em reports html e xml"
condition: always()
inputs:
PathtoPublish: './reports'
ArtifactName: 'postman-api-serve-rest-reports-html-xml-newman'
publishLocation: 'container'
- task: PublishTestResults@2
displayName: "Publicar os resultados dos testes em formato JUnit"
condition: always()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: './reports/postman-api-serve-rest-report-junit-xml-newman.xml'
failTaskOnFailedTests: false
testRunTitle: 'Publicar os resultados dos testes em formato JUnit'