Package com.eviware.soapui.model.testsuite

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


  {
    List<XPathReference> result = new ArrayList<XPathReference>();

    for( SecurityCheckedParameter param : getParameterHolder().getParameterList() )
    {
      TestStep t = getTestStep();
      if( t instanceof WsdlTestRequestStep )
      {
        if( param != null )
          result.add( new XPathReferenceImpl( "SecurityScan Parameter " + param.getLabel() + " in \""
              + getTestStep().getName() + "\"", ( ( WsdlTestRequestStep )t ).getOperation(), true, param,
View Full Code Here


    {
      SecurityTest newSecurityTest = addNewSecurityTest( secTest.getName() );
      for( int i = 0; i < oldTestCase.getTestStepList().size(); i++ )

      {
        TestStep oldStep = oldTestCase.getTestStepAt( i );
        TestStep newStep = getTestStepAt( i );
        for( SecurityScan secCheck : secTest.getTestStepSecurityScans( oldStep.getId() ) )
        {
          newSecurityTest.importSecurityScan( newStep, secCheck, true );
        }
      }
View Full Code Here

  }

  @Override
  protected int runCurrentTestStep( WsdlTestRunContext runContext, int currentStepIndex )
  {
    TestStep currentStep = runContext.getCurrentStep();
    if( !currentStep.isDisabled() )
    {
      TestStepResult stepResult = runTestStep( currentStep, true, true );
      if( stepResult == null )
        return -2;
View Full Code Here

    return testRunner;
  }

  public Object getProperty( String testStepName, String propertyName )
  {
    TestStep testStep = getTestCase().getTestStepByName( testStepName );
    return testStep == null ? null : testStep.getPropertyValue( propertyName );
  }
View Full Code Here

  }

  public Object getProperty( String name )
  {
    WsdlTestCase testCase = ( WsdlTestCase )getTestCase();
    TestStep testStep = currentStepIndex >= 0 && currentStepIndex < testCase.getTestStepCount() ? testCase
        .getTestStepAt( currentStepIndex ) : null;

    return getProperty( name, testStep, testCase );
  }
View Full Code Here

    endpointSet.add( USE_CURRENT );

    for( int c = 0; c < testCase.getTestStepCount(); c++ )
    {
      TestStep step = testCase.getTestStepAt( c );
      if( step instanceof HttpRequestTestStep )
      {
        HttpRequestTestStep requestStep = ( HttpRequestTestStep )step;
        Operation operation = requestStep.getTestRequest().getOperation();
        if( operation != null )
        {
          String[] endpoints = operation.getInterface().getEndpoints();
          for( int i = 0; i < endpoints.length; i++ )
          {
            endpointSet.add( endpoints[i] );
          }
        }
        currentEndpointSet.add( requestStep.getTestRequest().getEndpoint() );
      }
    }

    String selected = ( String )UISupport.prompt( "Select endpoint to set for all requests", "Set Endpoint",
        endpointSet.toArray(), currentEndpointSet.size() == 1 ? currentEndpointSet.iterator().next() : USE_CURRENT );

    if( selected == null || selected.equals( USE_CURRENT ) )
      return;

    int cnt = 0;

    for( int c = 0; c < testCase.getTestStepCount(); c++ )
    {
      TestStep step = testCase.getTestStepAt( c );
      if( step instanceof HttpRequestTestStep )
      {
        HttpRequestTestStep requestStep = ( HttpRequestTestStep )step;
        TestRequest testRequest = requestStep.getTestRequest();
View Full Code Here

    public void actionPerformed( ActionEvent e )
    {
      for( int c = 0; c < testCase.getTestStepCount(); c++ )
      {
        TestStep step = testCase.getTestStepAt( c );
        if( step instanceof WsdlTestRequestStep )
        {
          WsdlTestRequestStep requestStep = ( WsdlTestRequestStep )step;
          requestStep.getTestRequest().setUsername( form.getComponentValue( USERNAME ) );
          requestStep.getTestRequest().setPassword( form.getComponentValue( PASSWORD ) );
View Full Code Here

    {
      int ix = name.indexOf( PropertyExpansion.PROPERTY_SEPARATOR );
      if( ix > 0 )
      {
        String teststepname = name.substring( 0, ix );
        TestStep refTestStep = context.getTestCase().getTestStepByName( teststepname );
        if( refTestStep != null )
        {
          TestProperty property = refTestStep.getProperty( name.substring( ix + 1 ) );
          if( property != null && !property.isReadOnly() )
          {
            property.setValue( value.toString() );
            return;
          }
View Full Code Here

    // flag for detecting if running has been interrupted either by canceling
    // securityScanRequest
    // or if request result is null(backward compatibility for running
    // TestCase )
    boolean jumpExit = false;
    TestStep currentStep = runContext.getCurrentStep();
    securityTestStepListeners = securityTest.getTestStepRunListeners( currentStep );
    if( !currentStep.isDisabled() && !securityTest.skipTest( currentStep ) )
    {
      TestStepResult stepResult = runTestStep( currentStep, true, true );
      if( stepResult == null )
        jumpExit = true;
      // if( !isRunning() )
      // return -2;

      SecurityTestStepResult securityStepResult = new SecurityTestStepResult( currentStep, stepResult );
      for( int i = 0; i < securityTestListeners.length; i++ )
      {
        if( Arrays.asList( getSecurityTest().getSecurityTestRunListeners() ).contains( securityTestListeners[i] ) )
          securityTestListeners[i].afterOriginalStep( this, getRunContext(), securityStepResult );
      }

      for( int i = 0; i < securityTestListeners.length; i++ )
      {
        if( Arrays.asList( getSecurityTest().getSecurityTestRunListeners() ).contains( securityTestListeners[i] ) )
          securityTestListeners[i].beforeStep( this, getRunContext(), stepResult );
      }
      for( int i = 0; i < securityTestStepListeners.length; i++ )
      {
        if( Arrays.asList( getSecurityTest().getSecurityTestRunListeners() )
            .contains( securityTestStepListeners[i] ) )
          securityTestStepListeners[i].beforeStep( this, getRunContext(), stepResult );
      }
      Map<String, List<SecurityScan>> secScanMap = securityTest.getSecurityScansMap();
      if( secScanMap.containsKey( currentStep.getId() ) )
      {
        List<SecurityScan> testStepScansList = secScanMap.get( currentStep.getId() );
        for( int i = 0; i < testStepScansList.size(); i++ )
        {
          SecurityScan securityScan = testStepScansList.get( i );
          // if security scan is disabled skip it.
          if( securityScan.isDisabled() || securityScan.isSkipFurtherRunning() )
View Full Code Here

        {
          log.warn( "Result [" + c + "] is null in TestCase [" + testCase.getName() + "]" );
          continue;
        }

        TestStep testStep = result.getTestStep();

        if( !samplesMap.containsKey( testStep ) )
        {
          samplesMap.put( testStep, new TestSample( testStep ) );
        }
View Full Code Here

TOP

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

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.