# Can create the HTML report artifact running it on mac

**URL:** <https://community.postman.com/t/can-create-the-html-report-artifact-running-it-on-mac/58119>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [February 26, 2024, 10:00am UTC](https://community.postman.com/t/can-create-the-html-report-artifact-running-it-on-mac/58119 "2024-02-26T10:00:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![technical-engineer16](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@technical-engineer16](https://community.postman.com/u/technical-engineer16)\
**Post date:** [February 26, 2024, 10:00am UTC](https://community.postman.com/t/can-create-the-html-report-artifact-running-it-on-mac/58119/1 "2024-02-26T10:00:38Z")

</div>

here is action

name: Test-Build  
on:  
push:  
branches: [main]  
pull\_request:  
branches: [main]

workflow\_dispatch:

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@v1
  with: 
    node-version: '21.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 POSTMAN collection
  run: |
   newman run ./Sanity/Sanity.postman_collection.json -e ./environments/integration.postman_environment.json -r htmlextra --reporter-htmlextra-export testResults/htmlreport.html --reporter-htmlextra-darkTheme > testResults/runreport1.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
   if-no-files-found: warn

```

Please advise what is missing also i can see the newman report like it is in CLI

---

<div class="post-metadata">

**Author:** ![technical-engineer16](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@technical-engineer16](https://community.postman.com/u/technical-engineer16)\
**Post date:** [February 26, 2024, 11:05am UTC](https://community.postman.com/t/can-create-the-html-report-artifact-running-it-on-mac/58119/2 "2024-02-26T11:05:21Z")

</div>

i added this part

- name: Publish Report  
uses: actions/upload-artifact@v2  
with:  
name: RunReports  
path: testResults

and now its working

---

<div class="post-metadata">

**Author:** ![gbadebo-bello](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/gbadebo-bello/32/12175_2.png) [@gbadebo-bello](https://community.postman.com/u/gbadebo-bello)\
**Post date:** [February 26, 2024, 7:42pm UTC](https://community.postman.com/t/can-create-the-html-report-artifact-running-it-on-mac/58119/3 "2024-02-26T19:42:59Z")

</div>

Hi @technical-engineer16. Welcome to the Postman community.

This looks like a GitHub Action Yaml file. Is this correct? Can you share more context regarding what you’re trying to achieve exactly? Are you trying to run a collection in Newman on the CI while still being able to see the report printed on the CLI?

---

<div class="post-metadata">

**Author:** ![technical-engineer16](https://avatars.discourse-cdn.com/v4/letter/t/a698b9/32.png) [@technical-engineer16](https://community.postman.com/u/technical-engineer16)\
**Post date:** [February 28, 2024, 6:01am UTC](https://community.postman.com/t/can-create-the-html-report-artifact-running-it-on-mac/58119/4 "2024-02-28T06:01:35Z")

</div>

hi,  
yes I am running git hub action with Newman and I can see the report, but when I am adding **workflow\_dispatch** to pass parameters to the environment, the job is falling, please advise what is wrong.

Example:

workflow\_dispatch:  
inputs:  
username:  
description: “user name”  
default: “test”  
type: “string”

Current yamel:  
name: Test-Build  
on:  
push:  
branches: [main]  
pull\_request:  
branches: [main]

```
workflow_dispatch: 

```

jobs:  
test-api:  
runs-on: ubuntu-latest  
steps:  
# Checks-out your repository under $GITHUB\_WORKSPACE, so your job can access it  
- uses: actions/checkout@v4

```
# INstall Node on the runner
- name: Install Node
  uses: actions/setup-node@v3
  with: 
    node-version: '20.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 POSTMAN collection
  run: |
       newman run ./Sanity/Sanity.postman_collection.json -e ./environments/integration.postman_environment.json -r htmlextra --reporter-htmlextra-export testResults/htmlreport.html --reporter-htmlextra-darkTheme
   
- name: Publish Report
  uses: actions/upload-artifact@v2
  with: 
   name: RunReports
   path: testResults

```

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [March 29, 2024, 6:02am UTC](https://community.postman.com/t/can-create-the-html-report-artifact-running-it-on-mac/58119/5 "2024-03-29T06:02:14Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
