Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.TestSuiteConfig


  public WsdlTestSuite importTestSuite( WsdlTestSuite testSuite, String name, int index, boolean createCopy,
      String description )
  {
    testSuite.beforeSave();
    TestSuiteConfig testSuiteConfig = index == -1 ? ( TestSuiteConfig )getConfig().addNewTestSuite().set(
        testSuite.getConfig().copy() ) : ( TestSuiteConfig )getConfig().insertNewTestSuite( index ).set(
        testSuite.getConfig().copy() );

    testSuiteConfig.setName( name );

    if( createCopy )
    {
      for( TestCaseConfig testCaseConfig : testSuiteConfig.getTestCaseList() )
      {
        testCaseConfig.setSecurityTestArray( new SecurityTestConfig[0] );
      }
    }
View Full Code Here


    {
      UISupport.showErrorMessage( "Not valild test case xml" );
    }
    else
    {
      TestSuiteConfig config = ( TestSuiteConfig )projectDocument.getSoapuiProject().addNewTestSuite()
          .set( newTestSuiteConfig.getTestSuite() );
      WsdlTestSuite testSuite = buildTestSuite( config );

      ModelSupport.unsetIds( testSuite );
      testSuite.afterLoad();

      /*
       * security test keeps reference to test step by id, which gets changed
       * during importing, so old values needs to be rewritten to new ones.
       *
       * Create tarnsition table ( old id , new id ) and use it to replace
       * all old ids in new imported test case.
       *
       * Here needs to be done for all test cases separatly.
       */
      for( int cnt2 = 0; cnt2 < config.getTestCaseList().size(); cnt2++ )
      {
        TestCaseConfig newTestCase = config.getTestCaseList().get( cnt2 );
        TestCaseConfig importTestCaseConfig = newTestSuiteConfig.getTestSuite().getTestCaseList().get( cnt2 );
        LinkedHashMap<String, String> oldNewIds = new LinkedHashMap<String, String>();
        for( int cnt = 0; cnt < importTestCaseConfig.getTestStepList().size(); cnt++ )
          oldNewIds.put( importTestCaseConfig.getTestStepList().get( cnt ).getId(), newTestCase.getTestStepList()
              .get( cnt ).getId() );
View Full Code Here

    }

    public WsdlTestSuite importTestSuite(WsdlTestSuite testSuite, String name, int index, boolean createCopy,
                                         String description) {
        testSuite.beforeSave();
        TestSuiteConfig testSuiteConfig = index == -1 ? (TestSuiteConfig) getConfig().addNewTestSuite().set(
                testSuite.getConfig().copy()) : (TestSuiteConfig) getConfig().insertNewTestSuite(index).set(
                testSuite.getConfig().copy());

        testSuiteConfig.setName(name);

        if (createCopy) {
            for (TestCaseConfig testCaseConfig : testSuiteConfig.getTestCaseList()) {
                testCaseConfig.setSecurityTestArray(new SecurityTestConfig[0]);
            }
        }

        WsdlTestSuite oldTestSuite = testSuite;
View Full Code Here

        }

        if (newTestSuiteConfig == null) {
            UISupport.showErrorMessage("Not valid test case xml");
        } else {
            TestSuiteConfig config = (TestSuiteConfig) projectDocument.getSoapuiProject().addNewTestSuite()
                    .set(newTestSuiteConfig.getTestSuite());
            WsdlTestSuite testSuite = buildTestSuite(config);

            ModelSupport.createNewIds(testSuite);
            testSuite.afterLoad();

      /*
             * security test keeps reference to test step by id, which gets changed
       * during importing, so old values needs to be rewritten to new ones.
       *
       * Create tarnsition table ( old id , new id ) and use it to replace
       * all old ids in new imported test case.
       *
       * Here needs to be done for all test cases separatly.
       */
            for (int cnt2 = 0; cnt2 < config.getTestCaseList().size(); cnt2++) {
                TestCaseConfig newTestCase = config.getTestCaseList().get(cnt2);
                TestCaseConfig importTestCaseConfig = newTestSuiteConfig.getTestSuite().getTestCaseList().get(cnt2);
                LinkedHashMap<String, String> oldNewIds = new LinkedHashMap<String, String>();
                for (int cnt = 0; cnt < importTestCaseConfig.getTestStepList().size(); cnt++) {
                    oldNewIds.put(importTestCaseConfig.getTestStepList().get(cnt).getId(), newTestCase.getTestStepList()
                            .get(cnt).getId());
View Full Code Here

TOP

Related Classes of com.eviware.soapui.config.TestSuiteConfig

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.