zoukankan      html  css  js  c++  java
  • 在LoadRunner脚本中处理HTTP重定向

    参考:

    Handle HTTP Re-Directions in LoadRunner Scripts yourself

    http://ptfrontline.wordpress.com/2010/04/11/handle-http-re-directions-in-loadrunner-scripts-yourself/

    Action() 

        int HttpRetCode=0; 

      

        // Set redirection depth to 0 

        web_set_option("MaxRedirectionDepth", "0", LAST); 

      

        // Initial Location where we want to go 

        lr_save_string("http://www.mercury.com", "Location"); 

      

        do

        { 

            // Save new Redirection Info (Location: header) 

            web_reg_save_param("Location", 

                               "LB=Location: ", 

                               "RB=\r\n", 

                               "Ord=1", 

                               "NotFound=Warning", 

                               "Search=Headers", 

                               LAST ); 

      

            // do any web call (This needs to be modified to suit your needs) 

            web_url("my_req", 

              "URL={Location}", 

              LAST ); 

      

            // Get HTTP response Code 

            HttpRetCode = web_get_int_property(HTTP_INFO_RETURN_CODE); 

      

        } while ((HttpRetCode>=300) & (HttpRetCode<400)); 

      

        return 0; 

    }

  • 相关阅读:
    二级域名绑定子目录
    Promise.all的使用
    react的状态管理
    chrome调试
    组件之间通讯
    promise-async-await
    深入理解AMQP协议转载
    java中堆栈(stack)和堆(heap)
    面试题(Spring)
    IO复用,AIO,BIO,NIO,同步,异步,阻塞和非阻塞 区别参考
  • 原文地址:https://www.cnblogs.com/preftest/p/1790575.html
Copyright © 2011-2022 走看看