CAS with JMeter

Dan Mindler dmindler at rutgers.edu
Thu Sep 14 09:44:00 EDT 2006


I just caught up with this thread. I'm attaching a jmeter script we have in the hope it will help you out.

1. goes to the myRutgers uPortal welcome page
2. goes to the CAS sign-in page
3. submits userid/password (driven from a data file in form of "netid\tpassword"
4. retreives myRutgers portal login page 
5. waits random amount of time
6. logs out of portal

a. User Defined Variables - allows you to configure for your portal/cas setup
b. CSV Data Set Config - allows you to specify your netid/password data file
c. it retrieves data fields dynamically out of the CAS form/response

I'm not fully up to speed on jmeter yet, but it seems to work for us. Let me know if you have any questions (or suggestions for improvements).

Dan



tom tom wrote:
> I changed the script and now everything working fine.
> 
> We do not need to extract the service ticket as well as we do not need to
> call the
> serviceValidate etc.
> 
> JMeter got the Follow Redirects Attribute which we can make use of.
> 
> Only thing we need to extract is the lt (Login ticket)
> 
> After that for subsequest requests enable the Follow Directs.
> 
> Let me know if some one needs the jmx script.
> 
> My next step is to integrate with the uPortal and see how can I 
> switch between tabs.
> 
> 
> 
> 
> 
> 
> 
> iztok wrote:
>>> When I ran the script it complained about missing _eventId, hence I
>>> included
>>> that as a parameter (in addition I included _currentStateId=viewLoginForm
>>> as
>>> well).
>> ok...
>>
>>> Also I had to change the protocol to https with port 8443 as that's what
>>> running in our development machines.
>> sure...
>>
>>>         <cas:authenticationFailure code='INVALID_TICKET'>
>>>                 ticket '***${ServiceTicket}***' not recognized
>>> This clearly says the the regular expression extractor has not extracted
>>> the
>>> ticket properly.
>> i think that is a good bet at this point.
>>
>>> Location:
>>> http://localhost:8080/uPortal/Login?ticket=ST-13-0qUdJ6rV9scbdguEMCU
>> ok, that is good. it means you logged in and have a service ticket.
>> now all you have to do is extract the ticket and use it.
>>
>> BTW, i think it is also possible to get jmeter to follow redirects, so
>> that might be an option as the [successful] login response is a 302.
>>
>>> Then I changed the regular expression extractor look into the header
>>> instead
>>> of the body.
>>> but still it does not seem pick the ticket.
>> dont know. you will have to do some work to figure it out. from
>> memory, but default, the jmeter regex doobie looks at the whole
>> response, so headers and body.
>>
>>
>>> I have attached the modified script.
>> sorry, i dont have the setup or the time to look at this right now.
>>
>>> we are using cas 3.03 integrated with uPortal 2.5.1.
>> we were using cas 303 and later 304 on weblogic 9.1
>>
>> good luck.
>> iztok
>>
>>> iztok wrote:
>>>> there are no problems load testing with jmeter.
>>>>
>>>> use regular expressions to extract the value into the variable. this
>>>> is described in the jmeter help.
>>>>
>>>> then pass the variable as a post parameter.
>>>>
>>>> i have attached the test. this was used successfully with cas 303 and
>>> 304
>>>> iztok
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 9/13/06, tom tom <j_lalith at yahoo.com> wrote:
>>>>>
>>>>> We have integrated uPortal 2.5.1 and CAS 3.03.
>>>>>
>>>>> We are using JMeter 2.2 to do the load testing. Even though we
>>>>> passparameters like username,password and service.
>>>>>
>>>>> It does not seem to work.
>>>>>
>>>>> Has any one tried out this.
>>>>>
>>>>> Should we pass some more parameters like (which is in the CAS login
>>> page)
>>>>>  <input type="hidden" name="lt"
>>>>> value="F5466104-A8BC-3141-0F01-695926862676"
>>>>> />
>>>>>
>>>>> If so how can we give this as a parameter to the JMeter as this is a
>>>>> dynamic
>>>>> field.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/CAS-with-JMeter-tf2262934.html#a6278896
>>>>> Sent from the CAS Users forum at Nabble.com.
>>>>>
>>>>> _______________________________________________
>>>>> Yale CAS mailing list
>>>>> cas at tp.its.yale.edu
>>>>> http://tp.its.yale.edu/mailman/listinfo/cas
>>>>>
>>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/CAS-with-JMeter-tf2262934.html#a6298254
>>> Sent from the CAS Users forum at Nabble.com.
>>>
>>> _______________________________________________
>>> Yale CAS mailing list
>>> cas at tp.its.yale.edu
>>> http://tp.its.yale.edu/mailman/listinfo/cas
>>>
>> _______________________________________________
>> Yale CAS mailing list
>> cas at tp.its.yale.edu
>> http://tp.its.yale.edu/mailman/listinfo/cas
>>
>>
> 


-- 
Dan Mindler
Consulting Application Developer
Enterprise Systems & Services, Rutgers University
voice: 732 445-5429 | fax: 661 770-9330 | dmindler at rutgers.edu
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CAS-myRutgersPortal.jmx
Url: http://tp.its.yale.edu/pipermail/cas/attachments/20060914/0f5d699f/CAS-myRutgersPortal.pl


More information about the cas mailing list