Package com.eviware.soapui.impl.wsdl.teststeps

Examples of com.eviware.soapui.impl.wsdl.teststeps.HttpTestRequestStep$RestTestStepProperty


            //
            // }
            // else
            // {
            HttpRequestStepFactory httpRequestStepFactory = new HttpRequestStepFactory();
            HttpTestRequestStep test = ( HttpTestRequestStep )testCase.insertTestStep(
                httpRequestStepFactory.createConfig( me, "Monitor Request " + ( row + 1 ) ), -1 );

            test.getTestRequest().setRequestHeaders( excludeHeaders( me.getRequestHeaders() ) );

            HttpTestRequest request = ( HttpTestRequest )test.getHttpRequest();

            request.setEndpoint( me.getTargetUrl().toString() );
            // request.setIncomingWss( incomingRequestWss );
            String existingMediaType = me.getResponseHeaders().get( "Content-Type", "" );
            if( !StringUtils.isNullOrEmpty( existingMediaType ) )
            {
              request.setMediaType( existingMediaType );
            }
            if( "application/octet-stream".equals( existingMediaType )
                || "application/x-amf".equals( existingMediaType ) )
            {
              request.attachBinaryData( me.getRequestContent().getBytes(), existingMediaType );
            }
            else
            {
              request.setRequestContent( me.getRequestContent() );
              test.getTestRequest().setRequestContent( me.getRequestContent() );
            }
            Attachment[] requestAttachments = me.getRequestAttachments();
            if( requestAttachments != null )
            {
              for( Attachment attachment : requestAttachments )
View Full Code Here


            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() );

            if( recordedRequest.getContent() != null )
            {
              newHttpStep.getTestRequest().setMediaType( recordedRequest.getContentType() );
              if( newHttpStep.getTestRequest().getMediaType().equals( CONTENT_TYPE_FORM_URLENCODED ) )
              {
                newHttpStep.getTestRequest().setPostQueryString( true );
                newHttpStep.getTestRequest().setMediaType( CONTENT_TYPE_FORM_URLENCODED );
                RestUtils.extractParamsFromQueryString( newHttpStep.getTestRequest().getParams(),
                    recordedRequest.getContent() );
              }
              else
              {
                newHttpStep.getTestRequest().setRequestContent( recordedRequest.getContent() );
              }
            }
          }
        }
      }
View Full Code Here

    TestStepConfig testStepConfig = TestStepConfig.Factory.newInstance();
    testStepConfig.setType( HttpRequestStepFactory.HTTPREQUEST_TYPE );
    testStepConfig.setConfig( httpRequest );
    testStepConfig.setName( name );
    HttpTestRequestStep testStep = ( HttpTestRequestStep )targetTestCase.addTestStep( testStepConfig );

    desktopPanel = ( HttpTestRequestDesktopPanel )UISupport.selectAndShow( testStep );
    HttpTestRequest testRequest = null;
    try
    {
      testRequest = testStep.getTestRequest();
      WsdlSubmit<HttpRequest> submitRequest = testRequest.submit( new WsdlTestRunContext( testStep ), true );

      if( startRecording )
      {
        submitRequest.waitUntilFinished();
View Full Code Here

    TestStepConfig testStepConfig = TestStepConfig.Factory.newInstance();
    testStepConfig.setType( HttpRequestStepFactory.HTTPREQUEST_TYPE );
    testStepConfig.setConfig( httpRequest );
    testStepConfig.setName( name );
    HttpTestRequestStep testStep = ( HttpTestRequestStep )targetTestCase.addTestStep( testStepConfig );

    desktopPanel = ( HttpTestRequestDesktopPanel )UISupport.selectAndShow( testStep );
    HttpTestRequest testRequest = null;
    try
    {
      testRequest = testStep.getTestRequest();
      WsdlSubmit<HttpRequest> submitRequest = testRequest.submit( new WsdlTestRunContext( testStep ), true );
      if( startRecording )
      {
        submitRequest.waitUntilFinished();
        HttpHtmlResponseView htmlResponseView = ( HttpHtmlResponseView )desktopPanel.getResponseEditor().getViews()
View Full Code Here

        "/http_request.gif" );
  }

  public WsdlTestStep buildTestStep( WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest )
  {
    return new HttpTestRequestStep( testCase, config, forLoadTest );
  }
View Full Code Here

      CrossSiteScriptingScanConfig parameterExposureCheckConfig, List<AssertionError> assertionErrorList )
  {
    boolean throwException = false;
    for( String url : urls )
    {
      HttpTestRequestStep httpRequest = createHttpRequest( ( WsdlTestStep )testStep, url );
      MessageExchange messageExchange2 = ( MessageExchange )httpRequest.run( ( TestCaseRunner )securityTestRunner,
          ( SecurityTestRunContext )context );

      for( String value : parameterExposureCheckConfig.getParameterExposureStringsList() )
      {
        value = context.expand( value );// property expansion support
View Full Code Here

                                request.importAttachment(attachment);
                            }
                        }
                    } else {
                        HttpRequestStepFactory httpRequestStepFactory = new HttpRequestStepFactory();
                        HttpTestRequestStep test = (HttpTestRequestStep) testCase.insertTestStep(
                                httpRequestStepFactory.createConfig(me, "Monitor Request " + (row + 1)), -1);

                        test.getTestRequest().setRequestHeaders(excludeProxyHeaders(me.getRequestHeaders()));

                        HttpTestRequest request = (HttpTestRequest) test.getHttpRequest();

                        request.setEndpoint(me.getTargetUrl().toString());
                        // request.setIncomingWss( incomingRequestWss );
                        String existingMediaType = me.getResponseHeaders().get("Content-Type", "");
                        if (!StringUtils.isNullOrEmpty(existingMediaType)) {
                            request.setMediaType(existingMediaType);
                        }
                        if ("application/octet-stream".equals(existingMediaType)
                                || "application/x-amf".equals(existingMediaType)) {
                            request.attachBinaryData(me.getRequestContent().getBytes(), existingMediaType);
                        } else {
                            request.setRequestContent(me.getRequestContent());
                            test.getTestRequest().setRequestContent(me.getRequestContent());
                        }
                        Attachment[] requestAttachments = me.getRequestAttachments();
                        if (requestAttachments != null) {
                            for (Attachment attachment : requestAttachments) {
                                request.importAttachment(attachment);
View Full Code Here

    private boolean checkSeparateHTML(MessageExchange messageExchange, SubmitContext context, TestStep testStep,
                                      SecurityTestRunner securityTestRunner, List<String> urls,
                                      CrossSiteScriptingScanConfig parameterExposureCheckConfig, List<AssertionError> assertionErrorList) {
        boolean throwException = false;
        for (String url : urls) {
            HttpTestRequestStep httpRequest = createHttpRequest((WsdlTestStep) testStep, url);
            MessageExchange messageExchange2 = (MessageExchange) httpRequest.run((TestCaseRunner) securityTestRunner,
                    (SecurityTestRunContext) context);

            for (String value : parameterExposureCheckConfig.getParameterExposureStringsList()) {
                value = context.expand(value);// property expansion support
                String match = SecurityScanUtil.contains(context, new String(messageExchange2.getRawResponseData()),
View Full Code Here

        super(HTTPREQUEST_TYPE, "HTTP Test Request", "Submits a HTTP Request and validates its response",
                "/http_request.gif");
    }

    public WsdlTestStep buildTestStep(WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
        return new HttpTestRequestStep(testCase, config, forLoadTest);
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.teststeps.HttpTestRequestStep$RestTestStepProperty

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.