Hi!, I'm using Newman v3 Cli, and I need to use ssl cert, but it doesnt work, and I don't know why.
Newman Test
โ Search
GET <URL + Parametters sensible data> [200 OK, 18.18KB, 447ms]
โ
โ 'Validation failed: ', null
โ
โ Status code is 200
โ Content-Type is present
โ Valid response schema
โ CreateTransactionInsurance copy
POST <URL> [errored]
โ Status code is 200
2. Content-Type is present
โโโโโโโโโโโโโโโโโโโโโโโโโโโฌ
โ โ executed โ failed โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผ
โ iterations โ 1 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผ
โ requests โ 2 โ 1 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผ
โ test-scripts โ 2 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผ
โ prerequest-scripts โ 0 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผ
โ assertions โ 5 โ 1 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโด
โ total run duration: 708ms โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ total data received: 17.89KB (approx) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ average response time: 447ms โ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
failure detail
1. Error self signed certificate in certificate chain
at request
inside "CreateTransactionInsurance copy" of ""
2. AssertionFailure Content-Type is present
at assertion:2 in test-script
inside "CreateTransactionInsurance copy" of ""
How you can see, there are two request.
But when I try to use the --ssl-client-cert
The newman test shows only that One request was executed.
After the information table shows "path must be a string" message with no more information.
Newman Test
โ Search
GET <URL + Parametters sensible data> [200 OK, 18.18KB, 498ms]
โ
โ 'Validation failed: ', null
โ
โ Status code is 200
โ Content-Type is present
โ Valid response schema
โ CreateTransactionInsurance copy
โโโโโโโโโโโโโโโโโโโโโโโโโโโฌ
โ โ executed โ failed โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผ
โ iterations โ 0 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผ
โ requests โ 1 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผ
โ test-scripts โ 1 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผ
โ prerequest-scripts โ 0 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโผ
โ assertions โ 3 โ 0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโด
โ total run duration: 0ms โ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ total data received: 17.89KB (approx) โ
โโโโโโโโโโโโโโโโโโโโโโโโโ
โ average response time: 498ms โ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
path must be a string
I really don't know what is happening, I need some help. I'm new using postman api and newman cli.
Thanks, and sorry for create an issue.
@estebancoria Your issue (self signed certificate in chain...) can be resolved by including the -k CLI argument in your newman run command (which will disable SSL certificate validation). The final command would be:
newman run 'collections/mycollection.json' -d 'data/mydata.json' -e 'environments/rc.json' --ssl-client-cert mycert.pem -k
Feel free to get back to us if you're facing difficulties ๐
@kunagpal thanks a lot. And sorry.
@estebancoria No worries. Have fun developing with Postman and Newman!
I have pfx certificate so how to deal with it @kunagpal it shows me 'certificate "cert" load error:
Most helpful comment
@estebancoria Your issue (
self signed certificate in chain...) can be resolved by including the-kCLI argument in yournewman runcommand (which will disable SSL certificate validation). The final command would be:Feel free to get back to us if you're facing difficulties ๐