Coder Social home page Coder Social logo

Comments (7)

hassy avatar hassy commented on September 22, 2024

thanks @milosgajdos! Could you throw a log in there right after the post step just to make sure the capture action is running successfully? Artillery will stop the VU by default if a capture fails, as it's likely that subsequent steps in a flow won't work anyway. Something like:

- post: {} # the post step
- log: "foo_id: {{ foo_id }}" # log
- think: 2 # rest of the flow

Also, are there any capture-related errors being reported in the summary?

from artillery.

hassy avatar hassy commented on September 22, 2024

sorry I missed the log that you also have later in the flow.

What's happening most likely is that the server is responding with something that capture can't process. It might not be returning valid JSON, or JSON in a different shape to what's expected by the JSONPath expression. You can confrm by capturing and printing the entire response:

- post:
    url: '/v1/foo'
    capture:
      json: "$" # grab the entire response
      as: full_response
- log: "{{ full_response }}"

from artillery.

milosgajdos avatar milosgajdos commented on September 22, 2024

You can confrm by capturing and printing the entire response:

I've just done this and literally nothing is being logged 😮‍💨

from artillery.

hassy avatar hassy commented on September 22, 2024

uh oh, that doesn't sound good. Could you try re-running the test with DEBUG=http:response? (https://www.artillery.io/docs/reference/engines/http#print-response-headers-and-body) This will print every response to the terminal and should confirm whether the server isn't sending a response body back, or if there's a bug in capture.

from artillery.

hassy avatar hassy commented on September 22, 2024

I've just done this and literally nothing is being logged 😮‍💨

Also, sorry this is a 🤦 on my part. Of course the log action would not run if the capture failed. Time for a coffee.

You can also try turning off strict capture by setting strict: false attribute on it to run the rest of the steps in the flow.

https://www.artillery.io/docs/reference/engines/http#turn-off-strict-capture

from artillery.

milosgajdos avatar milosgajdos commented on September 22, 2024

Also, sorry this is a 🤦 on my part. Of course the log action would not run if the capture failed

Ok, this is interesting...there is something strange happening in our API 🤔 I need to dig in more. Will report back! Curl calls return the json that does contain the id field, but somehow that fails intermittently which I'm guessing is causing the capture to barf which in turn prevents the next steps from running. Let me dig in more.

from artillery.

milosgajdos avatar milosgajdos commented on September 22, 2024

Ok, false alarm, thanks for the swift answer!

from artillery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.