Package com.eviware.soapui.model.testsuite

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


    } catch (XmlException | IOException | SoapUIException e1) {
      fail();
      e1.printStackTrace();
    }
   
    TestSuite testSuite = project.getTestSuiteByName(getTestSuiteName());
     
    TestRunner runner = testSuite.run(new PropertiesMap(), false);
   
    assertEquals(Status.FINISHED, runner.getStatus());
   
  }
View Full Code Here


      Workspace workspace = SoapUI.getWorkspace();
      Project project = findProject( projectFilePath, workspace );

      project = openProject( projectFilePath, workspace, project );

      TestSuite testSuite = project.getTestSuiteByName( testSuiteName );
      TestCase testCase = testSuite.getTestCaseByName( testCaseName );

      showModelItem( testCase );
      bringToFront();
    }
    catch( Exception e )
View Full Code Here

  }

  public void beforeRun( TestCaseRunner testRunner, TestCaseRunContext runContext )
  {
    TestCase testCase = testRunner.getTestCase();
    TestSuite testSuite = testCase.getTestSuite();
    if( !reports.containsKey( testSuite.getName() ) )
    {
      JUnitReport report = new JUnitReport();
      report.setTestSuiteName( testSuite.getProject().getName() + "." + testSuite.getName() );
      reports.put( testSuite.getName(), report );
    }
  }
View Full Code Here

  {
    ModelItem modelItem = context.getModelItem();

    TestStep testStep = null;
    TestCase testCase = null;
    TestSuite testSuite = null;
    Project 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 WsdlLoadTest )
    {
      testCase = ( ( WsdlLoadTest )modelItem ).getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlTestSuite )
    {
      testSuite = ( WsdlTestSuite )modelItem;
      project = testSuite.getProject();
    }
    else if( modelItem instanceof WsdlInterface )
    {
      project = ( ( WsdlInterface )modelItem ).getProject();
    }
    else if( modelItem instanceof WsdlProject )
    {
      project = ( WsdlProject )modelItem;
    }
    else if( modelItem instanceof WsdlMockService )
    {
      mockService = ( WsdlMockService )modelItem;
      project = mockService.getProject();
    }
    else if( modelItem instanceof TestRequest )
    {
      testStep = ( ( TestRequest )modelItem ).getTestStep();
      testCase = testStep.getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }
    else if( modelItem instanceof AbstractHttpRequestInterface<?> )
    {
      project = ( ( AbstractHttpRequest<?> )modelItem ).getOperation().getInterface().getProject();
    }
    else if( modelItem instanceof WsdlMockOperation )
    {
      mockService = ( ( WsdlMockOperation )modelItem ).getMockService();
      project = mockService.getProject();
    }
    else if( modelItem instanceof WsdlMockResponse )
    {
      mockResponse = ( WsdlMockResponse )modelItem;
      mockService = mockResponse.getMockOperation().getMockService();
      project = mockService.getProject();
    }
    else if( modelItem instanceof SecurityTest )
    {
      securityTest = ( SecurityTest )modelItem;
      testCase = ( ( SecurityTest )modelItem ).getTestCase();
      testSuite = testCase.getTestSuite();
      project = testSuite.getProject();
    }

    // no project -> nothing
    if( project == null )
      return null;
View Full Code Here

    if( SoapUI.getTestMonitor() == null )
      return false;

    for( int c = 0; c < iface.getProject().getTestSuiteCount(); c++ )
    {
      TestSuite testSuite = iface.getProject().getTestSuiteAt( c );
      for( int i = 0; i < testSuite.getTestCaseCount(); i++ )
      {
        TestCase testCase = testSuite.getTestCaseAt( i );
        if( !SoapUI.getTestMonitor().hasRunningTest( testCase ) )
          continue;

        for( int j = 0; j < testCase.getTestStepCount(); j++ )
        {
View Full Code Here

  public static boolean hasDependingTests( AbstractInterface<?> iface )
  {
    for( int c = 0; c < iface.getProject().getTestSuiteCount(); c++ )
    {
      TestSuite testSuite = iface.getProject().getTestSuiteAt( c );
      for( int i = 0; i < testSuite.getTestCaseCount(); i++ )
      {
        TestCase testCase = testSuite.getTestCaseAt( i );

        for( int j = 0; j < testCase.getTestStepCount(); j++ )
        {
          WsdlTestStep testStep = ( WsdlTestStep )testCase.getTestStepAt( j );
          if( testStep.dependsOn( iface ) )
View Full Code Here

                }
              }
            }
            else
            {
              TestSuite testSuite = getModelItem().getTestSuiteByName( newValue );
              if( testSuite != null )
                testCases.addAll( Arrays.asList( ModelSupport.getNames( testSuite.getTestCaseList() ) ) );
            }

            testCases.add( 0, ALL_VALUE );
            mainForm.setOptions( TESTCASE, testCases.toArray() );

            if( testCases.contains( tc ) )
            {
              mainForm.getFormField( TESTCASE ).setValue( tc );
            }
          }
        } );

    mainForm.addComboBox( TESTCASE, new String[] {}, "The TestCase to run" ).addFormFieldListener(
        new XFormFieldListener()
        {

          public void valueChanged( XFormField sourceField, String newValue, String oldValue )
          {
            List<String> securityTests = new ArrayList<String>();
            String st = mainForm.getComponentValue( SECURITYTEST );

            if( newValue.equals( ALL_VALUE ) )
            {
              for( TestSuite testSuite : testSuites )
              {
                for( TestCase testCase : testSuite.getTestCaseList() )
                {
                  for( SecurityTest securityTest : testCase.getSecurityTestList() )
                  {
                    if( !securityTests.contains( securityTest.getName() ) )
                      securityTests.add( securityTest.getName() );
View Full Code Here

    updating = true;

    List<String> testCases = new ArrayList<String>();
    List<String> loadTests = new ArrayList<String>();

    TestSuite ts = getModelItem().getTestSuiteByName( mainForm.getComponentValue( TESTSUITE ) );
    String testCaseName = mainForm.getComponentValue( TESTCASE );
    if( ALL_VALUE.equals( testCaseName ) )
      testCaseName = null;

    for( TestSuite testSuite : getModelItem().getTestSuiteList() )
View Full Code Here

                }
              }
            }
            else
            {
              TestSuite testSuite = getModelItem().getTestSuiteByName( newValue );
              if( testSuite != null )
                testCases.addAll( Arrays.asList( ModelSupport.getNames( testSuite.getTestCaseList() ) ) );
            }

            testCases.add( 0, ALL_VALUE );
            mainForm.setOptions( TESTCASE, testCases.toArray() );
View Full Code Here

                }
              }
            }
            else
            {
              TestSuite testSuite = getModelItem().getTestSuiteByName( newValue );
              if( testSuite != null )
                testCases.addAll( Arrays.asList( ModelSupport.getNames( testSuite.getTestCaseList() ) ) );
            }

            testCases.add( 0, ALL_VALUE );
            mainForm.setOptions( TESTCASE, testCases.toArray() );

            if( testCases.contains( tc ) )
            {
              mainForm.getFormField( TESTCASE ).setValue( tc );
            }
          }
        } );

    mainForm.addComboBox( TESTCASE, new String[] {}, "TestCase" ).addFormFieldListener( new XFormFieldListener()
    {

      public void valueChanged( XFormField sourceField, String newValue, String oldValue )
      {
        List<String> securityTests = new ArrayList<String>();
        String st = mainForm.getComponentValue( SECURITY_TEST_NAME );

        if( newValue.equals( ALL_VALUE ) )
        {
          for( TestSuite testSuite : testSuites )
          {
            for( TestCase testCase : testSuite.getTestCaseList() )
            {
              for( SecurityTest securityTest : testCase.getSecurityTestList() )
              {
                if( !securityTests.contains( securityTest.getName() ) )
                  securityTests.add( securityTest.getName() );
View Full Code Here

TOP

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

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.