Reports: How to aggregate errors from check statement

I’ve added some checks to my script to compare the response times to a set of SLAs we received from the business.

Most of them use this kind of structure in the code:

val scnMyScenario = scenario(“Get Data”)
.pause(1)
.exec(
http(“MyScenarioGettingData”)
.get("""/path/to/resource""")
.headers(headers_0)
.check(status.is(200))
.check(responseTimeInMillis.lessThanOrEqual(300))
)
.pause(30)

When I review my report, I can see where all response times > 300 milliseconds get listed as unique rows, so I end up with a huge block of rows that all report the same exact error (see screenshot).

This is a bit overwhelming to look at.

Is there something I could do to have all responses that exceed 300 be put into the same group for reporting purposes?

Hi Nadine,

Have you check the Assertion API.
This might me a more convenient way to implement SLA.

Cheers,

Stéphane

@Stephanie

Thanks for that tip. I will check it out today and let you know.

Hey Stephanie:
I found a UserDoc on the Assertion API, but it seems to be for 1.5.6. url> http://gatling.io/docs/1.5.6/user_documentation/reference/assertions.html?highlight=assert

Is the API the same for RC2? Also, is there a complete code example available somewhere?

thanks

@never mind, I found the RC2 docs by digging a bit in the new website. For some reason it was not coming up with regular searches.

link >> http://gatling.io/docs/2.0.0-RC2/general/assertions.html#assertions

It still would be helpful if there was a complete example somewhere; especially one that uses different scopes for the assertions. I think that is going to be most applicable to my use case.

thanks

@never mind, I found the RC2 docs by digging a bit in the new website.

For some reason it was not coming up with regular searches.

You could have simply used the search box located in the banner:
http://gatling.io/docs/2.0.0-RC2/search.html?q=assertion&check_keywords=yes&area=default

Stil, browsing through the documentation is always a good thing once you
start making heavy use of a tool.

It still would be helpful if there was a complete example somewhere;

especially one that uses different scopes for the assertions. I think that
is going to be most applicable to my use case.

Code is not the only way to contribute to an open source project.
Documentation is a great one too.
https://github.com/gatling/gatling/blob/master/CONTRIBUTING.md#submitting-pull-requests
https://github.com/gatling/gatling/tree/master/src/sphinx

Hey Stephanie

I have no idea why only the female version
<http://en.wikipedia.org/wiki/Stéphanie> of my first name made it from
French to English, and not the male one
<http://en.wikipedia.org/wiki/Stéphane>.
Being called Stephanie instead of Stephane over and over again starts
feeling like this <https://www.youtube.com/watch?v=9VDvgL58h_Y>.
This, I might add to the FAQ.

Cheers,

Stéphane

@ Stéphane
LOL — thanks for being a good sport and letting me know I misspelled your name. I’ll never look at spoons the same way again!

I would love to contribute to documentation.

Although I’ve done a bit of work with Gatling, I still feel very much like a “newbie”, but there are some things I think I understand well enough to impart to others. Then again, perhaps when you are working with a cutting edge tool, that “newbie” feeling never fully goes away.

BTW, the search link you gave below for RC2 (highlighted below) leads to http 404. I do remember when I found the RC2 docs for Assertion Api, it was not the main subject being discussed in the page; it was more of a passing reference.

  • Nadine

I would love to contribute to documentation.

We'll add some guidelines for contributing for the documentation.
Basically, it uses rst <http://docutils.sourceforge.net/rst.html>, so the
syntax is fine and it's quite easy to edit the raw files. But then, there's
quite a build chain for generating the html files with all the styles if
you want to check the final result.

In your case, I think that what you're looking for is new entries for the
cookbook.

http://gatling.io/docs/2.0.0-RC3/cookbook/index.html
https://github.com/gatling/gatling/tree/master/src/sphinx/cookbook

BTW, the search link you gave below for RC2 (highlighted below) leads to
http 404. I do remember when I found the RC2 docs for Assertion Api, it
was not the main subject being discussed in the page; it was more of a
passing reference.

Thanks for reporting. We made a mistake and dropped the RC2 doc folder when
we released RC3 yesterday.
Here's the most recent version:
http://gatling.io/docs/2.0.0-RC3/general/assertions.html?highlight=assertions

You'll there's a dedicated page for assertions.

Cheers,

Stéphane

Great! Thanks for the info. I look forward to seeing the guidelines and checking out the cookbook.

If you have some sort of priority queue for documentation items or topics, that would be good too.