# Gatling exec scenario not shown in report

**URL:** <https://community.gatling.io/t/gatling-exec-scenario-not-shown-in-report/5394>\
**Category:** Gatling (Open-Source)\
**Created:** [December 10, 2019, 12:21pm UTC](https://community.gatling.io/t/gatling-exec-scenario-not-shown-in-report/5394 "2019-12-10T12:21:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maciej\_Mrozek](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Maciej\_Mrozek](https://community.gatling.io/u/Maciej_Mrozek)\
**Post date:** [December 10, 2019, 12:21pm UTC](https://community.gatling.io/t/gatling-exec-scenario-not-shown-in-report/5394/1 "2019-12-10T12:21:48Z")

</div>

HI \*,

I have defined following scenario:

reader is java written jms queue reader

`

val scnReadMessage = scenario(“Read messages”).exec{ session =\>  
if (session != null) {  
reader.readSingleMessageFromQueue()  
}  
session  
}

`

the executions are logged in .log file:

`

```auto
REQUEST Load testing xyz1 81 xyz1 1575971760934 1575971760951 OK       
USER Load testing xyz1 81 END 1575971760934 1575971760951
USER Load testing xyz1 81 START 1575971760934 1575971760934
USER Read messages 22 END 1575971760926 1575971760953
USER Read messages 22 START 1575971760926 1575971760926
REQUEST Load testing xyz2 82 xyz2 1575971760952 1575971760966 OK       

```

```auto
USER Load testing xyz2 82 END 1575971760952 1575971760966
USER Load testing xyz2 82 START 1575971760952 1575971760952

```

`

but the report file doesnt show this particular test scenario. What I am doing wrong?

here is the setup:

`

setUp(  
…  
xyz1.inject(constantUsersPerSec(msgPerSeconds) during (duration)).protocols(jmsConfig),  
scnReadMessage.inject(constantUsersPerSec(msgPerSeconds) during (duration)).protocols(jmsConfig)  
)

`

Thanks in advance for suggestions

---

<div class="post-metadata">

**Author:** ![Akash\_Chavan](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@Akash\_Chavan](https://community.gatling.io/u/Akash_Chavan)\
**Post date:** [December 10, 2019, 12:48pm UTC](https://community.gatling.io/t/gatling-exec-scenario-not-shown-in-report/5394/2 "2019-12-10T12:48:00Z")

</div>

Hey Maciej,

Can you comment xyz1 and try it. It will give you a clear picture of what’s going on inside the scnReadMessage scenario.

setUp(  
…  
[//xyz1.inject](https://xyz1.inject)(constantUsersPerSec(msgPerSeconds) during (duration)).protocols(jmsConfig),  
scnReadMessage.inject(constantUsersPerSec(msgPerSeconds) during (duration)).protocols(jmsConfig)  
)

---

<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:** [December 10, 2019, 1:09pm UTC](https://community.gatling.io/t/gatling-exec-scenario-not-shown-in-report/5394/3 "2019-12-10T13:09:06Z")

</div>

I’m not sure what you expect to be logged here.  
What’s for sure is that you can’t execute some arbitrary code in an exec block and expect it to magically generate some Gatling stats.  
Only Gatling components do so.

---

<div class="post-metadata">

**Author:** ![Maciej\_Mrozek](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Maciej\_Mrozek](https://community.gatling.io/u/Maciej_Mrozek)\
**Post date:** [December 10, 2019, 1:50pm UTC](https://community.gatling.io/t/gatling-exec-scenario-not-shown-in-report/5394/4 "2019-12-10T13:50:47Z")

</div>

I’m expecting exactly the same statistics to be generated with custom code, in my example with reading jms messages method, since gatling doesn’t support that. Can I somehow manage my case with gatling?

W dniu wtorek, 10 grudnia 2019 14:09:38 UTC+1 użytkownik Stéphane Landelle napisał:

---

<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:** [December 10, 2019, 1:58pm UTC](https://community.gatling.io/t/gatling-exec-scenario-not-shown-in-report/5394/5 "2019-12-10T13:58:51Z")

</div>

> I’m expecting exactly the same statistics to be generated with custom code

Nope

> since gatling doesn’t support that. Can I somehow manage my case with gatling?

Best way is to contribute.

---

<div class="post-metadata">

**Author:** ![Maciej\_Mrozek](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Maciej\_Mrozek](https://community.gatling.io/u/Maciej_Mrozek)\
**Post date:** [December 10, 2019, 2:40pm UTC](https://community.gatling.io/t/gatling-exec-scenario-not-shown-in-report/5394/6 "2019-12-10T14:40:27Z")

</div>

Thank you, I will concider your suggestion (since the execution times are already logged, it must be very much to do 🙂 )

Regards,  
Maciej

W dniu wtorek, 10 grudnia 2019 14:59:23 UTC+1 użytkownik Stéphane Landelle napisał:
