Use variable in many chain builders


(Java) I created a couple of chainBuilders and I would like to:

  1. get variable from first chain builder
  2. use the variable gathered in first chain build in another chainBuilder

The error I receive is: Failed to build request: No attribute named ‘MY_VARIABLE’ is defined

How to do that?


A ChainBuilder doesn’t do anything by itself. It needs to be attached to a ScenarioBuilder.

Please provide a reproducer as requested here.

Sorry, for being not precise. Here you have example of code.

ChainBuilder request1 =
                            http("Search: products")

    ChainBuilder request2 =
                    http("API oferta")
                            .header("Content-Type", "application/json")

ChainBuilders don’t do anything standalone. The need to be attached to a ScenarioBuilder.
What are you doing exactly?