Package com.eviware.soapui.model.testsuite

Examples of com.eviware.soapui.model.testsuite.SamplerTestStep


    public void actionPerformed( ActionEvent e )
    {
      try
      {
        SamplerTestStep previousStep = ( SamplerTestStep )gotoStep.getTestCase().findPreviousStepOfType( gotoStep,
            SamplerTestStep.class );

        if( previousStep != null )
        {
          Response response = previousStep.getTestRequest().getResponse();
          String xml = response == null ? null : response.getContentAsString();
          if( XmlUtils.seemsToBeXml( xml ) )
          {
            expressionArea.setText( XmlUtils.declareXPathNamespaces( xml ) + expressionArea.getText() );
          }
          else
          {
            UISupport.showErrorMessage( "Missing response in previous request step [" + previousStep.getName()
                + "]" );
          }
        }
        else
        {
View Full Code Here


      {
        UISupport.showErrorMessage( "Missing conditions!" );
        return;
      }

      SamplerTestStep previousStep = gotoStep.getTestCase().findPreviousStepOfType( gotoStep, SamplerTestStep.class );

      if( previousStep == null )
      {
        UISupport.showErrorMessage( "Missing previous request step" );
      }
      else
      {
        if( previousStep.getTestRequest().getResponse() == null
            || !XmlUtils.seemsToBeXml( previousStep.getTestRequest().getResponse().getContentAsXml() ) )
        {
          UISupport.showErrorMessage( "Missing response in previous message" );
          return;
        }

        WsdlTestRunContext context = new WsdlTestRunContext( gotoStep );
        GotoCondition target = gotoStep.runConditions( previousStep, context );
        if( target == null )
        {
          logList.addLine( "No condition true for current response in [" + previousStep.getName() + "]" );
        }
        else
        {
          logList.addLine( "Condition triggered for go to [" + target.getTargetStep() + "]" );
        }
View Full Code Here

          "Runs the current condition against the previous response and shows the result" );
    }

    public void actionPerformed( ActionEvent e )
    {
      SamplerTestStep previousStep = gotoStep.getTestCase().findPreviousStepOfType( gotoStep, SamplerTestStep.class );

      if( previousStep == null )
      {
        UISupport.showErrorMessage( "Missing previous request step" );
      }
      else
      {
        if( previousStep.getTestRequest().getResponse() == null
            || !XmlUtils.seemsToBeXml( previousStep.getTestRequest().getResponse().getContentAsXml() ) )
        {
          UISupport
              .showErrorMessage( "Missing response in previous request step [" + previousStep.getName() + "]" );
          return;
        }

        try
        {
          GotoCondition condition = gotoStep.getConditionAt( conditionList.getSelectedIndex() );
          WsdlTestRunContext context = new WsdlTestRunContext( gotoStep );
          boolean evaluate = condition.evaluate( previousStep, context );
          if( !evaluate )
          {
            UISupport.showInfoMessage( "Condition not true for current response in [" + previousStep.getName()
                + "]" );
          }
          else
          {
            UISupport.showInfoMessage( "Condition true for current response in [" + previousStep.getName() + "]" );
          }
        }
        catch( Exception e1 )
        {
          UISupport.showErrorMessage( "Error checking condition: " + e1.getMessage() );
View Full Code Here

    WsdlTestStepResult result = new WsdlTestStepResult( this );
    canceled = false;

    result.startTimer();

    SamplerTestStep previousStep = getTestCase().findPreviousStepOfType( this, SamplerTestStep.class );

    if( previousStep == null )
    {
      result.stopTimer();
      result.addMessage( "Failed to find previous request step from [" + getName() + "]" );
View Full Code Here

            putValue(Action.SHORT_DESCRIPTION, "Declare available response namespaces in condition expression");
        }

        public void actionPerformed(ActionEvent e) {
            try {
                SamplerTestStep previousStep = (SamplerTestStep) gotoStep.getTestCase().findPreviousStepOfType(gotoStep,
                        SamplerTestStep.class);

                if (previousStep != null) {
                    Response response = previousStep.getTestRequest().getResponse();
                    String xml = response == null ? null : response.getContentAsString();
                    if (XmlUtils.seemsToBeXml(xml)) {
                        expressionArea.setText(XmlUtils.declareXPathNamespaces(xml) + expressionArea.getText());
                    } else {
                        UISupport.showErrorMessage("Missing response in previous request step [" + previousStep.getName()
                                + "]");
                    }
                } else {
                    UISupport.showErrorMessage("Missing previous request step");
                }
View Full Code Here

            if (listModel.getSize() == 0) {
                UISupport.showErrorMessage("Missing conditions!");
                return;
            }

            SamplerTestStep previousStep = gotoStep.getTestCase().findPreviousStepOfType(gotoStep, SamplerTestStep.class);

            if (previousStep == null) {
                UISupport.showErrorMessage("Missing previous request step");
            } else {
                if (previousStep.getTestRequest().getResponse() == null
                        || !XmlUtils.seemsToBeXml(previousStep.getTestRequest().getResponse().getContentAsXml())) {
                    UISupport.showErrorMessage("Missing response in previous message");
                    return;
                }

                WsdlTestRunContext context = new WsdlTestRunContext(gotoStep);
                GotoCondition target = gotoStep.runConditions(previousStep, context);
                if (target == null) {
                    logList.addLine("No condition true for current response in [" + previousStep.getName() + "]");
                } else {
                    logList.addLine("Condition triggered for go to [" + target.getTargetStep() + "]");
                }

                inspectorPanel.setCurrentInspector("Log");
View Full Code Here

            putValue(Action.SHORT_DESCRIPTION,
                    "Runs the current condition against the previous response and shows the result");
        }

        public void actionPerformed(ActionEvent e) {
            SamplerTestStep previousStep = gotoStep.getTestCase().findPreviousStepOfType(gotoStep, SamplerTestStep.class);

            if (previousStep == null) {
                UISupport.showErrorMessage("Missing previous request step");
            } else {
                if (previousStep.getTestRequest().getResponse() == null
                        || !XmlUtils.seemsToBeXml(previousStep.getTestRequest().getResponse().getContentAsXml())) {
                    UISupport
                            .showErrorMessage("Missing response in previous request step [" + previousStep.getName() + "]");
                    return;
                }

                try {
                    GotoCondition condition = gotoStep.getConditionAt(conditionList.getSelectedIndex());
                    WsdlTestRunContext context = new WsdlTestRunContext(gotoStep);
                    boolean evaluate = condition.evaluate(previousStep, context);
                    if (!evaluate) {
                        UISupport.showInfoMessage("Condition not true for current response in [" + previousStep.getName()
                                + "]");
                    } else {
                        UISupport.showInfoMessage("Condition true for current response in [" + previousStep.getName() + "]");
                    }
                } catch (Exception e1) {
                    UISupport.showErrorMessage("Error checking condition: " + e1.getMessage());
                }
            }
View Full Code Here

        WsdlTestStepResult result = new WsdlTestStepResult(this);
        canceled = false;

        result.startTimer();

        SamplerTestStep previousStep = getTestCase().findPreviousStepOfType(this, SamplerTestStep.class);

        if (previousStep == null) {
            result.stopTimer();
            result.addMessage("Failed to find previous request step from [" + getName() + "]");
            result.setStatus(TestStepStatus.FAILED);
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.testsuite.SamplerTestStep

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.