Package com.eviware.soapui.impl.wsdl

Examples of com.eviware.soapui.impl.wsdl.WsdlTestSuite


    }
  }

  public void internalRun( WsdlTestSuiteRunContext runContext ) throws Exception
  {
    WsdlTestSuite testSuite = getTestRunnable();

    listeners = testSuite.getTestSuiteRunListeners();
    testSuite.runSetupScript( runContext, this );
    if( !isRunning() )
      return;

    if( testSuite.getTimeout() > 0 )
    {
      startTimeoutTimer( testSuite.getTimeout() );
    }

    notifyBeforeRun();
    if( !isRunning() )
      return;

    if( testSuite.getRunType() == TestSuiteRunType.SEQUENTIAL )
    {
      runSequential( testSuite, runContext );
    }
    else if( testSuite.getRunType() == TestSuiteRunType.PARALLEL )
    {
      runParallel( testSuite, runContext );
    }
  }
View Full Code Here


    return currentRunner;
  }

  protected void internalFinally( WsdlTestSuiteRunContext runContext )
  {
    WsdlTestSuite testSuite = getTestRunnable();

    try
    {
      testSuite.runTearDownScript( runContext, this );
    }
    catch( Exception e )
    {
      SoapUI.logError( e );
    }
View Full Code Here

  {
    String name = UISupport.prompt( "Specify name for moved TestSuite", "Move TestSuite", source.getName() );
    if( name == null )
      return false;

    WsdlTestSuite testSuite = CloneTestSuiteAction.cloneToAnotherProject( source, target.getName(), name, true,
        source.getDescription() );
    if( testSuite != null )
    {
      source.getProject().removeTestSuite( source );
      return true;
View Full Code Here

    // create transfer menus
    targetMenu.removeAll();

    WsdlTestStep testStep = null;
    WsdlTestCase testCase = null;
    WsdlTestSuite testSuite = null;
    WsdlProject project = null;
    WsdlMockService mockService = null;
    WsdlMockResponse mockResponse = null;
    SecurityTest securityTest = null;

    if( modelItem instanceof WsdlTestStep )
    {
      testStep = ( WsdlTestStep )modelItem;
      testCase = testStep.getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlTestCase )
    {
      testCase = ( WsdlTestCase )modelItem;
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlTestSuite )
    {
      testSuite = ( WsdlTestSuite )modelItem;
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlMockService )
    {
      project = ( ( WsdlMockService )modelItem ).getProject();
    }
    else if( modelItem instanceof WsdlMockResponse )
    {
      mockResponse = ( WsdlMockResponse )modelItem;
      mockService = ( mockResponse ).getMockOperation().getMockService();
      project = mockService.getProject();
    }
    else if( modelItem instanceof WsdlProject )
    {
      project = ( WsdlProject )modelItem;
    }
    else if( modelItem instanceof AbstractHttpRequestInterface<?> )
    {
      project = ( ( AbstractHttpRequest<?> )modelItem ).getOperation().getInterface().getProject();
    }
    else if( modelItem instanceof Operation )
    {
      project = ( WsdlProject )( ( Operation )modelItem ).getInterface().getProject();
    }
    else if( modelItem instanceof SecurityTest )
    {
      securityTest = ( SecurityTest )modelItem;
      testCase = securityTest.getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }

    TestPropertyHolder globalProperties = PropertyExpansionUtils.getGlobalProperties();
    if( globalProperties.getProperties().size() > 0 )
      targetMenu.add( createPropertyMenu( "Global", globalProperties ) );

    if( project != null )
      targetMenu.add( createPropertyMenu( "Project: [" + project.getName() + "]", project ) );

    if( testSuite != null )
      targetMenu.add( createPropertyMenu( "TestSuite: [" + testSuite.getName() + "]", testSuite ) );

    if( mockService != null )
      targetMenu.add( createPropertyMenu( "MockService: [" + mockService.getName() + "]", mockService ) );

    if( mockResponse != null )
View Full Code Here

  }

  @Override
  boolean copyAfter( WsdlTestCase testCase, WsdlProject target )
  {
    WsdlTestSuite testSuite = getTargetTestSuite( target, "Copy TestCase" );
    if( testSuite == null )
      return false;

    testCase = TestCaseToTestSuiteDropHandler.copyTestCase( testCase, testSuite, -1 );
    if( testCase != null )
View Full Code Here

      name = UISupport.prompt( "Specify target TestSuite for TestCase", title, names );
      if( name == null )
        return null;
    }

    WsdlTestSuite testSuite = target.getTestSuiteByName( name );
    if( testSuite == null )
    {
      name = UISupport.prompt( "Specify name for new TestSuite", title, "TestSuite "
          + ( target.getTestSuiteCount() + 1 ) );
      if( name == null )
        return null;

      testSuite = target.addNewTestSuite( name );
    }

    Set<Interface> requiredInterfaces = new HashSet<Interface>();

    for( int i = 0; i < testSuite.getTestCaseCount(); i++ )
    {
      WsdlTestCase testCase = testSuite.getTestCaseAt( i );

      for( int y = 0; y < testCase.getTestStepCount(); y++ )
      {
        WsdlTestStep testStep = testCase.getTestStepAt( y );
        requiredInterfaces.addAll( testStep.getRequiredInterfaces() );
View Full Code Here

  }

  @Override
  boolean moveAfter( WsdlTestCase testCase, WsdlProject target )
  {
    WsdlTestSuite testSuite = getTargetTestSuite( target, "Move TestCase" );
    if( testSuite == null )
      return false;

    testCase = TestCaseToTestSuiteDropHandler.moveTestCase( testCase, testSuite, -1 );
    if( testCase != null )
View Full Code Here

        optionsDialog.getFormField( OptionsForm.TESTCASE ).addFormFieldListener( new XFormFieldListener()
        {

          public void valueChanged( XFormField sourceField, String newValue, String oldValue )
          {
            WsdlTestSuite testSuite = project.getTestSuiteByName( optionsDialog.getValue( OptionsForm.TESTSUITE ) );
            WsdlTestCase testCase = testSuite.getTestCaseByName( newValue );
            optionsDialog.setOptions( OptionsForm.RETURN_PROPERTIES, testCase.getPropertyNames() );
            ( ( XFormMultiSelectList )optionsDialog.getFormField( OptionsForm.RETURN_PROPERTIES ) )
                .setSelectedOptions( getModelItem().getReturnProperties().toStringArray() );
          }
        } );
      }

      WsdlTestCase targetTestCase = getModelItem().getTargetTestCase();

      optionsDialog.setOptions( OptionsForm.TESTSUITE, ModelSupport.getNames( project.getTestSuiteList() ) );
      if( targetTestCase != null )
      {
        optionsDialog.setValue( OptionsForm.TESTSUITE, targetTestCase.getTestSuite().getName() );

        List<TestCase> testCaseList = targetTestCase.getTestSuite().getTestCaseList();
        testCaseList.remove( getModelItem().getTestCase() );

        optionsDialog.setOptions( OptionsForm.TESTCASE, ModelSupport.getNames( testCaseList ) );
        optionsDialog.setValue( OptionsForm.TESTCASE, targetTestCase.getName() );

        optionsDialog.setOptions( OptionsForm.RETURN_PROPERTIES, targetTestCase.getPropertyNames() );
        ( ( XFormMultiSelectList )optionsDialog.getFormField( OptionsForm.RETURN_PROPERTIES ) )
            .setSelectedOptions( getModelItem().getReturnProperties().toStringArray() );
      }
      else
      {
        if( project.getTestSuiteCount() == 0 )
        {
          optionsDialog.setOptions( OptionsForm.TESTCASE, new String[0] );
          optionsDialog.setOptions( OptionsForm.RETURN_PROPERTIES, new String[0] );
        }
        else
        {
          List<TestCase> testCaseList = project.getTestSuiteAt( 0 ).getTestCaseList();
          testCaseList.remove( getModelItem().getTestCase() );
          optionsDialog.setOptions( OptionsForm.TESTCASE, ModelSupport.getNames( testCaseList ) );

          if( testCaseList.isEmpty() )
            optionsDialog.setOptions( OptionsForm.RETURN_PROPERTIES, new String[0] );
          else
            optionsDialog.setOptions( OptionsForm.RETURN_PROPERTIES, testCaseList.get( 0 ).getPropertyNames() );
        }
      }

      switch( getModelItem().getRunMode().intValue() )
      {
      case RunTestCaseRunModeTypeConfig.INT_PARALLELL :
        optionsDialog.setValue( OptionsForm.RUN_MODE, OptionsForm.CREATE_ISOLATED_COPY_FOR_EACH_RUN );
        break;
      case RunTestCaseRunModeTypeConfig.INT_SINGLETON_AND_FAIL :
        optionsDialog.setValue( OptionsForm.RUN_MODE, OptionsForm.RUN_PRIMARY_TEST_CASE );
        break;
      case RunTestCaseRunModeTypeConfig.INT_SINGLETON_AND_WAIT :
        optionsDialog.setValue( OptionsForm.RUN_MODE, OptionsForm.RUN_SYNCHRONIZED_TESTCASE );
        break;
      }

      optionsDialog.setBooleanValue( OptionsForm.COPY_HTTP_SESSION, getModelItem().isCopyHttpSession() );
      optionsDialog
          .setBooleanValue( OptionsForm.COPY_LOADTEST_PROPERTIES, getModelItem().isCopyLoadTestProperties() );
      optionsDialog.setBooleanValue( OptionsForm.IGNORE_EMPTY_PROPERTIES, getModelItem().isIgnoreEmptyProperties() );

      if( optionsDialog.show() )
      {
        WsdlTestSuite testSuite = project.getTestSuiteByName( optionsDialog.getValue( OptionsForm.TESTSUITE ) );
        getModelItem().setTargetTestCase(
            testSuite == null ? null
                : testSuite.getTestCaseByName( optionsDialog.getValue( OptionsForm.TESTCASE ) ) );
        getModelItem().setReturnProperties(
            new StringList(
                ( ( XFormMultiSelectList )optionsDialog.getFormField( OptionsForm.RETURN_PROPERTIES ) )
                    .getSelectedOptions() ) );
View Full Code Here

      if( dialog.show() )
      {
        String targetTestSuiteName = dialog.getValue( TESTSUITE );
        String targetTestCaseName = dialog.getValue( TESTCASE );

        WsdlTestSuite testSuite = getProject().getTestSuiteByName( targetTestSuiteName );
        if( testSuite == null )
        {
          targetTestSuiteName = ModelSupport.promptForUniqueName( "TestSuite", getProject(), "" );
          if( targetTestSuiteName == null )
            return;

          testSuite = getProject().addNewTestSuite( targetTestSuiteName );
        }

        WsdlTestCase testCase = testSuite.getTestCaseByName( targetTestCaseName );
        if( testCase == null )
        {
          targetTestCaseName = ModelSupport.promptForUniqueName( "TestCase", testSuite, "" );
          if( targetTestCaseName == null )
            return;

          testCase = testSuite.addNewTestCase( targetTestCaseName );
        }

        for( int row : rows )
        {
          WsdlMonitorMessageExchange me = tableModel.getMessageExchangeAt( row );
View Full Code Here

  }

  @Override
  boolean copyAfter( WsdlTestSuite source, WsdlTestSuite target )
  {
    WsdlTestSuite testCase = copyTestSuite( source, target.getProject(),
        target.getProject().getIndexOfTestSuite( target ) + 1 );

    if( testCase != null )
      UISupport.select( testCase );
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.WsdlTestSuite

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.