I have a few HTTP Request Samplers that I would only like to execute when a certain condition has been met. What I have done is added a BeanShell PreProcessor to the HTTP Request Sampler with the following code
if (${getTeamName}.equals("Test Team") == true)
{
HTTPSampler.setEnabled(false);
}
If the value of getTeamName is Test Team then I want to disable that HTTP Request Sampler, as it doesn't have to be executed then. However it looks like that currently doesn't work.
Is there any one who knows what I'm doing wrong here, or a suggestion to what I should do?