@rmlira ā¦Hi I have been trying to generate custom report for my project. I am using same hbs file as gopal above. I am getting all layout as is except the color grading (styles). What I am missing here?
Could you please upload the latest .hbs file and index.js file or send to my email. It would be appreciated if you could help me implement the your custom reports. It looks great and precise.
Hi @rmlira
your reports looks perfect.
could you please help me with customise template . i want if {{cumulativeTests.failed}} >0 then parent panel-heading color should be in red if {{cumulativeTests.failed}} = 0 panel-heading color should be green.
please see attached image.
Hi there
I have tested this one with your latest index.js and jsonreportPrettyWithTabChanges.hbs which are available in gDrive but its throwing an error like below.
Could you please take a look?
Error:
C:\Users\kkaku\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:268
throw new Error(str);
^
Error: Parse error on line 506:
};
----------------------^
Expecting āOPEN_INVERSE_CHAINā, āINVERSEā, āOPEN_ENDBLOCKā, got āEOFā
at Parser.parseError (C:\Users\kkaku\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:268:19)
at Parser.parse (C:\Users\kkaku\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:337:30)
at HandlebarsEnvironment.parse (C:\Users\kkaku\node_modules\handlebars\dist\cjs\handlebars\compiler\base.js:46:43)
at compileInput (C:\Users\kkaku\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:515:19)
at ret (C:\Users\kkaku\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:524:18)
at EventEmitter. (C:\Users\kkaku\node_modules\newman\lib\reporters\html\index.js:157:22)
at EventEmitter.emit (C:\Users\kkaku\node_modules\eventemitter3\index.js:203:33)
at done (C:\Users\kkaku\node_modules\newman\lib\run\index.js:260:29)
at C:\Users\kkaku\node_modules\postman-runtime\lib\backpack\index.js:56:34
at PostmanCollectionRun._process (C:\Users\kkaku\node_modules\postman-runtime\lib\runner\run.js:161:13)
at PostmanCollectionRun. (C:\Users\kkaku\node_modules\postman-runtime\lib\runner\run.js:166:76)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5)
I was trying to use your gDrive files and modified ones by @rmlira to customize the newman report, but it was throwing some errors on cmd prompt(i mentioned error log to @rmilra in this post, i dont know what was causing issue. Could you or @rmilra please help on this.
I am using newman 4.2.2. version and have tried this modification of template to include every iteration request in different ācollapse-request-item-indexā. As far as I have understood the indications from this thread the different requests should appear in the report when modifying the template. In my case, I can see the response body only. I donāt see different request for every iteration. It remains on the last call this time.
I havenāt change the index.html. My installation path to html-reporter is: C:\Users[user]\AppData\Roaming\npm\node_modules\newman-reporter-html\lib
Part of the template that I have modified:
{{#*inline āaggregationsā}}
{{#each executions}}
I have done these same steps and I donāt see each iteration request. Just the last one. @rmlira can you please tell me if there is something else that I need to add or change?
It would be something like that, placed in the relevant area of the template. That will show the request body, if the request has one.
I will update my template later today to add this section in but if you want to experiment now and not wait, you could manually update it from your side.
Itās difficult to create a generic template that covers everyones individual usecase with their own context.
I would absolutely recommend trying to create your own personal template to use with the reporter and then you have full control over which pieces of data you either expose or donāt expose.