value post is not a member of io.gatling.http.protocol.HttpProtocolBuilder

51 views
Skip to first unread message

Abraham Hope

unread,
Dec 14, 2021, 1:33:51 AM12/14/21
to Gatling User Group
I started getting this error after I updated the version to 3.7.1 with SBT build. 
Anyone else has this issue? What could be the solution?
Thank you,

slan...@gatling.io

unread,
Dec 14, 2021, 1:36:43 AM12/14/21
to gat...@googlegroups.com
Please share your code.

Le 14 déc. 2021 à 07:33, Abraham Hope <ah...@officespacesoftware.com> a écrit :

I started getting this error after I updated the version to 3.7.1 with SBT build. 
Anyone else has this issue? What could be the solution?
Thank you,

--
You received this message because you are subscribed to the Google Groups "Gatling User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gatling+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gatling/c820f359-1f50-4fa0-a392-c367327d85fcn%40googlegroups.com.

Abraham Hope

unread,
Dec 14, 2021, 8:59:41 AM12/14/21
to Gatling User Group
Sorry. Here is  an example:

 val stackPlans = exec(
    http(getGraphQLName("planningPlatform/stackplans/stackPlans.json"))
      .post("/graphql")
      .headers(graphqlHeader)
      .body(RawFileBody("planningPlatform/stackplans/stackPlans.json"))
      .check(noGraphQLErrors)
  ).pause(pauseMin, pauseMax)

Here is the error I get:

[error] C:\gatling\oss-gatling\src\test\scala\request\VisualDirectoryRequests.scala:56:8: value post is not a member of io.gatling.http.protocol.HttpProtocolBuilder
[error] possible cause: maybe a semicolon is missing before `value post`?                                                      
[error]       .post("/graphql")
[error]        ^   
      

Sébastien BREVET

unread,
Dec 14, 2021, 9:05:09 AM12/14/21
to gat...@googlegroups.com

As requested in this mailing list rules

Provide a Short, Self Contained, Correct (Compilable), Example (see http://sscce.org/)

I assume you let your IDE remove the wildcard import

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

Ensure you have such imports at the beginning of your file!

Cheers!





--

Sébastien BREVET

Backend engineer

   
sbr...@gatling.io
gatling.io
   
facebook twitter linkedin 

Abraham Hope

unread,
Dec 14, 2021, 9:17:24 AM12/14/21
to gat...@googlegroups.com
I have them actually but it was still giving this error message. 
The problem was the method I used to get the graphql names in the http part. When I fixed that method, error is gone. 
The error message was misleading. FYI

Reply all
Reply to author
Forward
0 new messages