Examples of WsdlTestCase


Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase

    else if( testCase.getTestSuite().getProject() == target.getProject() )
    {
      if( UISupport.confirm( "Move TestCase [" + testCase.getName() + "] to TestSuite [" + target.getName() + "]",
          "Move TestCase" ) )
      {
        WsdlTestCase importedTestCase = target.importTestCase( testCase, testCase.getName(), position, true, true,
            false );
        if( importedTestCase != null )
        {
          testCase.getTestSuite().removeTestCase( testCase );
          return importedTestCase;
        }
      }
    }
    else if( UISupport.confirm( "Move TestCase [" + testCase.getName() + "] to TestSuite [" + target.getName() + "]",
        "Move TestCase" ) )
    {
      Set<Interface> requiredInterfaces = new HashSet<Interface>();

      // get required interfaces
      for( int y = 0; y < testCase.getTestStepCount(); y++ )
      {
        WsdlTestStep testStep = testCase.getTestStepAt( y );
        requiredInterfaces.addAll( testStep.getRequiredInterfaces() );
      }

      if( DragAndDropSupport.importRequiredInterfaces( target.getProject(), requiredInterfaces, "Move TestCase" ) )
      {
        WsdlTestCase importedTestCase = target.importTestCase( testCase, testCase.getName(), position, true, true,
            false );
        if( importedTestCase != null )
        {
          testCase.getTestSuite().removeTestCase( testCase );
          return importedTestCase;
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase

  public void perform( WsdlRequest request, Object param )
  {
    WsdlProject project = request.getOperation().getInterface().getProject();

    WsdlTestCase testCase = getTargetTestCase( project );
    if( testCase != null )
      addRequest( testCase, request, -1 );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase

  }

  private void generateSingleTestCase( WsdlTestSuite testSuite, WsdlInterface iface, boolean useExisting,
      boolean createLoadTest, List<String> operations )
  {
    WsdlTestCase testCase = testSuite.addNewTestCase( iface.getName() + " TestSuite" );

    for( int i = 0; i < iface.getOperationCount(); i++ )
    {
      WsdlOperation operation = iface.getOperationAt( i );
      if( !operations.contains( operation.getName() ) )
        continue;

      if( useExisting && operation.getRequestCount() > 0 )
      {
        for( int x = 0; x < operation.getRequestCount(); x++ )
        {
          testCase.addTestStep( WsdlTestRequestStepFactory.createConfig( operation.getRequestAt( x ),
              operation.getName() ) );
        }
      }
      else
      {
        testCase.addTestStep( WsdlTestRequestStepFactory.createConfig( operation, operation.getName() ) );
      }
    }

    if( createLoadTest )
    {
      testCase.addNewLoadTest( "LoadTest 1" );
    }
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase

    {
      WsdlOperation operation = iface.getOperationAt( i );
      if( !operations.contains( operation.getName() ) )
        continue;

      WsdlTestCase testCase = testSuite.addNewTestCase( operation.getName() + " TestCase" );

      if( useExisting && operation.getRequestCount() > 0 )
      {
        for( int x = 0; x < operation.getRequestCount(); x++ )
        {
          testCase.addTestStep( WsdlTestRequestStepFactory.createConfig( operation.getRequestAt( x ),
              operation.getName() ) );
        }
      }
      else
      {
        testCase.addTestStep( WsdlTestRequestStepFactory.createConfig( operation, operation.getName() ) );
      }

      if( createLoadTest )
      {
        testCase.addNewLoadTest( "LoadTest 1" );
      }
    }
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase

        WsdlTestCaseRunner callingTestCaseRunner = ( WsdlTestCaseRunner )runContext
            .getProperty( "#CallingTestCaseRunner#" );

        if( callingTestCaseRunner != null )
        {
          WsdlTestCase ctc = callingTestCaseRunner.getTestCase();
          WsdlRunTestCaseTestStep runTestCaseTestStep = ( WsdlRunTestCaseTestStep )runContext
              .getProperty( "#CallingRunTestCaseStep#" );

          nameBase = StringUtils.createFileName( ctc.getTestSuite().getName(), '_' ) + exportSeparator
              + StringUtils.createFileName( ctc.getName(), '_' ) + exportSeparator
              + StringUtils.createFileName( runTestCaseTestStep.getName(), '_' ) + exportSeparator
              + StringUtils.createFileName( tc.getTestSuite().getName(), '_' ) + exportSeparator
              + StringUtils.createFileName( tc.getName(), '_' ) + exportSeparator
              + StringUtils.createFileName( currentStep.getName(), '_' ) + "-" + count.longValue() + "-"
              + result.getStatus();
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase

        {
          if( httpHtmlResponseView != null && httpHtmlResponseView.isRecordHttpTrafic() )
          {
            HttpTestRequest httpTestRequest = ( HttpTestRequest )( httpHtmlResponseView.getDocument()
                .getRequest() );
            WsdlTestCase testCase = httpTestRequest.getTestStep().getTestCase();
            int count = testCase.getTestStepList().size();

            String url2 = recordedRequest.getUrl();
            try
            {
              url2 = new URL( recordedRequest.getUrl() ).getPath();
            }
            catch( MalformedURLException e )
            {

            }

            HttpTestRequestStep newHttpStep = ( HttpTestRequestStep )testCase.addTestStep(
                HttpRequestStepFactory.HTTPREQUEST_TYPE, "Http Test Step " + ++count + " [" + url2 + "]",
                recordedRequest.getUrl(), recordedRequest.getMethod() );

            newHttpStep.getTestRequest().setRequestHeaders( recordedRequest.getHeaders() );
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase

        WsdlTestCaseRunner callingTestCaseRunner = ( WsdlTestCaseRunner )runContext
            .getProperty( "#CallingTestCaseRunner#" );

        if( callingTestCaseRunner != null )
        {
          WsdlTestCase ctc = callingTestCaseRunner.getTestCase();
          WsdlRunTestCaseTestStep runTestCaseTestStep = ( WsdlRunTestCaseTestStep )runContext
              .getProperty( "#CallingRunTestCaseStep#" );

          nameBase = StringUtils.createFileName( securityTestName, '_' ) + exportSeparator
              + StringUtils.createFileName( ctc.getTestSuite().getName(), '_' ) + exportSeparator
              + StringUtils.createFileName( ctc.getName(), '_' ) + exportSeparator
              + StringUtils.createFileName( runTestCaseTestStep.getName(), '_' ) + exportSeparator
              + StringUtils.createFileName( tc.getTestSuite().getName(), '_' ) + exportSeparator
              + StringUtils.createFileName( tc.getName(), '_' ) + exportSeparator
              + StringUtils.createFileName( currentStep.getName(), '_' ) + "-" + count.longValue() + "-"
              + result.getStatus();
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase

    setPropertiesConfig( config.getProperties() );
  }

  public WsdlTestCase buildTestCase( TestCaseConfig testCaseConfig, boolean forLoadTest )
  {
    return new WsdlTestCase( this, testCaseConfig, forLoadTest );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase

  {
    testCase.beforeSave();
    TestCaseConfig newTestCase = getConfig().addNewTestCase();
    newTestCase.set( testCase.getConfig() );
    newTestCase.setName( name );
    WsdlTestCase newWsdlTestCase = buildTestCase( newTestCase, false );
    ModelSupport.unsetIds( newWsdlTestCase );
    newWsdlTestCase.afterLoad();

    testCases.add( newWsdlTestCase );
    fireTestCaseAdded( newWsdlTestCase );

    return newWsdlTestCase;
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase

    return newWsdlTestCase;
  }

  public WsdlTestCase addNewTestCase( String name )
  {
    WsdlTestCase testCase = buildTestCase( getConfig().addNewTestCase(), false );
    testCase.setName( name );
    testCase.setFailOnError( true );
    testCase.setSearchProperties( true );
    testCases.add( testCase );
    fireTestCaseAdded( testCase );

    return testCase;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.