postmanlabs / newman-reporter-html

Apache License 2.0
81 stars 86 forks source link

How to fetch folder description to html report #52

Open musanas opened 5 years ago

musanas commented 5 years ago

Hi,

In my collection, I have arranged different apis in to different folders And each folder has some small descriptions like below folder

I am trying to display this in the newman HTML report Basically like {{folder name}} - {{the description}}

I have played with it much I understand the below part in hbs file does this `

Requests

{{#each aggregations}}
    {{#if parent.name}}
    <div class="panel-group" id="collapse-folder-{{parent.id}}" role="tablist" aria-multiselectable="true">
        <div role="tab" id="folderHead-{{parent.id}}">
            <h4 style="font-size: 18px;" class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href="#folderData-{{parent.id}}" aria-controls="collapseOne"><strong>{{parent.name}} - {{parent.description}}</strong></a></h4>
        </div>
        <br/>
        <div id="folderData-{{parent.id}}" class="panel-collapse collapsed" role="tabpanel" aria-labelledby="folderHead-{{parent.id}}">
        {{> aggregations}}
        </div>
    </div>
    {{else}}
    {{> aggregations}}
    {{/if}}
{{/each}}
</div>`

I can get the folder name , folder id etc I couldn't get the folder description I understand that these informations are there in the {{summary}} object and I can console the same in cli as well, I just not aware of what handlebars object need to pass for this PS C:\Development\CP-Bronze-Code-New\cloudpay-api-qa> node newmantest.js { "_": { "postman_id": "bb3eeb6b-7535-4800-805a-65867ec59159" }, "item": [ { "id": "4c356d2f-b863-4c3e-9143-6ef829f3bd29", "name": "Employees by Company Number Copy", "description": { "content": "Not used anywhere in Payroll app at the moment", "type": "text/plain" }, "item": [ { "id": "4237f338-5e80-4c1c-be0e-a2801eb9a356",

Can you please throw some light here, what handlebar object need to be used to get the folder description in html report

Thanks Musaffir

gederian commented 5 years ago

I appreciate your work sir and some day I'll be back to use them. ;)

On Thu, Nov 29, 2018, 7:19 PM Musaffir <notifications@github.com wrote:

Hi,

In my collection, I have arranged different apis in to different folders And each folder has some small descriptions like below [image: folder] https://user-images.githubusercontent.com/25841256/49266435-2bf96500-f491-11e8-8615-04a5f8015211.png

I am trying to display this in the newman HTML report Basically like {{folder name}} - {{the description}}

I have played with it much I understand the below part in hbs file does this ` Requests

{{#each aggregations}} {{#if parent.name}}

{{else}}
{{> aggregations}}
{{/if}}

{{/each}}

`

I can get the folder name , fodler id etc I couldn't get the folder description I understand that these informations are there in the {{summary}} object and I can console the same in cli as well, I just not aware of what handlebars object need to pass for this PS C:\Development\CP-Bronze-Code-New\cloudpay-api-qa> node newmantest.js { "_": { "postman_id": "bb3eeb6b-7535-4800-805a-65867ec59159" }, "item": [ { "id": "4c356d2f-b863-4c3e-9143-6ef829f3bd29", "name": "Employees by Company Number Copy", "description": { "content": "Not used anywhere in Payroll app at the moment", "type": "text/plain" }, "item": [ { "id": "4237f338-5e80-4c1c-be0e-a2801eb9a356",

Can you please throw some light here, whant handle bar need to be used to get the folder description in html report

Thanks Musaffir

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/postmanlabs/newman/issues/1801, or mute the thread https://github.com/notifications/unsubscribe-auth/AThRINIYzup2DAYIYwdY2Ah67tM_scMpks5u0KO0gaJpZM4Y675I .

gederian commented 5 years ago

And asking questions with the chicks and stuffs :)

On Thu, Nov 29, 2018, 7:19 PM Musaffir <notifications@github.com wrote:

Hi,

In my collection, I have arranged different apis in to different folders And each folder has some small descriptions like below [image: folder] https://user-images.githubusercontent.com/25841256/49266435-2bf96500-f491-11e8-8615-04a5f8015211.png

I am trying to display this in the newman HTML report Basically like {{folder name}} - {{the description}}

I have played with it much I understand the below part in hbs file does this ` Requests

{{#each aggregations}} {{#if parent.name}}

{{else}}
{{> aggregations}}
{{/if}}

{{/each}}

`

I can get the folder name , fodler id etc I couldn't get the folder description I understand that these informations are there in the {{summary}} object and I can console the same in cli as well, I just not aware of what handlebars object need to pass for this PS C:\Development\CP-Bronze-Code-New\cloudpay-api-qa> node newmantest.js { "_": { "postman_id": "bb3eeb6b-7535-4800-805a-65867ec59159" }, "item": [ { "id": "4c356d2f-b863-4c3e-9143-6ef829f3bd29", "name": "Employees by Company Number Copy", "description": { "content": "Not used anywhere in Payroll app at the moment", "type": "text/plain" }, "item": [ { "id": "4237f338-5e80-4c1c-be0e-a2801eb9a356",

Can you please throw some light here, whant handle bar need to be used to get the folder description in html report

Thanks Musaffir

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/postmanlabs/newman/issues/1801, or mute the thread https://github.com/notifications/unsubscribe-auth/AThRINIYzup2DAYIYwdY2Ah67tM_scMpks5u0KO0gaJpZM4Y675I .

kunagpal commented 5 years ago

@musanas As can be seen from the compiled folder structure here: https://github.com/postmanlabs/newman-reporter-html/blob/develop/lib/index.js#L146, folder descriptions are not added. However, we're more than happy to accommodate this as a feature request.

musanas commented 5 years ago

Thanks @kunagpal

DannyDainton commented 5 years ago

As an interim step and to unblock things for you, this feature had been added into the newman-reporter-htmlextra reporter, if you wanted to check that out.