Package org.apache.jmeter.assertions

Examples of org.apache.jmeter.assertions.Assertion


  {
    return "assertion";
  }

  public void save(Saveable objectToSave, Writer out) throws IOException {
    Assertion saved = (Assertion)objectToSave;
    out.write("<");
    out.write(getPrimaryTagName());
    out.write(" name=\"");
    out.write(saved.getName());
    out.write("\" class=\"");
    out.write(saved.getClass().getName());
    out.write("\" testType=\"");
    out.write(""+saved.getTestType());
    out.write("\" testField=\"");
    out.write(saved.getTestField());
    out.write("\">");
    writeTestStrings(saved,out);
    out.write("\n</");
    out.write(getPrimaryTagName());
    out.write(">");
View Full Code Here


    private void checkAssertions(List assertions, SampleResult result)
    {
        Iterator iter = assertions.iterator();
        while (iter.hasNext())
        {
          Assertion assertion= (Assertion)iter.next();
          if (assertion instanceof TestBean) ((TestBean)assertion).prepare();
            AssertionResult assertionResult = assertion.getResult(result);
            result.setSuccessful(
                result.isSuccessful()
                    && !(assertionResult.isError() || assertionResult.isFailure()));
            result.addAssertionResult(assertionResult);
        }
View Full Code Here

  private void configureSamplerPackage(SamplePackage ret,SamplerConfigs configs)
  {
    Iterator iter = configs.getAssertions().iterator();
    while(iter.hasNext())
    {
      Assertion assertion = (Assertion)iter.next();
      TestElement cloned = (TestElement)cloneIfNecessary(assertion);
      if(objectsWithFunctions.contains(assertion))
      {
        replaceValues(cloned);
      }
View Full Code Here

    private void checkAssertions(List assertions, SampleResult result)
    {
        Iterator iter = assertions.iterator();
        while (iter.hasNext())
        {
          Assertion assertion= (Assertion)iter.next();
          if (assertion instanceof TestBean) ((TestBean)assertion).prepare();
            AssertionResult assertionResult = assertion.getResult(result);
            result.setSuccessful(
                result.isSuccessful()
                    && !(assertionResult.isError() || assertionResult.isFailure()));
            result.addAssertionResult(assertionResult);
        }
View Full Code Here

  }

  private void checkAssertions(List assertions, SampleResult result) {
    Iterator iter = assertions.iterator();
    while (iter.hasNext()) {
      Assertion assertion = (Assertion) iter.next();
      TestBeanHelper.prepare((TestElement) assertion);
      AssertionResult assertionResult = assertion.getResult(result);
      result.setSuccessful(result.isSuccessful() && !(assertionResult.isError() || assertionResult.isFailure()));
      result.addAssertionResult(assertionResult);
    }
    threadContext.getVariables().put(LAST_SAMPLE_OK, Boolean.toString(result.isSuccessful()));
  }
View Full Code Here

  }

  private void checkAssertions(List assertions, SampleResult result) {
    Iterator iter = assertions.iterator();
    while (iter.hasNext()) {
      Assertion assertion = (Assertion) iter.next();
      TestBeanHelper.prepare((TestElement) assertion);
      AssertionResult assertionResult = assertion.getResult(result);
      result.setSuccessful(result.isSuccessful() && !(assertionResult.isError() || assertionResult.isFailure()));
      result.addAssertionResult(assertionResult);
    }
    threadContext.getVariables().put(LAST_SAMPLE_OK, Boolean.toString(result.isSuccessful()));
  }
View Full Code Here

  }

  private void checkAssertions(List assertions, SampleResult result) {
    Iterator iter = assertions.iterator();
    while (iter.hasNext()) {
      Assertion assertion = (Assertion) iter.next();
      TestBeanHelper.prepare((TestElement) assertion);
      AssertionResult assertionResult = assertion.getResult(result);
      result.setSuccessful(result.isSuccessful() && !(assertionResult.isError() || assertionResult.isFailure()));
      result.addAssertionResult(assertionResult);
    }
    threadContext.getVariables().put(LAST_SAMPLE_OK, Boolean.toString(result.isSuccessful()));
  }
View Full Code Here

    @SuppressWarnings("deprecation") // OK to call TestBeanHelper.prepare()
    private void checkAssertions(List<Assertion> assertions, SampleResult parent, JMeterContext threadContext) {
        Iterator<Assertion> iter = assertions.iterator();
        while (iter.hasNext()) {
            Assertion assertion = iter.next();
            TestBeanHelper.prepare((TestElement) assertion);
            if (assertion instanceof AbstractScopedAssertion){
                AbstractScopedAssertion scopedAssertion = (AbstractScopedAssertion) assertion;
                String scope = scopedAssertion.fetchScope();
                if (scopedAssertion.isScopeParent(scope) || scopedAssertion.isScopeAll(scope) || scopedAssertion.isScopeVariable(scope)){
View Full Code Here

    }

    private void checkAssertions(List assertions, SampleResult parent, JMeterContext threadContext) {
        Iterator iter = assertions.iterator();
        while (iter.hasNext()) {
            Assertion assertion = (Assertion) iter.next();
            TestBeanHelper.prepare((TestElement) assertion);
            if (assertion instanceof AbstractScopedAssertion){
                AbstractScopedAssertion scopedAssertion = (AbstractScopedAssertion) assertion;
                String scope = scopedAssertion.fetchScope();
                if (scopedAssertion.isScopeParent(scope) || scopedAssertion.isScopeAll(scope)){
View Full Code Here

    private void checkAssertions(List assertions, SampleResult result)
    {
        Iterator iter = assertions.iterator();
        while (iter.hasNext())
        {
          Assertion assertion= (Assertion)iter.next();
          if (assertion instanceof TestBean) ((TestBean)assertion).prepare();
            AssertionResult assertionResult = assertion.getResult(result);
            result.setSuccessful(
                result.isSuccessful()
                    && !(assertionResult.isError() || assertionResult.isFailure()));
            result.addAssertionResult(assertionResult);
        }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.assertions.Assertion

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.