question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Core: Request build failures are not accounted by assertions

See original GitHub issue

When running Gatling from sbt tests will be reported as sucess, even if some of requests failed to build:

Failed to build request Customer trays to end conversation: ur      1 (100,0%)
l io.gatling.core.session.el.ElCompiler$$$Lambda$289/212248733...
.....
[info] Simulation(s) execution ended.
[success] Total time: 7 s, completed 2017-12-21 16:05:22
...
   http("Customer trays to end conversation")
      .delete("conversation/${CID}")
  ).assertions(forAll.failedRequests.count.is(0))

Requests failed to build should mark whole scenario as failed.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
johnmartelcommented, Nov 6, 2021

@ejayaraman @agaal’s workaround works well in a functional testing scenario, since all HTTP requests are known in advance, at least it did fix the issue at hand here in my specific case.

1reaction
agaalcommented, May 5, 2021

Hi,

for this a workaround is used by asserting the expected number of tests.

  setUp(scn.inject(ssers))
    .protocols(httpProtocol)
    .assertions(assertForFailedRequest, global.allRequests.count.is(8))
}

It would be great to have an in-built solution to assert items where the test could not be built due to missing parameters.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Integration tests in ASP.NET Core | Microsoft Learn
The Assert test step is executed: The actual response is validated as a pass or fail based on an expected response. The process...
Read more >
Grouping Assertions in Tests | Blog - Ardalis
Clearly in this case, any tests that were expecting property values to be properly initialized from the constructor will fail. And in fact,...
Read more >
Model assertion - Ubuntu
The model assertion is a text-based document that contains the fundamental definition of a snap-based device. It describes what the system image includes...
Read more >
Integration Testing in ASP.NET Core - Code Maze
NET Core Web API program and learn how to create a full ... it means that the request is not successful, and the...
Read more >
When should I use Debug.Assert()? - Stack Overflow
Asserts should not be used to detect unexpected environmental conditions (which are outside the control of the code) e.g. out of memory, network...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found