Wednesday, July 20, 2016

Add Cookie Dynamically in Jmeter Script by using Beanshell Preprocessor

Following is the syntax:


import org.apache.jmeter.protocol.http.control.Cookie;

sampler.getCookieManager().add(new Cookie("Cookiename", "CookieValue", "Hostname", "URL", true, Long.MAX_VALUE));


No comments: