关于CAS 的概念,见链接:http://www.360doc.com/content/15/0204/17/21706453_446251626.shtml

需要增加4个关联函数

//Correlation comment - Do not change!Original value='_cCAEABC83-C990-F50E-E1D5-47A39DBBFC49_k2E4795DE-DF9E-C968-290C-2B8D1317CD15' Name ='IT1'
web_reg_save_param_ex(
"ParamName=IT1",
"LB=name=\"lt\" value=\"",
"RB=\" ",
SEARCH_FILTERS,
"Scope=All",
"IgnoreRedirections=Yes",
"RequestUrl=*/login*",
LAST);
//Correlation comment - Do not change!Original value='WTWmM4E2SfD1vDXVWTL0H8nYlWyY5FeHhTtubbrQiSWPySdSD5wc!-32010790' Name ='Cookie'

web_reg_save_param_ex(
"ParamName=Cookie",
"LB=Set-Cookie: CASCOOKIENAME=",
"RB=; path",
SEARCH_FILTERS,
"Scope=All",
"IgnoreRedirections=Yes",
"RequestUrl=*/login*",
LAST);

web_url("main.jsp",
"URL=http://{UrlAddress}/pcis//core/main.jsp",
"Resource=0",
"RecContentType=text/html",
"Referer=",
"Snapshot=t13.inf",
"Mode=HTML",
EXTRARES,
"URL=/cas/images/bg_all.jpg", "Referer=http://{UrlAddress}/cas/login?service=http%3A%2F%2F{UrlAddress}%2Fpcis%2Fj_spring_security_check", ENDITEM,
"URL=/cas/images/loding-bd.png", "Referer=http://{UrlAddress}/cas/login?service=http%3A%2F%2F{UrlAddress}%2Fpcis%2Fj_spring_security_check", ENDITEM,
"URL=/cas/images/bt_button.jpg", "Referer=http://{UrlAddress}/cas/login?service=http%3A%2F%2F{UrlAddress}%2Fpcis%2Fj_spring_security_check", ENDITEM,
LAST);

lr_think_time(5);

//Correlation comment - Do not change!Original value='_cCAEABC83-C990-F50E-E1D5-47A39DBBFC49_k4F470861-B210-38CC-8694-49DC53CAAFE3' Name ='IT2'
web_reg_save_param_ex(
"ParamName=IT2",
"LB=name=\"lt\" value=\"",
"RB=\" ",
SEARCH_FILTERS,
"Scope=All",
"RequestUrl=*/login;CASCOOKIENAME={Cookie}*",
LAST);

//Correlation comment - Do not change!Original value='TGT-554-gbf7fAR41apOcy4YG1cnZ9WyYiyOcN6O0Z6d4rJOUmbaw6fYZZ-cas' Name ='Cookie'
web_reg_save_param_ex(
"ParamName=TGT",
"LB=Set-Cookie: CASTGC=",
"RB=; path",
SEARCH_FILTERS,
"Scope=All",
"RequestUrl=*/login;CASCOOKIENAME={Cookie}*",
LAST);

web_submit_data("login;CASCOOKIENAME={Cookie}",
"Action=http://{UrlAddress}/cas/login;CASCOOKIENAME={Cookie}?service=http%3A%2F%2F{UrlAddress}%2Fpcis%2Fj_spring_security_check",
"Method=POST",
"RecContentType=text/html",
"Referer=http://{UrlAddress}/cas/login?service=http%3A%2F%2F{UrlAddress}%2Fpcis%2Fj_spring_security_check",
"Snapshot=t14.inf",
"Mode=HTML",
ITEMDATA,
"Name=username", "Value=137100039", ENDITEM,
"Name=pwd", "Value=11", ENDITEM,
"Name=password", "Value=6512bd43d9caa6e02c990b0a82652dca", ENDITEM,
"Name=Submit", "Value=", ENDITEM,
"Name=lt", "Value={IT1}", ENDITEM,
"Name=_eventId", "Value=submit", ENDITEM,
"Name=mac", "Value=", ENDITEM,
"Name=ip", "Value=10.28.1.108", ENDITEM,
LAST);

web_submit_data("login",
"Action=http://{UrlAddress}/cas/login?service=http%3A%2F%2F{UrlAddress}%2Fpcis%2Fj_spring_security_check",
"Method=POST",
"RecContentType=text/html",
"Referer=http://{UrlAddress}/cas/login;CASCOOKIENAME={Cookie}?service=http%3A%2F%2F{UrlAddress}%2Fpcis%2Fj_spring_security_check",
"Snapshot=t15.inf",
"Mode=HTML",
ITEMDATA,
"Name=username", "Value=137100039", ENDITEM,
"Name=pwd", "Value=11", ENDITEM,
"Name=password", "Value=6512bd43d9caa6e02c990b0a82652dca", ENDITEM,
"Name=ticketGrantingTicketId", "Value={TGT}", ENDITEM,
"Name=CASOPDPT", "Value=37", ENDITEM,
"Name=Submit", "Value=", ENDITEM,
"Name=lt", "Value={IT2}", ENDITEM,
"Name=_eventId", "Value=submit", ENDITEM,
"Name=mac", "Value=", ENDITEM,
"Name=ip", "Value=10.28.1.108", ENDITEM,
EXTRARES,
"URL=../pcis/core/skin/default/blue_skin/left.gif", "Referer=http://{UrlAddress}/pcis/core/leftup.jsp", ENDITEM,
"URL=../pcis/core/skin/default/blue_skin/zs_header_03.gif", "Referer=http://{UrlAddress}/pcis/core/header.jsp", ENDITEM,
"URL=../pcis/core/skin/default/blue_skin/header_03.gif", "Referer=http://{UrlAddress}/pcis/core/header.jsp", ENDITEM,
"URL=../pcis/core/skin/default/blue_skin/header_02.gif", "Referer=http://{UrlAddress}/pcis/core/header.jsp", ENDITEM,
"URL=../pcis/core/skin/default/blue_skin/header_07.gif", "Referer=http://{UrlAddress}/pcis/core/header.jsp", ENDITEM,
"URL=../pcis/core/skin/default/blue_skin/header_09.gif", "Referer=http://{UrlAddress}/pcis/core/header.jsp", ENDITEM,
"URL=../pcis/core/skin/default/blue_skin/header_11.gif", "Referer=http://{UrlAddress}/pcis/core/header.jsp", ENDITEM,
"URL=../pcis/core/skin/default/blue_skin/header_13.gif", "Referer=http://{UrlAddress}/pcis/core/header.jsp", ENDITEM,
"URL=../pcis/core/skin/default/blue_skin/main_40.gif", "Referer=http://{UrlAddress}/pcis/core/bottom.jsp", ENDITEM,
"URL=../pcis/core/skin/default/blue_skin/images/leftmenubg.gif", "Referer=http://{UrlAddress}/pcis/core/left.jsp", ENDITEM,
"URL=../pcis/core/skin/default/blue_skin/menubg.gif", "Referer=http://{UrlAddress}/pcis/core/left.jsp", ENDITEM,
LAST);

web_add_cookie("00000000webfx-tree-object-3=1; DOMAIN={UrlAddress}");

web_url("left.jsp",
"URL=http://{UrlAddress}/pcis/core/left.jsp?opCde=015",
"Resource=0",
"RecContentType=text/html",
"Referer=http://{UrlAddress}/pcis/core/header.jsp",
"Snapshot=t16.inf",
"Mode=HTML",
EXTRARES,
"URL=skin/default/blue_skin/images/main_21.gif", "Referer=http://{UrlAddress}/pcis/core/left.jsp?opCde=015", ENDITEM,
"URL=skin/default/blue_skin/images/down.gif", "Referer=http://{UrlAddress}/pcis/core/left.jsp?opCde=015", ENDITEM,
"URL=skin/default/blue_skin/images/I.gif", "Referer=http://{UrlAddress}/pcis/core/left.jsp?opCde=015", ENDITEM,
"URL=skin/default/blue_skin/images/icon.gif", "Referer=http://{UrlAddress}/pcis/core/left.jsp?opCde=015", ENDITEM,
"URL=skin/default/blue_skin/images/T.gif", "Referer=http://{UrlAddress}/pcis/core/left.jsp?opCde=015", ENDITEM,
"URL=skin/default/blue_skin/images/L.gif", "Referer=http://{UrlAddress}/pcis/core/left.jsp?opCde=015", ENDITEM,
"URL=skin/default/blue_skin/images/skin1_left_3.gif", "Referer=http://{UrlAddress}/pcis/core/left.jsp?opCde=015", ENDITEM,
"URL=skin/default/blue_skin/images/up.gif", "Referer=http://{UrlAddress}/pcis/core/left.jsp?opCde=015", ENDITEM,
"URL=skin/default/blue_skin/images/blank.png", "Referer=http://{UrlAddress}/pcis/core/left.jsp?opCde=015", ENDITEM,
LAST);

LoadRunner 录制cas 登陆脚本的更多相关文章

  1. LoadRunner系列实例之— 01录制cas登陆脚本

    关于CAS 的概念,见链接 需要增加4个关联函数,初次加载页面时取cookie和it1,输入账号密码点击登录时,取ticketGrantingTicketId和it2 实际上前后台完成两次交互, // ...

  2. LoadRunner录制HTTPS协议脚本

    学习LoadRunner录制HTTPS协议脚本,其实是一个意外的收获.当我拿到要测试的URL时,我像以前的步骤一样录制脚本,但是录制结束后,发现并没有生成脚本,开始以为是LoadRunner的原因,我 ...

  3. loadrunner录制成功但脚本内容为空,无任何代码//脚本中包含乱码

    使用loadrunner录制脚本,录制过程中也会显示“正在录制…”,并且有(XX个事件).但是脚本录制结束之后,脚本中没有任何内容,没有代码显示. 解决方法: 在脚本录制程序VU generator中 ...

  4. loadrunner 录制TCP协议脚本操作

    测试TCP协议的项目,涉及到登陆.发送实时数据.指令.登出等,直接写报文工作量太大,所以需要录制报文. 操作方法如下: 1.启动服务端程序 2.使用winsocket协议 3.选择应用程序 4.录制选 ...

  5. windows执行命令来运行loadrunner录制好的脚本(收藏)

    SET M_ROOT=D:Mercury InteractiveMercury LoadRunnerincd %M_ROOT% wlrun.exe -TestPath D:ceshi10Scenari ...

  6. LoadRunner录制Web协议的脚本 (by网络)

    LoadRunner录制Web协议的脚本  http://itindex.net/detail/50530-loadrunner-web-脚本

  7. loadrunner录制脚本出现urs.asmx解决方法:

    在loadrunner录制过程中可能出现如下脚本: 解决方法: 解决办法:打开IE9的Internet选项-->高级,把设置下面安全中“启用SmartScreen筛选器”不选中,IE默认是选中的 ...

  8. Loadrunner:POP3协议录制收信,使用foxmail录制到的脚本为空

    以下录制方法使得录制到的脚本为空: (1)打开Virtual User Generator,点击“新建Vuser脚本”,在弹出的向导页面,选择“新建单协议脚本”,选择“POP3”协议,并确定 (2)在 ...

  9. Loadrunner录制https脚本

        随着公司的发展,公司原有的SVN服务器存放的内容不断增加,容量已经不能满足后续需求,首先我们想到对服务器进行扩容,然而因为各种原因服务器不能进行扩容,所以公司决定更换新的SVN服务器,在做数据 ...

随机推荐

  1. Chapter 2 Open Book——12

    I called him in when dinner was ready, and he sniffed appreciatively as he walked into the room. 当晚饭 ...

  2. OpenLDAP安装与配置

    系统:ubuntu 14.04 安装: 1. sudo apt-get install slapd ldap-utils 2. 在1的过程中会让你输了admin密码 配置: 如果安装过,只是想配置Op ...

  3. Android实现Excel表格,且表格能左右、上下滑动

    1.自定义实现一个水平滚动控件HorizontalScrollView import android.content.Context; import android.util.AttributeSet ...

  4. BFS and Queue

    BFS (Bridth First Search) can be implemented by a queue. Procedure is like this: (Q is Queue) 1, Put ...

  5. 初识golang

    golang是一门编译型的语言. 问题1:int和*int有啥区别?和c语言中有区别么? var a int = 32 var b *int = &a fmt.Println("ty ...

  6. 自定义AccessDeniedHandler

    在Spring默认的AccessDeniedHandler中只有对页面请求的处理,而没有对Ajax的处理.而在项目开发是Ajax又是我们要常用的技术,所以我们可以通过自定义AccessDeniedHa ...

  7. 使用 Eclipse Memory Analyzer 进行简单内存泄漏分析

    Java 内存泄露的根本原因: 保存了不可能再被访问的变量类型的引用.因此我们的目的就是要找出这样的引用. 1.测试代码: public class MainActivity extends Acti ...

  8. js实现td排序及分组分类

    如题 <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.o ...

  9. 编程实现Windows瞬间关机

    我们先来看看Windows正常的关机流程:①关机指令通知Windows子系统csrss.exe,csrss.exe收到通知后会和Winlogon.exe做一个数据交换,再由Winlogon.exe通知 ...

  10. 在ASP.Net中"../" "./" "~/"表示的意思

    "../" 相对当前(根据不同的语境,当前是不同的)的上一级目录"./" 就是当前目录 "~/" 当前项目的根路径,只在服务器端有效.