Search code examples
jmeteryamltaurus

In Taurus, How to set "Clear cookies each iteration" to true?


I am trying to clear cookies after each iteration in Taurus yaml.

I tried the solution from below thread but it didn't work: [Google Group] https://groups.google.com/g/codename-taurus/c/wa4xIbxkUYI?pli=1

Above thread says: For reference I did it like this:

    modifications:
      set-prop:
        "Cookies>CookieManager.clearEachIteration": "true"

I have tried the same but didn't work.

Using JMeter I can clear the cookies but need the same behavior for Taurus. Any help.


Solution

  • What do you mean "for Taurus"? Taurus just provides YAML configuration of some of JMeter test elements. The "solution" you're referring is for running existing .jmx script using Taurus

    Taurus doesn't support 100% of JMeter functionality when it comes to building test plan from config, refer the documentation to see what is supported.

    If you want to use some JMeter functionality which is not supported by Taurus the options are in:

    1. Reach out to Taurus developers via the forum you're referencing and ask them to implement the functionality you need
    2. Implement it yourself, Taurus is an open source project
    3. Switch to the existing .jmx script execution
    4. Switch to JMeter and stop using Taurus as a wrapper
    5. Use JR223 Test Elements to perform the removing of cookies, i.e. you could add a JSR223 PreProcessor to the first sampler in the Thread Group and call sampler.getCookieManager().clear() function there where sampler stands for HTTPSamplerBase