Package com.eviware.soapui.impl.wsdl.teststeps

Examples of com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStepResult


          try
          {
            testRunLog.clear();
            MockTestRunner mockTestRunner = new MockTestRunner( testStep.getTestCase(), SoapUI.ensureGroovyLog() );
            WsdlTestStepResult result = ( WsdlTestStepResult )testStep.run( mockTestRunner,
                new MockTestRunContext( mockTestRunner, testStep ) );

            Throwable er = result.getError();
            if( er != null )
            {
              UISupport.showErrorMessage( er.toString() );
            }
          }
View Full Code Here


        failedTests.remove( ( ( WsdlTestStep )assertable ).getTestCase() );

      buf.append( assertion.getName() + " in [" + assertable.getModelItem().getName() + "] failed;\n" );
      buf.append( Arrays.toString( assertion.getErrors() ) + "\n" );

      WsdlTestStepResult result = assertionResults.get( assertion );
      StringWriter stringWriter = new StringWriter();
      PrintWriter writer = new PrintWriter( stringWriter );
      result.writeTo( writer );
      buf.append( stringWriter.toString() );
    }

    while( !failedTests.isEmpty() )
    {
View Full Code Here

      }
    }

    public TestStepResult run( TestCaseRunner testRunner, TestCaseRunContext testRunContext )
    {
      return new WsdlTestStepResult( this );
    }
View Full Code Here

      {
        public void run()
        {
          MockTestRunner mockTestRunner = new MockTestRunner( groovyStep.getTestCase(), logger );
          statusBar.setIndeterminate( true );
          WsdlTestStepResult result = ( WsdlTestStepResult )groovyStep.run( mockTestRunner,
              new MockTestRunContext( mockTestRunner, groovyStep ) );
          statusBar.setIndeterminate( false );

          Throwable er = result.getError();
          if( er != null )
          {
            String message = er.getMessage();

            // ugly...
            editor.selectError( message );

            UISupport.showErrorMessage( er.toString() );
            editor.requestFocus();
          }
          else if( result.getMessages().length > 0 )
          {
            UISupport.showInfoMessage( StringUtils.join( result.getMessages(), "\n" ) );
          }
        }
      } );
    }
View Full Code Here

                    testStep.addTestRunListener(testRunListener);

                    try {
                        testRunLog.clear();
                        MockTestRunner mockTestRunner = new MockTestRunner(testStep.getTestCase(), SoapUI.ensureGroovyLog());
                        WsdlTestStepResult result = (WsdlTestStepResult) testStep.run(mockTestRunner,
                                new MockTestRunContext(mockTestRunner, testStep));

                        Throwable er = result.getError();
                        if (er != null) {
                            UISupport.showErrorMessage(er.toString());
                        }
                    } catch (Throwable t) {
                        UISupport.showErrorMessage(t);
View Full Code Here

                setIcon(UISupport.createImageIcon(iconPath));
            }
        }

        public TestStepResult run(TestCaseRunner testRunner, TestCaseRunContext testRunContext) {
            return new WsdlTestStepResult(this);
        }
View Full Code Here

        public void actionPerformed(ActionEvent e) {
            SoapUI.getThreadPool().execute(new Runnable() {
                public void run() {
                    MockTestRunner mockTestRunner = new MockTestRunner(groovyStep.getTestCase(), logger);
                    statusBar.setIndeterminate(true);
                    WsdlTestStepResult result = (WsdlTestStepResult) groovyStep.run(mockTestRunner,
                            new MockTestRunContext(mockTestRunner, groovyStep));
                    statusBar.setIndeterminate(false);

                    Throwable er = result.getError();
                    if (er != null) {
                        String message = er.getMessage();

                        // ugly...
                        editor.selectError(message);

                        UISupport.showErrorMessage(StringUtils.join(result.getMessages(), "\n"));
                        editor.requestFocus();
                    } else if (result.getMessages().length > 0) {
                        UISupport.showInfoMessage(StringUtils.join(result.getMessages(), "\n"));
                    }
                }
            });
        }
View Full Code Here

            }

            buf.append(assertion.getName() + " in [" + assertable.getModelItem().getName() + "] failed;\n");
            buf.append(Arrays.toString(assertion.getErrors()) + "\n");

            WsdlTestStepResult result = assertionResults.get(assertion);
            StringWriter stringWriter = new StringWriter();
            PrintWriter writer = new PrintWriter(stringWriter);
            result.writeTo(writer);
            buf.append(stringWriter.toString());
        }

        while (!failedTests.isEmpty()) {
            buf.append("TestCase [" + failedTests.remove(0).getName() + "] failed without assertions\n");
View Full Code Here

  /* (non-Javadoc)
   * @see com.eviware.soapui.model.testsuite.TestStep#run(com.eviware.soapui.model.testsuite.TestCaseRunner, com.eviware.soapui.model.testsuite.TestCaseRunContext)
   */
  @Override
  public TestStepResult run(TestCaseRunner testRunner, TestCaseRunContext testRunContext) {
    WsdlTestStepResult testStepResult = new WsdlTestStepResult(this);
    testStepResult.startTimer();
    try {
      String expandedExpression = testRunContext.expand(getExpression());
      double numResult = evaluator.evaluate(expandedExpression);
      setResult(numResult);
      testStepResult.setStatus(TestStepStatus.OK);
    } catch (EvaluationException e) {
      testStepResult.setStatus(TestStepStatus.FAILED);
      testStepResult.setError(e);
    } finally {
      testStepResult.stopTimer();
    }
    return testStepResult;
  }
View Full Code Here

    putValue(Action.SHORT_DESCRIPTION, "Evaluates the given expression");
  }

  @Override
  public void actionPerformed(ActionEvent evt) {
    WsdlTestStepResult result = new WsdlTestStepResult(testStep);
    result.startTimer();
    TestCaseRunContext context = new MockTestRunContext(new MockTestRunner(testStep.getTestCase()), testStep);
    MockTestRunner runner = new MockTestRunner(testStep.getTestCase());
    try {
      testStep.run(runner, context);
    } finally {
      result.stopTimer();
    }
  }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStepResult

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.