Taurus Equiv of Jmeter HTTP Request Defaults

223 views
Skip to first unread message

david...@gmail.com

unread,
Nov 30, 2016, 1:32:31 PM11/30/16
to codename-taurus
Hello Folks, I've been unable to find the answer this on the gettaurus site or google searches. In Jmeter you could add the HTTP Request Defaults configuration controller and set the default server/port as well as params that should be on every request. I'm trying to do that same thing using Taurus.  I have found the default-address option which is global to a scenario, but I'm finding myself repeating that in every scenario, instead I want to set that globally. I have not found anything for params globally, or at the scenario level.

Is this possible to do?

Dimitri Pribysh

unread,
Nov 30, 2016, 4:57:03 PM11/30/16
to david...@gmail.com, codename-taurus

Hello,

All of the following scenario-level settings are applied to all requests inside the scenario: `store-cache`, `store-cookies`, `headers`, `think-time`, `timeout`, `default-address`, `keepalive`, `retrieve-resources`, `content-encoding`. Unfortunately Taurus doesn't provide a way to set these options more globally than per-scenario.

You can probably try to perform this little trick with the `include-scenario` block, though. By using it you can have one scenario that will set the `default-address` and possibly other global options, while keeping actual requests in other scenarios. Here's an example:

```
---
execution:
- executor: jmeter
  hold-for: 1m
  scenario: outer

scenarios:
  outer:
    default-address: http://blazedemo.com
    retrieve-resources: false
    requests:
    - /
    - include-scenario: inner
  inner:
    requests:
    - /reserve.php
```

Of course, this trick won't cover all possible cases, but can still be useful.


  Dmitri

On 30/11/16 21:32, david...@gmail.com wrote:
Hello Folks, I've been unable to find the answer this on the gettaurus site or google searches. In Jmeter you could add the HTTP Request Defaults configuration controller and set the default server/port as well as params that should be on every request. I'm trying to do that same thing using Taurus.  I have found the default-address option which is global to a scenario, but I'm finding myself repeating that in every scenario, instead I want to set that globally. I have not found anything for params globally, or at the scenario level.

Is this possible to do?
--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/4abaee5e-d936-4cde-872f-f84b86134daf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

david...@gmail.com

unread,
Nov 30, 2016, 5:03:40 PM11/30/16
to codename-taurus, david...@gmail.com
Thanks Dimitri the way I'm currently structuring my tests that trick would likely work very well for the default-address, but it doesn't seem like there is a way to do this for body, so I can't use this to ensure a query string param is attached on all requests in the child scenarios it seems?

Dimitri Pribysh

unread,
Nov 30, 2016, 6:02:14 PM11/30/16
to david...@gmail.com, codename-taurus

No, it isn't possible to do that sort of thing (specify additional request parameter at scenario level). It's a shame, as it seems pretty useful.

We'll think of possible ways to add that feature to scenario syntax.


  Dmitri

--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.

Andrey Pokhilko

unread,
Nov 30, 2016, 8:35:32 PM11/30/16
to codenam...@googlegroups.com

I'd offer to use JMeter properties for that. Like this

---

scenarios:

  sample:

    default-address: ${__P(def_addr)}

    requests: ...

execution: ...


modules:

  jmeter:

    properties:

      def_addr: http://aaa.bbb


By that, you should have the centralized place to change default address.



Andrey Pohilko
Chief Scientist
P: +7 (909) 631-21-69
BlazeMeter Inc.

david...@gmail.com

unread,
Nov 30, 2016, 8:55:00 PM11/30/16
to codename-taurus
Thanks Andrey, that is exactly what I've done. I've used the JMeter Property to take in the host, and thanks to Dimitri's suggestion, I've put that in my "outer" scenario, so I only need to set default-address once, and it reads the system property.

Abhijit Sarkar

unread,
Oct 11, 2018, 3:34:27 AM10/11/18
to codename-taurus
How'd this work if I wanted to share common settings across multiple scenarios, possible in multiple files? Does the include-scenario accept a list, and from other included files?

Pokhilko, Andrey

unread,
Oct 18, 2018, 3:57:15 AM10/18/18
to codenam...@googlegroups.com

Hi,

You can specify "- include-scenario: abc" multiple times, because it's all list items.

--

Andrey Pokhilko
Open Source Initiatives Leader
CA
          BlazeMeter

11.10.2018 10:34, Abhijit Sarkar пишет:
CAUTION: This email originated from outside of CA. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Reply all
Reply to author
Forward
0 new messages