-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.33 KB
/
blank.yml
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
45
46
name: Newman Tests with HTML Report
on: [push]
jobs:
run-newman-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20' # Altere para '20' se necessário
- name: Install Newman and HTML Extra Reporter
run: npm install -g newman newman-reporter-htmlextra
- name: Create report directory
run: mkdir -p ./relatórios
- name: Debug information
run: |
echo "Node.js version:"
node -v
echo "NPM version:"
npm -v
echo "Installed Newman version:"
newman -v
echo "Repository contents:"
ls -la
echo "Current directory contents:"
ls -la
- name: Run Newman tests
run: |
newman run servRest.postman_collection.json -e servRest_test.postman_environment.json -r htmlextra --reporter-htmlextra-export ./relatórios/Relatório_ServRest.html --reporter-htmlextra-title "Relatório API_Serv_Rest_Automation" --reporter-htmlextra-titleSize 7 --reporter-htmlextra-showEnvironmentData
continue-on-error: true
- name: Display Newman logs if failed
if: failure()
run: |
echo "Newman run failed. Displaying logs..."
cat ./relatórios/Relatório_ServRest.html