-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create github-actions-htmlextra-report.yml
- Loading branch information
1 parent
1be94fa
commit e3066cb
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This workflow will help you to produce an HTML extra test results report | ||
|
||
name: Newman Tests | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test-api: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
# INstall Node on the runner | ||
- name: Install Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '16.x' | ||
|
||
|
||
# Install the newman command line utility and also install the html extra reporter | ||
- name: Install newman | ||
run: | | ||
npm install -g newman | ||
npm install -g newman-reporter-htmlextra | ||
# Make directory to upload the test results | ||
- name: Make Directory for results | ||
run: mkdir -p testResults | ||
|
||
# Run the POSTMAN collection | ||
- name: Run API Tests | ||
run: newman run "Restful Booker BVT.postman_collection.json" -e Production.postman_environment.json -r htmlextra --reporter-htmlextra-export testResults/htmlreport.html | ||
|
||
# Upload the contents of Test Results directory to workspace | ||
- name: Output the run Details | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: RunReports | ||
path: testResults |