Code Monkey home page Code Monkey logo

awesome-newman-html-template's Introduction

 __  __              _____     _____    ____     _____     ______   _        _       __     __   _____
|  \/  |     /\     |  __ \   / ____|  / __ \   / ____|   |  ____| | |      | |      \ \   / /  / ____|
| \  / |    /  \    | |__) | | |      | |  | | | (___     | |__    | |      | |       \ \_/ /  | (___
| |\/| |   / /\ \   |  _  /  | |      | |  | |  \___ \    |  __|   | |      | |        \   /    \___ \
| |  | |  / ____ \  | | \ \  | |____  | |__| |  ____) |   | |____  | |____  | |____     | |     ____) |
|_|  |_| /_/    \_\ |_|  \_\  \_____|  \____/  |_____/    |______| |______| |______|    |_|    |_____/


  • ๐Ÿ”ญ Software Enginner at Totvs.
  • ๐ŸŽ“ Graduated in Analysis and Systems Development by UNIVIS.
  • ๐ŸŽ“ Postgraduate in Software engineering by PUC Minas.
  • ๐Ÿ’ผ Full stack developer working with Angular and Spring Boot.
  • ๐Ÿง Enthusiast Open Source and Free Software.
  • ๐Ÿ‘ช Husband and father.
  • ๐Ÿ˜„ Pronouns: He/Him.

ย ย  ย ย 

github stats

Visitor count

awesome-newman-html-template's People

Contributors

hanikhan avatar kumarshanu19 avatar marcosellys avatar monilbhavsar avatar sashman avatar ztmeyer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

awesome-newman-html-template's Issues

Request sent in Test scripts overrides Original requests.

Newman version : 3.9.3
Exported Postman Template Version : 2.1

I need to block execution of script till certain conditions are met which i check by sending request using pm.sendRequest() .
All this request overrides the original request when report gets generated.

Steps to reproduce:

  1. Create a postman request
  2. add script pm.sendRequest("http://www.example.com/", function (err, res) { //add more code if you want response_code = res.code; });
  3. export and generate HTML report.
  4. In the report instead of your original request you will see "http://www.example.com/" request and according reposnse.

Email Awesome report

Hi Marcos,

Help me here like with cmd line integrationif newman need to send the report generated automatically from my email to others in both est and ist timezones

Query on awesome-newman-html-template

hi Marcos,

Your Postman Report is very good. If you want we can work together and build a great report that can be used larger community. If you want i can write few more features for you.

Please let me know if you want it and we can go from their.

Thanks
Bhanu

Update README.md

Is your feature request related to a problem? Please describe.
No.

Describe the solution you'd like
Update readme with the new stable version of newman.

multiple iterations

Hello, the template is amazing, unfortunately not usable with multiple iterations of same test. Do you plan to add this functionality?

No Show Error link with latest change

The other issue is closed. So adding another one. I did not understand the change.
Now the "Show error" link does not show at all. ( I do not have failures).

Is this expected? you show the "show error" section only when there are failures.
What I pointed out is : "You can have the show error section but when you click o this we should not show anything if no failures."

With latest change I get this. The "Show error" link itself is not there.

screen shot 2018-05-31 at 11 11 24 am

Doesn't work for me.

I have the HTML report installed, but when I run

newman run -e my.environment.json -g my.globals.json --reporters cli,html --reporter-html-template templates/htmlreqres.hbs --reporter-html-export my_report.html my.collection.postman.json

I get:

newman: could not load "html" reporter
this seems to be a problem in the "html" reporter.

Error: ENOENT: no such file or directory, open 'templates/htmlreqres.hbs'

Error: ENOENT: no such file or directory, open 'templates/htmlreqres.hbs'
at Object.openSync (node:fs:497:3)
at Object.readFileSync (node:fs:393:35)
at new PostmanHTMLReporter (/usr/local/lib/node_modules/newman-reporter-html/lib/index.js:59:42)
at /usr/local/lib/node_modules/newman/lib/run/index.js:389:68
at arrayEach (/usr/local/lib/node_modules/newman/node_modules/lodash/lodash.js:516:11)
at Function.forEach (/usr/local/lib/node_modules/newman/node_modules/lodash/lodash.js:9368:14)
at /usr/local/lib/node_modules/newman/lib/run/index.js:346:39
at /usr/local/lib/node_modules/newman/node_modules/postman-runtime/lib/backpack/index.js:58:34
at /usr/local/lib/node_modules/newman/node_modules/postman-runtime/lib/runner/index.js:113:20
at extractRunnableItems (/usr/local/lib/node_modules/newman/node_modules/postman-runtime/lib/runner/extract-runnable-items.js:273:35)
at PostmanCollectionRunner.run (/usr/local/lib/node_modules/newman/node_modules/postman-runtime/lib/runner/index.js:96:9)
at /usr/local/lib/node_modules/newman/lib/run/index.js:160:16
at /usr/local/lib/node_modules/newman/lib/run/options.js:394:9
at wrapper (/usr/local/lib/node_modules/newman/node_modules/async/dist/async.js:268:20)
at /usr/local/lib/node_modules/newman/node_modules/async/dist/async.js:2753:19
at wrapper (/usr/local/lib/node_modules/newman/node_modules/async/dist/async.js:268:20) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: 'templates/htmlreqres.hbs'
}
newman

In report, "Show Failures" does not show Failed Use cases only.

It's a nice report template.

  1. "Show errors" does not show only error tests. It shows all the test names. ( fyi, I do not have any errors in my collection)

  2. There should be an Aggregated report column ( Total no of tests, total failures, total, success). Once you click on number , you should see the error tests.)

parser.js:268 throw new Error(str);

hello
i'm betting the below error can you help me ?

c:\Users\Agent\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:268
throw new Error(str);
^

Error: Parse error on line 795:
...pan class="pl-c1">{{<span class="
-----------------------^
Expecting 'ID', 'STRING', 'NUMBER', 'BOOLEAN', 'UNDEFINED', 'NULL', 'DATA', got 'INVALID'
at Parser.parseError (c:\Users\Agent\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:268:19)
at Parser.parse (c:\Users\Agent\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\parser.js:337:30)
at HandlebarsEnvironment.parse (c:\Users\Agent\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\base.js:46:43)
at compileInput (c:\Users\Agent\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:515:19)
at ret (c:\Users\Agent\AppData\Roaming\npm\node_modules\newman-reporter-html\node_modules\handlebars\dist\cjs\handlebars\compiler\compiler.js:524:18)
at EventEmitter. (c:\Users\Agent\AppData\Roaming\npm\node_modules\newman-reporter-html\lib\index.js:161:22)
at EventEmitter.emit (c:\Users\Agent\AppData\Roaming\npm\node_modules\newman\node_modules\eventemitter3\index.js:203:33)
at done (c:\Users\Agent\AppData\Roaming\npm\node_modules\newman\lib\run\index.js:277:29)
at c:\Users\Agent\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\backpack\index.js:56:34
at PostmanCollectionRun._process (c:\Users\Agent\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\runner\run.js:161:13)
at PostmanCollectionRun. (c:\Users\Agent\AppData\Roaming\npm\node_modules\newman\node_modules\postman-runtime\lib\runner\run.js:166:76)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)

Improve performance

Description
For now, the performance is not good enough (it's possible improve), and current version (v4.0.0) of Bootstrap there are a XSS vulnerability.

All Calls not visible under Requests -> Show All tab for Newman Iteration Requests

Describe the bug
Under The Requests -> Show All tab, only Two Request are visible for Iteration Calls ( I did 3000 Iterations for collection of 2 calls)

Similarly Many Details are missing for the ouput.

To Reproduce
Steps to reproduce the behavior:
Do a Newman Execution with Iterations for a collection having multiple API calls

Expected behavior
As for normal newman execution, Details for all the calls be it in Iteration should be visible clearly.

Screenshots
image

remove JS minified

Today, all logic about control template is in JS minified.

Describe the solution you'd like
Uminify JS.

Showing where the failures occured

Thank you for the template it is very well designed.

I'm currently having a problem that it doesn't tell me where the error occurred. If I'm running multiple iterations with a large data-set and there have been 5 failures it will tell me this but not where the failures occurred like it does in the standard newman HTML reporter.

image

Change widget color

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Add Start and End Widgets

I would like add two new widgets in the report tab, they are Star and End runtime, like:

start end

But in the current format like others widgets

image

Sugestions of colors

Green and Red

Sugestions of icons

Font Awesome clocks

File

htmlreqres.hbs

Others informations

The initial date is at the top in the first card and the final date is the initial date + Total run duration

Capturing error message

Hey the report generated captures the results very well on what failed and what not.
My test have a corresponding error message associated with them , is there a way to capture that as well ? like we do in newman-htmlextra-reported.

Sample test :

pm.test("Validate paymentAttributes is not null", function () {
    const cardNumber = requestData.cardNumber;
    pm.expect(responseData.paymentAttributes.lastFourDigits).to.eql(cardNumber.substring(cardNumber.length-4, cardNumber.length),"Failed validitng lastFourDigits in response");
    pm.expect(responseData.paymentAttributes.binDigits).to.eql(cardNumber.substring(0, 6),"Failed validitng paymentAttributes.binDigits in response");
    pm.expect(responseData.paymentAttributes.binDigits).to.eql(cardNumber.substring(0, 6),"Failed validitng paymentAttributes.binDigits in response");

}

LIke the above test has 3 assertions if anyone of them fails ,it fails the test but its difficult to figure out in the report which assertion failed.
If we capture the error message then that can help.

Same done in newman-htmlextra-reporter
image

Links not working

Hi,

I am using your HBS file in my project and able to generate the test report. I am facing an issue while clicking on the API name to view the details. It is not giving details page, can you please help what I am missing here.

image

Webservice polling (repeat execution) shows first response in report instead of the last

Hi,

I noticed that when implementing some (repeated) web service polling the step response is showing the response of the first step invocation instead of the expected last one.
The polling webservice 'interpretes' the output and repeats itself until a 'asynchronous webservice' status is finished.

Consider this test:

  1. Call some asynchronous webservice A
  2. Poll web service B, which does something like
    a) Wait for 5 secs
    b) Call status asynchronous webservice A
    c) If status Web service A is not 'finished' => goto a) through "postman.setNextRequest(pm.info.requestId);"
    d) Run the tests for step 2

(I do not have a good generic example for above other than mine which does not work in the wild.)

The issue with the report is that the response of web service B is the response of the very first invocation of the polling web service, however the last invocation is of course the one which we are interested in.

Not knowing node or how to actual show the complete test collection output, I assume ALL tests responses are available and the report generation should just be updated to show that last response of the polling service.

Any idea how to start addressing this ?

Thanks, Tran.

Incorrect time displayed for bad response time widget

Describe the bug
Run a few requests with this template and observe the bad response time

To Reproduce

  1. Run any collection using this hbs
  2. Incorrect time displayed under 'Bad Response Time'

Expected behavior
Should display correct time

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.