# How to print values on console

**URL:** <https://community.gatling.io/t/how-to-print-values-on-console/5296>\
**Category:** Gatling (Open-Source)\
**Created:** [October 16, 2019, 11:20am UTC](https://community.gatling.io/t/how-to-print-values-on-console/5296 "2019-10-16T11:20:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jakub\_Obrocki](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@Jakub\_Obrocki](https://community.gatling.io/u/Jakub_Obrocki)\
**Post date:** [October 16, 2019, 11:20am UTC](https://community.gatling.io/t/how-to-print-values-on-console/5296/1 "2019-10-16T11:20:26Z")

</div>

I have a problem with using .exec to print something on console, I have a script

import scala.concurrent.duration.\_

import io.gatling.core.Predef.\_  
import io.gatling.http.Predef.\_  
import io.gatling.jdbc.Predef.\_

class logingood extends Simulation {

val httpProtocol = http  
.baseUrl(“[https://webapi.wage.iteodev.com](https://webapi.wage.iteodev.com)”)  
.inferHtmlResources()  
.userAgentHeader(“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36”)  
.proxy(Proxy(“localhost”, 8888).httpsPort(8888))

val headers\_0 = Map(  
“Accept” → “application/json, text/plain, _/_”,  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”)

val headers\_1 = Map(  
“Access-Control-Request-Headers” → “authorization”,  
“Access-Control-Request-Method” → “GET”,  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”)

val headers\_2 = Map(  
“Accept” → “application/json, text/plain, _/_”,  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”,  
“authorization” → “Bearer ${authToken}”)

val headers\_3 = Map(“Sec-Fetch-Mode” → “no-cors”)

val headers\_7 = Map(  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”,  
“content-type” → “application/x-www-form-urlencoded; charset=UTF-8”)

val uri1 = “[https://api.wage.iteodev.com/signalr](https://api.wage.iteodev.com/signalr)”  
val uri2 = “[https://frontend.iteodev.com/static/media/download-app-headline.a2c2b312.svg](https://frontend.iteodev.com/static/media/download-app-headline.a2c2b312.svg)”

val scn = scenario(“logingood”)  
.exec(http(“request\_0”)  
.post("/api/oauth/token")  
.headers(headers\_0)  
.formParam(“username”, “[test@evxmail.net](mailto:test@evxmail.net)”)  
.formParam(“password”, “Zaq1@wsx”)  
.formParam(“grant\_type”, “password”)  
.check(jsonPath("$…access\_token").exists.saveAs(“authToken”))  
.resources(http(“request\_1”)  
.options("/api/account")  
.headers(headers\_1),  
http(“request\_2”)  
.get("/api/account")  
.headers(headers\_2),  
http(“request\_3”)  
.get(uri2)  
.headers(headers\_3),  
http(“request\_4”)  
.options("/api/conversations/")  
.headers(headers\_1),  
http(“request\_5”)  
.get("/api/conversations/")  
.headers(headers\_2),  
http(“request\_6”)  
.options("/api/notifications")  
.headers(headers\_1),  
http(“request\_7”)  
.get(uri1 + “/negotiate?clientProtocol=1.5&Authorization=Bearer%20${authToken}&connectionData=%5B%7B%22name%22%3A%22livechat%22%7D%5D”)  
.check(regex("""[a-zA-Z0-9=/+]{152}""").find.saveAs(“MyConnectionToken”))  
**.exec( session =\> {**  
**println(“Content of MyConnectionToken:”)**  
**println(session(“MyConnectionToken”).as[String])**  
**session**  
**})**  
.headers(headers\_7),  
http(“request\_8”)  
.get("/api/notifications")  
.headers(headers\_2),  
http(“request\_9”)

.get(uri1 + “/start?transport=serverSentEvents&clientProtocol=1.5&Authorization=Bearer%20${authToken}&connectionToken=${MyConnectionToken}&connectionData=%5B%7B%22name%22%3A%22livechat%22%7D%5D”)  
.headers(headers\_7)))

setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)  
}

But when I run it I got following error

 ![2019-10-16 13_18_28-Cmder.png](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/1X/172617e474eddfa1d8f054a9056933e076b3e88d.png)

How can I use this?

And second question - this script is generated by gatling recorder from har file, should I divide it to smller .exec blocks? If yes how to do this properly?

---

<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:** [October 16, 2019, 11:45am UTC](https://community.gatling.io/t/how-to-print-values-on-console/5296/2 "2019-10-16T11:45:34Z")

</div>

2 things:

First, exec(function) is misplaced. You can’t chain it with an HTTP request inside a resources block.

Then, what you’re trying to doomed to fail. Requests in a resources block are executed concurrently to a certain degree. It’s likely that request\_9 is sent before response of request\_7 is received.  
The recorder tries its best to guess resources blocks but it you need sequential execution, you must move requests out of resources block.  
Starting from request\_7, requests should be in their own exec(), not in resources.

 ![2019-10-16 13_18_28-Cmder.png](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/1X/172617e474eddfa1d8f054a9056933e076b3e88d.png)

---

<div class="post-metadata">

**Author:** ![vishal\_singh](https://avatars.discourse-cdn.com/v4/letter/v/b4bc9f/32.png) [@vishal\_singh](https://community.gatling.io/u/vishal_singh)\
**Post date:** [October 16, 2019, 11:46am UTC](https://community.gatling.io/t/how-to-print-values-on-console/5296/3 "2019-10-16T11:46:31Z")

</div>

You cannot print in exec.  
Please use session to print the value.  
Read about session concepts in gatling.

 ![2019-10-16 13_18_28-Cmder.png](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/1X/172617e474eddfa1d8f054a9056933e076b3e88d.png)

---

<div class="post-metadata">

**Author:** ![Jakub\_Obrocki](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@Jakub\_Obrocki](https://community.gatling.io/u/Jakub_Obrocki)\
**Post date:** [October 16, 2019, 11:54am UTC](https://community.gatling.io/t/how-to-print-values-on-console/5296/4 "2019-10-16T11:54:04Z")

</div>

I changed it to:

val scn = scenario(“logingood”)  
.exec(http(“request\_0”)  
.post("/api/oauth/token")  
.headers(headers\_0)  
.formParam(“username”, “[test@evxmail.net](mailto:test@evxmail.net)”)  
.formParam(“password”, “Zaq1@wsx”)  
.formParam(“grant\_type”, “password”)  
.check(jsonPath("$…access\_token").exists.saveAs(“authToken”))  
.resources(http(“request\_1”)  
.options("/api/account")  
.headers(headers\_1),  
http(“request\_2”)  
.get("/api/account")  
.headers(headers\_2),  
http(“request\_3”)  
.get(uri2)  
.headers(headers\_3),  
http(“request\_4”)  
.options("/api/conversations/")  
.headers(headers\_1),  
http(“request\_5”)  
.get("/api/conversations/")  
.headers(headers\_2),  
http(“request\_6”)  
.options("/api/notifications")  
.headers(headers\_1)))

.exec(http(“request\_7”)  
.get(uri1 + “/negotiate?clientProtocol=1.5&Authorization=Bearer%20${authToken}&connectionData=%5B%7B%22name%22%3A%22livechat%22%7D%5D”)  
.check(regex("""[a-zA-Z0-9=/+]{152}""").find.saveAs(“MyConnectionToken”))  
.headers(headers\_7),  
http(“request\_8”)  
.get("/api/notifications")  
.headers(headers\_2),  
http(“request\_9”)  
.get(uri1 + “/start?transport=serverSentEvents&clientProtocol=1.5&Authorization=Bearer%20${authToken}&connectionToken=${MyConnectionToken}&connectionData=%5B%7B%22name%22%3A%22livechat%22%7D%5D”)  
.headers(headers\_7))

But I got

 ![2019-10-16 13_53_24-Cmder.png](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/1X/c81cfc695ea5fc5903ce958fae48f4462aeb0e93.png)

W dniu środa, 16 października 2019 13:39:34 UTC+2 użytkownik Jakub Obrocki 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:** [October 16, 2019, 11:59am UTC](https://community.gatling.io/t/how-to-print-values-on-console/5296/5 "2019-10-16T11:59:33Z")

</div>

Misplaced parens.

 ![2019-10-16 13_53_24-Cmder.png](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/1X/c81cfc695ea5fc5903ce958fae48f4462aeb0e93.png)

---

<div class="post-metadata">

**Author:** ![Jakub\_Obrocki](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@Jakub\_Obrocki](https://community.gatling.io/u/Jakub_Obrocki)\
**Post date:** [October 16, 2019, 12:01pm UTC](https://community.gatling.io/t/how-to-print-values-on-console/5296/6 "2019-10-16T12:01:26Z")

</div>

Actually I don’t have any print in my scenario, now my problem is that my test doesn’t compile

W dniu środa, 16 października 2019 13:39:34 UTC+2 użytkownik Jakub Obrocki napisał:

---

<div class="post-metadata">

**Author:** ![Jakub\_Obrocki](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@Jakub\_Obrocki](https://community.gatling.io/u/Jakub_Obrocki)\
**Post date:** [October 16, 2019, 12:04pm UTC](https://community.gatling.io/t/how-to-print-values-on-console/5296/7 "2019-10-16T12:04:22Z")

</div>

I’m not sure about that, if yes, where? I think all paerns are placed properly

 ![2019-10-16 14_02_58-C__Gatling_user-files_simulations_logingood.scala - Notepad++.png](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/1X/c5287edb019d8e59d114ddfade534475e560337d.png)

W dniu środa, 16 października 2019 13:39:34 UTC+2 użytkownik Jakub Obrocki 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:** [October 16, 2019, 12:42pm UTC](https://community.gatling.io/t/how-to-print-values-on-console/5296/8 "2019-10-16T12:42:27Z")

</div>

No you don’t.

```auto
import io.gatling.core.Predef._
import io.gatling.http.Predef._

class logingood extends Simulation {

  val httpProtocol = http
    .baseUrl("[https://webapi.wage.iteodev.com](https://webapi.wage.iteodev.com)")
    .inferHtmlResources()
    .userAgentHeader("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36")
    .proxy(Proxy("localhost", 8888).httpsPort(8888))

  val headers_0 = Map(
    "Accept" -> "application/json, text/plain, */*",
    "Origin" -> "[https://frontend.iteodev.com](https://frontend.iteodev.com)",
    "Sec-Fetch-Mode" -> "cors")

  val headers_1 = Map(
    "Access-Control-Request-Headers" -> "authorization",
    "Access-Control-Request-Method" -> "GET",
    "Origin" -> "[https://frontend.iteodev.com](https://frontend.iteodev.com)",
    "Sec-Fetch-Mode" -> "cors")

  val headers_2 = Map(
    "Accept" -> "application/json, text/plain, */*",
    "Origin" -> "[https://frontend.iteodev.com](https://frontend.iteodev.com)",
    "Sec-Fetch-Mode" -> "cors",
    "authorization" -> "Bearer ${authToken}")

  val headers_3 = Map("Sec-Fetch-Mode" -> "no-cors")

  val headers_7 = Map(
    "Origin" -> "[https://frontend.iteodev.com](https://frontend.iteodev.com)",
    "Sec-Fetch-Mode" -> "cors",
    "content-type" -> "application/x-www-form-urlencoded; charset=UTF-8")

  val uri1 = "[https://api.wage.iteodev.com/signalr](https://api.wage.iteodev.com/signalr)"
  val uri2 = "[https://frontend.iteodev.com/static/media/download-app-headline.a2c2b312.svg](https://frontend.iteodev.com/static/media/download-app-headline.a2c2b312.svg)"

  val scn = scenario("logingood")
    .exec(
      http("request_0")
        .post("/api/oauth/token")
        .headers(headers_0)
        .formParam("username", "[test@evxmail.net](mailto:test@evxmail.net)")
        .formParam("password", "Zaq1@wsx")
        .formParam("grant_type", "password")
        .check(jsonPath("$..access_token").exists.saveAs("authToken"))
        .resources(
          http("request_1")
            .options("/api/account")
            .headers(headers_1),
          http("request_2")
            .get("/api/account")
            .headers(headers_2),
          http("request_3")
            .get(uri2)
            .headers(headers_3),
          http("request_4")
            .options("/api/conversations/")
            .headers(headers_1),
          http("request_5")
            .get("/api/conversations/")
            .headers(headers_2),
          http("request_6")
            .options("/api/notifications")
            .headers(headers_1)
        )
    )
    .exec(
      http("request_7")
        .get(uri1 + "/negotiate?clientProtocol=1.5&Authorization=Bearer%20${authToken}&connectionData=%5B%7B%22name%22%3A%22livechat%22%7D%5D")
        .headers(headers_7)
        .check(regex("""[a-zA-Z0-9=\/+]{152}""").find.saveAs("MyConnectionToken"))
    )
    .exec { session =>
      println("Content of MyConnectionToken:")
      println(session("MyConnectionToken").as[String])
      session
    }
    .exec(
      http("request_8")
        .get("/api/notifications")
        .headers(headers_2)
    )
    .exec(
      http("request_9")
        .get(uri1 + "/start?transport=serverSentEvents&clientProtocol=1.5&Authorization=Bearer%20${authToken}&connectionToken=${MyConnectionToken}&connectionData=%5B%7B%22name%22%3A%22livechat%22%7D%5D")
        .headers(headers_7)
    )

  setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
}

```

---

<div class="post-metadata">

**Author:** ![Jakub\_Obrocki](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@Jakub\_Obrocki](https://community.gatling.io/u/Jakub_Obrocki)\
**Post date:** [October 16, 2019, 12:50pm UTC](https://community.gatling.io/t/how-to-print-values-on-console/5296/9 "2019-10-16T12:50:03Z")

</div>

But I removed some code, here is actual:

import scala.concurrent.duration.\_

import io.gatling.core.Predef.\_  
import io.gatling.http.Predef.\_  
import io.gatling.jdbc.Predef.\_

class logingood extends Simulation {

val httpProtocol = http  
.baseUrl(“[https://webapi.wage.iteodev.com](https://webapi.wage.iteodev.com)”)  
.inferHtmlResources()  
.userAgentHeader(“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36”)  
.proxy(Proxy(“localhost”, 8888).httpsPort(8888))

val headers\_0 = Map(  
“Accept” → “application/json, text/plain, _/_”,  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”)

val headers\_1 = Map(  
“Access-Control-Request-Headers” → “authorization”,  
“Access-Control-Request-Method” → “GET”,  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”)

val headers\_2 = Map(  
“Accept” → “application/json, text/plain, _/_”,  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”,  
“authorization” → “Bearer ${authToken}”)

val headers\_3 = Map(“Sec-Fetch-Mode” → “no-cors”)

val headers\_7 = Map(  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”,  
“content-type” → “application/x-www-form-urlencoded; charset=UTF-8”)

val uri1 = “[https://api.wage.iteodev.com/signalr](https://api.wage.iteodev.com/signalr)”  
val uri2 = “[https://frontend.iteodev.com/static/media/download-app-headline.a2c2b312.svg](https://frontend.iteodev.com/static/media/download-app-headline.a2c2b312.svg)”

val scn = scenario(“logingood”)  
.exec(http(“request\_0”)  
.post("/api/oauth/token")  
.headers(headers\_0)  
.formParam(“username”, “[test@evxmail.net](mailto:test@evxmail.net)”)  
.formParam(“password”, “Zaq1@wsx”)  
.formParam(“grant\_type”, “password”)  
.check(jsonPath("$…access\_token").exists.saveAs(“authToken”))  
.resources(http(“request\_1”)  
.options("/api/account")  
.headers(headers\_1),  
http(“request\_2”)  
.get("/api/account")  
.headers(headers\_2),  
http(“request\_3”)  
.get(uri2)  
.headers(headers\_3),  
http(“request\_4”)  
.options("/api/conversations/")  
.headers(headers\_1),  
http(“request\_5”)  
.get("/api/conversations/")  
.headers(headers\_2),  
http(“request\_6”)  
.options("/api/notifications")  
.headers(headers\_1)))

.exec(http(“request\_7”)  
.get(uri1 + “/negotiate?clientProtocol=1.5&Authorization=Bearer%20${authToken}&connectionData=%5B%7B%22name%22%3A%22livechat%22%7D%5D”)  
.headers(headers\_7),  
http(“request\_8”)  
.get("/api/notifications")  
.headers(headers\_2),  
http(“request\_9”)  
.get(uri1 + “/start?transport=serverSentEvents&clientProtocol=1.5&Authorization=Bearer%20${authToken}&connectionToken=${MyConnectionToken}&connectionData=%5B%7B%22name%22%3A%22livechat%22%7D%5D”)  
.headers(headers\_7))

setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)  
}

W dniu środa, 16 października 2019 13:39:34 UTC+2 użytkownik Jakub Obrocki napisał:

---

<div class="post-metadata">

**Author:** ![Jakub\_Obrocki](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@Jakub\_Obrocki](https://community.gatling.io/u/Jakub_Obrocki)\
**Post date:** [October 17, 2019, 7:35am UTC](https://community.gatling.io/t/how-to-print-values-on-console/5296/10 "2019-10-17T07:35:02Z")

</div>

Does anybody have an idea why following code

import scala.concurrent.duration.\_

import io.gatling.core.Predef.\_  
import io.gatling.http.Predef.\_  
import io.gatling.core.structure.{ChainBuilder, ScenarioBuilder}  
import io.gatling.commons.validation.\_

class logingood extends Simulation {

val httpProtocol = http  
.baseUrl(“[https://webapi.wage.iteodev.com](https://webapi.wage.iteodev.com)”)  
.inferHtmlResources()  
.userAgentHeader(“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36”)  
.proxy(Proxy(“localhost”, 8888).httpsPort(8888))

val headers\_0 = Map(  
“Accept” → “application/json, text/plain, _/_”,  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”)

val headers\_1 = Map(  
“Access-Control-Request-Headers” → “authorization”,  
“Access-Control-Request-Method” → “GET”,  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”)

val headers\_2 = Map(  
“Accept” → “application/json, text/plain, _/_”,  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”,  
“authorization” → “Bearer ${authToken}”)

val headers\_3 = Map(“Sec-Fetch-Mode” → “no-cors”)

val headers\_7 = Map(  
“Origin” → “[https://frontend.iteodev.com](https://frontend.iteodev.com)”,  
“Sec-Fetch-Mode” → “cors”,  
“content-type” → “application/x-www-form-urlencoded; charset=UTF-8”)

val uri1 = “[https://api.wage.iteodev.com/signalr](https://api.wage.iteodev.com/signalr)”  
val uri2 = “[https://frontend.iteodev.com/static/media/download-app-headline.a2c2b312.svg](https://frontend.iteodev.com/static/media/download-app-headline.a2c2b312.svg)”

val scn = scenario(“logingood”)  
.exec(http(“request\_0”)  
.post("/api/oauth/token")  
.headers(headers\_0)  
.formParam(“username”, “[test@evxmail.net](mailto:test@evxmail.net)”)  
.formParam(“password”, “Zaq1@wsx”)  
.formParam(“grant\_type”, “password”)  
.check(jsonPath("$…access\_token").exists.saveAs(“authToken”))  
.resources(http(“request\_1”)  
.options("/api/account")  
.headers(headers\_1),  
http(“request\_2”)  
.get("/api/account")  
.headers(headers\_2),  
http(“request\_3”)  
.get(uri2)  
.headers(headers\_3),  
http(“request\_4”)  
.options("/api/conversations/")  
.headers(headers\_1),  
http(“request\_5”)  
.get("/api/conversations/")  
.headers(headers\_2),  
http(“request\_6”)  
.options("/api/notifications")  
.headers(headers\_1)))

.exec(http(“request\_7”)  
.get(uri1 + “/negotiate?clientProtocol=1.5&Authorization=Bearer%20${authToken}&connectionData=%5B%7B%22name%22%3A%22livechat%22%7D%5D”)  
.headers(headers\_7),  
http(“request\_8”)  
.get("/api/notifications")  
.headers(headers\_2),  
http(“request\_9”)  
.get(uri1 + “/start?transport=serverSentEvents&clientProtocol=1.5&Authorization=Bearer%20${authToken}&connectionToken=${MyConnectionToken}&connectionData=%5B%7B%22name%22%3A%22livechat%22%7D%5D”)  
.headers(headers\_7))

setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)  
}

throws following error

GATLING\_HOME is set to “C:\Gatling”  
JAVA = ““C:\Program Files\Java\jdk-12\bin\java.exe””  
09:34:03.518 [ERROR] i.g.c.ZincCompiler$ - C:\Gatling\user-files\simulations\logingood.scala:74:21: type mismatch;  
found : io.gatling.http.request.builder.HttpRequestBuilder  
required: io.gatling.core.structure.Execs[_]  
.headers(headers\_7),  
^  
09:34:03.527 [ERROR] i.g.c.ZincCompiler$ - C:\Gatling\user-files\simulations\logingood.scala:77:21: type mismatch;  
found : io.gatling.http.request.builder.HttpRequestBuilder  
required: io.gatling.core.structure.Execs[_]  
.headers(headers\_2),  
^  
09:34:03.528 [ERROR] i.g.c.ZincCompiler$ - C:\Gatling\user-files\simulations\logingood.scala:80:21: type mismatch;  
found : io.gatling.http.request.builder.HttpRequestBuilder  
required: io.gatling.core.structure.Execs[\_]  
.headers(headers\_7))  
^  
09:34:03.620 [ERROR] i.g.c.ZincCompiler$ - three errors found  
09:34:03.626 [ERROR] i.g.c.ZincCompiler$ - Compilation crashed  
sbt.internal.inc.CompileFailed: null  
at sbt.internal.inc.AnalyzingCompiler.call(AnalyzingCompiler.scala:253)  
at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:122)  
at sbt.internal.inc.AnalyzingCompiler.compile(AnalyzingCompiler.scala:95)  
at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$4(MixedAnalyzingCompiler.scala:91)  
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23)  
at sbt.internal.inc.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:186)  
at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$3(MixedAnalyzingCompiler.scala:82)  
at sbt.internal.inc.MixedAnalyzingCompiler.$anonfun$compile$3$adapted(MixedAnalyzingCompiler.scala:77)  
at sbt.internal.inc.JarUtils$.withPreviousJar(JarUtils.scala:215)  
at sbt.internal.inc.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:77)  
at sbt.internal.inc.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:146)  
at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1(IncrementalCompilerImpl.scala:343)  
at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileInternal$1$adapted(IncrementalCompilerImpl.scala:343)  
at sbt.internal.inc.Incremental$.doCompile(Incremental.scala:120)  
at sbt.internal.inc.Incremental$.$anonfun$compile$4(Incremental.scala:100)  
at sbt.internal.inc.IncrementalCommon.recompileClasses(IncrementalCommon.scala:180)  
at sbt.internal.inc.IncrementalCommon.cycle(IncrementalCommon.scala:98)  
at sbt.internal.inc.Incremental$.$anonfun$compile$3(Incremental.scala:102)  
at sbt.internal.inc.Incremental$.manageClassfiles(Incremental.scala:155)  
at sbt.internal.inc.Incremental$.compile(Incremental.scala:92)  
at sbt.internal.inc.IncrementalCompile$.apply(Compile.scala:75)  
at sbt.internal.inc.IncrementalCompilerImpl.compileInternal(IncrementalCompilerImpl.scala:348)  
at sbt.internal.inc.IncrementalCompilerImpl.$anonfun$compileIncrementally$1(IncrementalCompilerImpl.scala:301)  
at sbt.internal.inc.IncrementalCompilerImpl.handleCompilationError(IncrementalCompilerImpl.scala:168)  
at sbt.internal.inc.IncrementalCompilerImpl.compileIncrementally(IncrementalCompilerImpl.scala:248

at sbt.internal.inc.IncrementalCompilerImpl.compile(IncrementalCompilerImpl.scala:74)  
at io.gatling.compiler.ZincCompiler$.doCompile(ZincCompiler.scala:210)  
at io.gatling.compiler.ZincCompiler$.delayedEndpoint$io$gatling$compiler$ZincCompiler$1(ZincCompiler.scala:215)  
at io.gatling.compiler.ZincCompiler$delayedInit$body.apply(ZincCompiler.scala:39)  
at scala.Function0.apply$mcV$sp(Function0.scala:39)  
at scala.Function0.apply$mcV$sp$(Function0.scala:39)  
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)  
at scala.App.$anonfun$main$1$adapted(App.scala:80)  
at scala.collection.immutable.List.foreach(List.scala:392)  
at scala.App.main(App.scala:80)  
at scala.App.main$(App.scala:78)  
at io.gatling.compiler.ZincCompiler$.main(ZincCompiler.scala:39)  
at io.gatling.compiler.ZincCompiler.main(ZincCompiler.scala)  
Java HotSpot™ 64-Bit Server VM warning: Ignoring option AggressiveOpts; support was removed in 12.0  
Choose a simulation number:  
W dniu środa, 16 października 2019 13:39:34 UTC+2 użytkownik Jakub Obrocki napisał:
