title: jmeter exit code in bash script always returns 0
body: <p>Using <code>jmeter</code> in a bash script, how can I manage that it returns a non zero value if any assertion failed?</p>
  
  <pre><code>jmeter -n -t someFile.jmx
  echo $?
  
  # always returns 0, even if an assertion failed
  </code></pre>
  
  <p>I tried with a <code>Bean Shell Assertion</code> using the script:</p>
  
  <pre><code>if (ResponseCode.equals("200") == false) {
    System.exit(-1);
  }
  </code></pre>
  
  <p>But this does not even return <code>0</code>, it just kills the process (I guess?)</p>
  
  <p>May anyone help me with this?</p>