JMeter

From BeSTGRID

Jump to: navigation, search

Shibboleth

Contents

[edit] JMeter

There are two types of servers available for Shibboleth Identity Provider (IdP) hosting. It can be hosted either on a single powerful server with multiple virtual machines (VM) or on multiple parallel servers. Therefore it is necessary to carry out a test plan to measure the performances of above options. As the result JMeter has been chosen as the tool of performance measurement.


The latest binary of JMeter can be download from here [1].

Extract it into a directory and double click the jmeter.bat in /bin directory.

Please following the steps below to complete the set-up of this performance measurement.


[edit] General setup for the test plan

1) Add a Thread Group under the root (Test Plan)

Image:AddAThreadGroup.PNG


2) Specifies the variables at the root (Test Plan).

Note: I specifies the hostname of the IdP as 'yifan-jiang.enarc.auckland.ac.nz'

Image:TestPlanUserDefinedVariables.PNG


3) Specifies the load of the test plan by configures the Thread properties

Image:SpecifyThread.PNG


4) Add a Cookie Manager

Image:AddCookieManager.PNG


5) Add a Http Authorization Manager if there is a password protection.

Image:AuthorizationManager.PNG


[edit] SP to WAYF sub test plan set up

6) Add a HTTP Request Sampler under the Thread Group

Image:AddHttpRequestSampler.PNG


7) Specifies the HTTP Request Sampler

Image:SP2WAYFrequest.PNG


8) Add a Assertion Results Listener after the HTTP Request Sampler

Image:AddAssertionResultsListener.PNG


9) Add a 'Save Responses to a file' after the Assertion Results Listener. You can choose either store all the responses or just the failed response only.

Image:S2w-saveRespnses.PNG


10) It is necessary to extract the responded values from the responded page and then assign these values to their corresponding variables. XPath Extractor would be used for this purpose.


10.1) Extracting 'shire' from the responded page

Image:ShireExtractor.PNG

10.2) Extracting 'providerId' from the responded page

Image:ProviderIdExtractor.PNG

10.3) Extracting 'target' from the responded page

Image:TargetExtractor.PNG

10.4) Extracting 'time' from the responded page

Image:TimeExtractor.PNG


[edit] WAYF to IdP sub test plan set up

11) Add another HTTP Request Sampler for the steps from WAYF to IdP and specifies them as the following

Image:Wayf2idpRequest.PNG


12) Add a Respond Assertion to match the responded page

Image:W2i-response.PNG


13) Similar to last sub test plan set up, add an 'Assertion Results Listeners' and a 'Save Responses to a file' into this sub test plan as well.


14) Extracting 'SAML' from the responded page

Image:Idp2spSAMLExtractor.PNG


15) Extracting 'action' from the responded page

Image:Idp2spActionExtractor.PNG


16) Extracting 'target' from the responded page

Image:Idp2spTargetExtractor.PNG


[edit] IdP to SP sub test plan set up

17) Add another HTTP Request Sampler for the steps from IdP to SP and specifies them as the following

Image:Idp2spRequest.PNG


18) Add a Respond Assertion to match the responded page

Image:Idp2spResponse.PNG

19) Add an 'Assertion Results Listeners' and a 'Save Responses to a file' into this sub test plan, similar to previous sub test plan.


[edit] Debugging and Test Results Summary

20) It is helpful to print out the values of the variables during the debugging process. So click here [[2]] and download the 'bsh-commands' (e.g. bsh-commands-2.0b4.jar) into JMETER_HOME\lib. Save and restart JMeter, and then add a 'BeanShell PostProcessor' into the test plan. The script show below is an example to print out the values of all variables.

Image:VariablePrinter.PNG

21) Add a summary page to summarizes the test results

Image:SummaryReport.PNG