artilleryio / artillery

The complete load testing platform. Everything you need for production-grade load tests. Serverless & distributed. Load test with Playwright. Load test HTTP APIs, GraphQL, WebSocket, and more. Use any Node.js module.
https://www.artillery.io
Mozilla Public License 2.0
7.91k stars 505 forks source link

How can I stop Artillery nesting properties containing a "." character? #723

Open Woolfe opened 5 years ago

Woolfe commented 5 years ago

I have an artillery file where one of my requests is defined as so:

{
  "post": {
    "url": "/apps/stash/foo/search",
    "json": {
      "size": 100,
      "from": 0,
      "query": {
        "bool": {
          "must": {
            "nested": {
              "path": "text_analytics.entities.person",
              "query": {
                "bool": {
                  "must": {
                    "match": {
                      "text_analytics.entities.person.text": "Boris Johnson"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

However, when I run this request, the json that gets sent out is this:

{
  "json": {
    "size": 100,
    "from": 0,
    "query": {
      "bool": {
        "must": {
          "nested": {
            "path": "text_analytics.entities.person",
            "query": {
              "bool": {
                "must": {
                  "match": {
                    "text_analytics.entities.person.text": "Boris Johnson",
                    "text_analytics": {
                      "entities": {
                        "person": {
                          "text": "Boris Johnson"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

As you can see, it has added a key to the match object called text_analytics where it has automatically nested objects by splitting on the . character.

How can I stop artillery doing this?

hassy commented 5 years ago

Issue reproduced. Thanks for the bug report @Woolfe! We'll prioritize shipping a fix for this.

grsr commented 2 years ago

Hi - This issue is also affecting some tests we're trying to run. Was a fix for this ever worked out? Thanks!

mdevino commented 3 months ago

Hello, I'm still facing this issue. Do we have a fix?