When running the thread, it goes through the whole flow except for the last BeanShell assertion.
My BeanShell code is:
report = vars.get("status_1");
if (report=="active") {
Failure = true;
FailureMessage = "failed to report";
} else {
Failure = false;
}
What could go wrong?
You are comparing String using
==
you must use.equals()
method to compare them.That is generally true, not just for beanshell, but for most of the java world. Always be careful about how you compare strings. see How do I compare strings in Java?