Package com.eviware.soapui.security.result

Examples of com.eviware.soapui.security.result.SecurityScanResult


   * com.eviware.soapui.security.SecurityTestRunner)
   */
  public SecurityScanResult run( TestStep testStep, SecurityTestRunContext context,
      SecurityTestRunner securityTestRunner )
  {
    securityScanResult = new SecurityScanResult( this );
    SecurityTestRunListener[] securityTestListeners = ( ( SecurityTest )getParent() ).getSecurityTestRunListeners();

    PropertyChangeNotifier notifier = new PropertyChangeNotifier();
    boolean noMutations = true;
    while( hasNext( testStep, context ) )
View Full Code Here


            continue;
          //if step is failed and scan not applicable to failed steps just set it to skipped
          //run scan otherwise
          if( stepResult.getStatus() == TestStepStatus.FAILED && !securityScan.isApplyForFailedStep() )
          {
            SecurityScanResult securityScanResult = new SecurityScanResult( securityScan );
            if( securityScan.getAssertionCount() > 0 )
              securityScanResult.setStatus( ResultStatus.OK );
            else if( securityScan instanceof AbstractSecurityScanWithProperties )
            {
              if( ( ( AbstractSecurityScanWithProperties )securityScan ).getParameterHolder().getParameterList()
                  .size() > 0 )
                securityScanResult.setStatus( ResultStatus.OK );
              else
                securityScanResult.setStatus( ResultStatus.SKIPPED );
            }
            else
              securityScanResult.setStatus( ResultStatus.SKIPPED );
            securityStepResult.addSecurityScanResult( securityScanResult );

            runAfterListeners( runContext, securityScanResult );
          }
          else
          {
            runContext.setCurrentScanIndex( i );
            runContext.setCurrentScanOnSecurityTestIndex( currentScanOnSecurityTestIndex++ );
            SecurityScanResult securityScanResult = runTestStepSecurityScan( runContext, currentStep,
                securityScan );
            securityStepResult.addSecurityScanResult( securityScanResult );
            if( securityScanResult.isCanceled() )
            {
              jumpExit = true;
              break;
            }
            else if( securityScanResult.getStatus() == ResultStatus.FAILED )
            {
              if( getTestRunnable().getFailOnError() )
              {
                // setError( stepResult.getError() );
                fail( "Cancelling due to failed security scan" );
View Full Code Here

  }

  public SecurityScanResult runTestStepSecurityScan( SecurityTestRunContext runContext, TestStep currentStep,
      SecurityScan securityScan )
  {
    SecurityScanResult result = null;
    for( int j = 0; j < securityTestStepListeners.length; j++ )
    {
      if( Arrays.asList( getSecurityTest().getSecurityTestRunListeners() ).contains( securityTestStepListeners[j] ) )
        securityTestStepListeners[j].beforeSecurityScan( this, runContext, securityScan );
    }
    for( int j = 0; j < securityTestListeners.length; j++ )
    {
      if( Arrays.asList( getSecurityTest().getSecurityTestRunListeners() ).contains( securityTestListeners[j] ) )
        securityTestListeners[j].beforeSecurityScan( this, runContext, securityScan );
    }
    result = securityScan.run( cloneForSecurityScan( ( WsdlTestStep )currentStep ), runContext, this );
    if( securityScan.isRunOnlyOnce() )
    {
      securityScan.setSkipFurtherRunning( true );
    }
    if( securityTest.getFailOnError() && result.getStatus() == ResultStatus.FAILED )
    {
      fail( "Cancelling due to failed security scan" );
    }
    runAfterListeners( runContext, result );
    return result;
View Full Code Here

  {
    int size = items.size();
    checkCount++ ;
    requestCount = 0;

    SecurityScanResult securityCheckResult = securityCheck.getSecurityScanResult();
    SoftReference<SecurityResult> checkResultRef = new SoftReference<SecurityResult>( securityCheckResult );

    items.add( "SecurityScan " + checkCount + " [" + securityCheck.getName() + "] " );
    results.add( checkResultRef );
    currentCheckEntriesCount = 1;
View Full Code Here

                        continue;
                    }
                    //if step is failed and scan not applicable to failed steps just set it to skipped
                    //run scan otherwise
                    if (stepResult.getStatus() == TestStepStatus.FAILED && !securityScan.isApplyForFailedStep()) {
                        SecurityScanResult securityScanResult = new SecurityScanResult(securityScan);
                        if (securityScan.getAssertionCount() > 0) {
                            securityScanResult.setStatus(ResultStatus.OK);
                        } else if (securityScan instanceof AbstractSecurityScanWithProperties) {
                            if (((AbstractSecurityScanWithProperties) securityScan).getParameterHolder().getParameterList()
                                    .size() > 0) {
                                securityScanResult.setStatus(ResultStatus.OK);
                            } else {
                                securityScanResult.setStatus(ResultStatus.SKIPPED);
                            }
                        } else {
                            securityScanResult.setStatus(ResultStatus.SKIPPED);
                        }
                        securityStepResult.addSecurityScanResult(securityScanResult);

                        runAfterListeners(runContext, securityScanResult);
                    } else {
                        runContext.setCurrentScanIndex(i);
                        runContext.setCurrentScanOnSecurityTestIndex(currentScanOnSecurityTestIndex++);
                        SecurityScanResult securityScanResult = runTestStepSecurityScan(runContext, currentStep,
                                securityScan);
                        securityStepResult.addSecurityScanResult(securityScanResult);
                        if (securityScanResult.isCanceled()) {
                            jumpExit = true;
                            break;
                        } else if (securityScanResult.getStatus() == ResultStatus.FAILED) {
                            if (getTestRunnable().getFailOnError()) {
                                // setError( stepResult.getError() );
                                fail("Cancelling due to failed security scan");
                            } else {
                                getRunContext().setProperty(SecurityTestRunner.Status.class.getName(),
View Full Code Here

        }
    }

    public SecurityScanResult runTestStepSecurityScan(SecurityTestRunContext runContext, TestStep currentStep,
                                                      SecurityScan securityScan) {
        SecurityScanResult result = null;
        for (int j = 0; j < securityTestStepListeners.length; j++) {
            if (Arrays.asList(getSecurityTest().getSecurityTestRunListeners()).contains(securityTestStepListeners[j])) {
                securityTestStepListeners[j].beforeSecurityScan(this, runContext, securityScan);
            }
        }
        for (int j = 0; j < securityTestListeners.length; j++) {
            if (Arrays.asList(getSecurityTest().getSecurityTestRunListeners()).contains(securityTestListeners[j])) {
                securityTestListeners[j].beforeSecurityScan(this, runContext, securityScan);
            }
        }
        result = securityScan.run(cloneForSecurityScan((WsdlTestStep) currentStep), runContext, this);
        if (securityScan.isRunOnlyOnce()) {
            securityScan.setSkipFurtherRunning(true);
        }
        if (securityTest.getFailOnError() && result.getStatus() == ResultStatus.FAILED) {
            fail("Cancelling due to failed security scan");
        }
        runAfterListeners(runContext, result);
        return result;
    }
View Full Code Here

    public synchronized void addSecurityScanResult(SecurityScan securityCheck) {
        int size = items.size();
        checkCount++;
        requestCount = 0;

        SecurityScanResult securityCheckResult = securityCheck.getSecurityScanResult();
        SoftReference<SecurityResult> checkResultRef = new SoftReference<SecurityResult>(securityCheckResult);

        items.add("SecurityScan " + checkCount + " [" + securityCheck.getName() + "] ");
        results.add(checkResultRef);
        currentCheckEntriesCount = 1;
View Full Code Here

     * com.eviware.soapui.security.SecurityTestRunContext,
     * com.eviware.soapui.security.SecurityTestRunner)
     */
    public SecurityScanResult run(TestStep testStep, SecurityTestRunContext context,
                                  SecurityTestRunner securityTestRunner) {
        securityScanResult = new SecurityScanResult(this);
        SecurityTestRunListener[] securityTestListeners = ((SecurityTest) getParent()).getSecurityTestRunListeners();

        PropertyChangeNotifier notifier = new PropertyChangeNotifier();
        boolean noMutations = true;
        while (hasNext(testStep, context)) {
View Full Code Here

TOP

Related Classes of com.eviware.soapui.security.result.SecurityScanResult

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.