postman/newman executor unable to fail the request even if the assertions failed/not met

261 views
Skip to first unread message

paolocan...@gmail.com

unread,
Aug 31, 2018, 5:12:30 PM8/31/18
to codename-taurus
we are trying to use postman collection for simple performance test.
We added text assertions in postman collection as similar to below

pm.test("Body matches string", function (){
    pm.expect(pm.response.text()).to.include("FAILTHETEST");
});


We ran the build and taurus didn't fail it.
NewmanExecutor.ldjson captured that the "status":"FAILED" due to the assertion
but bzt log didn't reflect these failures and still passes the test

Dimitri Pribysh

unread,
Sep 4, 2018, 9:45:20 AM9/4/18
to codenam...@googlegroups.com

Hi,

Thanks for reporting. We also caught this issue this week. We're investigating it and are going to fix it in the next release.


  Dimitri

--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/18bfd5ef-0665-40ab-bbde-25c32b3b36b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dmitri Pribysh

unread,
Sep 6, 2018, 8:25:54 AM9/6/18
to codenam...@googlegroups.com

And it's fixed in master branch.

You can grab the latest snapshot from http://gettaurus.org/docs/DeveloperGuide/#Python-Egg-Snapshots to use the fixed version of Taurus.

Thanks for reporting this one.

paolocan...@gmail.com

unread,
Sep 6, 2018, 11:03:15 AM9/6/18
to codename-taurus
Thank you will check it out

paolocan...@gmail.com

unread,
Sep 26, 2018, 5:40:29 PM9/26/18
to codename-taurus
Hey Dmitri, 

The issue loooks to still be there.
The postman assertions are not recognized by bzt.

The results still shows none of the transactions failed


On Thursday, September 6, 2018 at 8:25:54 AM UTC-4, Dmitri Pribysh wrote:

Dmitri Pribysh

unread,
Sep 27, 2018, 6:27:56 AM9/27/18
to codenam...@googlegroups.com

Hey,

Are you sure you're running Taurus snapshot? Can you share the results and/or postman collection?


  Dimitri

paolocan...@gmail.com

unread,
Sep 27, 2018, 10:25:56 AM9/27/18
to codename-taurus
Hey Dimitri,

Try if you can view here?

I have uploaded the logs. (postman collection included)

NewmanExecutor.ldjson showed that it failed due to assertions
csv and xml reports. Also, the console showed no errors.

Thanks Dimitri

Dmitri Pribysh

unread,
Sep 28, 2018, 8:00:13 AM9/28/18
to codenam...@googlegroups.com
Thanks for providing all the artifacts.

When running Taurus with your config (on the latest taurus@master), i can see bzt recognizing that postman tests failed.
14:46:37 INFO: Request label stats:
┌─────────┬────────┬───────┬────────┬─────────────────────┐
│ label   │ status │  succ │ avg_rt │ error               │
├─────────┼────────┼───────┼────────┼─────────────────────┤
│ FakeAPI │  FAIL  │ 0.00% │  0.070 │ Body matches string │
└─────────┴────────┴───────┴────────┴─────────────────────┘

The return code was 0, because by default Taurus is running in load testing mode, and for load tests a single failing sample is usually not a sufficient reason to have the whole test marked as failed.

If you want Taurus to mark the whole test as failed (and have non-zero exit code) if at least one test has failed, you can write a pass/fail criterion for that. Something like `fail of FakeAPI>0% for 1s, stop as failed` should suffice.

Just for the record, Taurus can also be launched in functional mode with `-func` CLI argument. In this mode Taurus will have non-zero return code if there would be at least 1 failed sample. But i think you would be better off with adding another pass/fail criteria.

paolocan...@gmail.com

unread,
Oct 1, 2018, 5:32:10 PM10/1/18
to codename-taurus
Thanks Dmitri,

bzt-1.13.0.26.tar.gzto be exact. However, mine still shows status OK.
And you mentioned you ran yours from taurus@master, is that the same from the link?

Appreciate your patience

17:24:08 INFO: Request label stats:
+---------+--------+---------+--------+-------+
| label   | status |    succ | avg_rt | error |
+---------+--------+---------+--------+-------+
| FakeAPI |   OK   | 100.00% |  0.096 |       |
+---------+--------+---------+--------+-------+

Dimitri Pribysh

unread,
Oct 2, 2018, 8:12:34 AM10/2/18
to codenam...@googlegroups.com

Yep, it should be the same.

Just for validation, does Taurus print the following line when you launch it?

> INFO: Taurus CLI Tool v1.13.0.26

paolocan...@gmail.com

unread,
Oct 2, 2018, 12:13:43 PM10/2/18
to codename-taurus
Hey Dimitri,

Looks like its something on my machine, used a different machine and got the failed notification
16:10:19 INFO: Request label stats:
┌─────────┬────────┬───────┬────────┬─────────────────────┐
│ label   │ status │  succ │ avg_rt │ error               │
├─────────┼────────┼───────┼────────┼─────────────────────┤
│ FakeAPI │  FAIL  │ 0.00% │  0.053 │ Body matches string │
└─────────┴────────┴───────┴────────┴─────────────────────┘

THANK YOU Dimitri !
really big help

Regards,
Paolo
Reply all
Reply to author
Forward
0 new messages