# UnsupportedOperationException if there are no requests sent during a simulation

**URL:** <https://community.gatling.io/t/unsupportedoperationexception-if-there-are-no-requests-sent-during-a-simulation/5171>\
**Category:** Gatling (Open-Source)\
**Created:** [August 8, 2019, 9:18pm UTC](https://community.gatling.io/t/unsupportedoperationexception-if-there-are-no-requests-sent-during-a-simulation/5171 "2019-08-08T21:18:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jarrowwx](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jarrowwx](https://community.gatling.io/u/jarrowwx)\
**Post date:** [August 8, 2019, 9:18pm UTC](https://community.gatling.io/t/unsupportedoperationexception-if-there-are-no-requests-sent-during-a-simulation/5171/1 "2019-08-08T21:18:00Z")

</div>

I have a collection of library classes that I built to handle certain stuff for me.

I defined unit tests so I could make sure that those classes work correctly.

But since they are a Gatling library, I need to test them in the context of Gatling. So I declared a simulation trait:

trait UnitTest extends Simulation {  
def behavior : ScenarioBuilder

setUp( behavior.inject( atOnceUsers( 1 ) ) )  
.protocols( Default.httpConfig )  
.pauses( if ( Test.usePauses ) exponentialPauses else disabledPauses )  
.assertions( global.failedRequests.count.is( 0 ) )  
}

In Gatling 2.x, this worked fine, even for code that just did assertions to make sure that everything was wired up as intended. Now in 3.2, the test is failing, presumably because the report generator complained about there being no requests generated. Is there a way to suppress that error? Or avoid generating it in the first place?

– John

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [August 8, 2019, 9:21pm UTC](https://community.gatling.io/t/unsupportedoperationexception-if-there-are-no-requests-sent-during-a-simulation/5171/2 "2019-08-08T21:21:04Z")

</div>

Why don’t you just disable reports generation if your run is intended to not generate any request?

---

<div class="post-metadata">

**Author:** ![jarrowwx](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jarrowwx](https://community.gatling.io/u/jarrowwx)\
**Post date:** [August 9, 2019, 3:24pm UTC](https://community.gatling.io/t/unsupportedoperationexception-if-there-are-no-requests-sent-during-a-simulation/5171/3 "2019-08-09T15:24:51Z")

</div>

That’s a great idea. Looking at the SBT plugin docs, I don’t see how to do that. Can you point me to the relevant instructions?

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [August 9, 2019, 10:04pm UTC](https://community.gatling.io/t/unsupportedoperationexception-if-there-are-no-requests-sent-during-a-simulation/5171/4 "2019-08-09T22:04:14Z")

</div>

noReports in conf.

---

<div class="post-metadata">

**Author:** ![jarrowwx](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jarrowwx](https://community.gatling.io/u/jarrowwx)\
**Post date:** [August 11, 2019, 12:14am UTC](https://community.gatling.io/t/unsupportedoperationexception-if-there-are-no-requests-sent-during-a-simulation/5171/5 "2019-08-11T00:14:55Z")

</div>

So there is not a way to turn it off from the command line? I don’t want to avoid producing reports all the time, just when doing UnitTests.

---

<div class="post-metadata">

**Author:** ![Maruf\_Aytekin](https://avatars.discourse-cdn.com/v4/letter/m/9fc348/32.png) [@Maruf\_Aytekin](https://community.gatling.io/u/Maruf_Aytekin)\
**Post date:** [August 11, 2019, 1:05am UTC](https://community.gatling.io/t/unsupportedoperationexception-if-there-are-no-requests-sent-during-a-simulation/5171/6 "2019-08-11T01:05:55Z")

</div>

command line option is **-nr** : [https://gatling.io/docs/current/general/configuration/?highlight=command%20line](https://gatling.io/docs/current/general/configuration/?highlight=command%20line)

-nr –no-reports Runs simulation but does not generate reports

Maruf
