Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to create script in Jmeter?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 543
    Comment on it

    Steps for Script Creation in JMeter

    1.Right Click on Test plan-> Add Thread Users-> Thread Group
    2.Right Click on Thread Group->Add Logic Controller->Transaction controller
    3.Thread Group-> CSV Data Set config
    4.Thread Plan-> HTTP Cookie Manager
    5.Add Listners as well
    6.Launch Firefox Manually & change proxy settings.
    Steps:
    a) Go to Firefox Options
    b) Go to "Advanced Network" & tab on settings.
    c) Select "Manual Proxy configuration"
    d) Enter 'localhost' and '8080' port in respective HTTP fields
    e) Select 'Use the same proxy for all protocols' Checkbox.
    f) Close all the open screens by clicking OK buttons.

    7.Start Recording
    Pre-requisite:
    Firefox should be open before start recording.
    Steps
    a) Select HTTP Proxy server displaying under Workbench.On the right hand side HTTP Proxy server options would display.
    b) Set Port 8080.
    c) Go to Target Controller Combo box. Expend Combo box. You would see added Thread Groups are displaying.
    d) Select transaction controller.
    e) You can exclude unimportant files under the "URL Patterns to Exclude" files like .jpg , .png, .gif, .ico, .css, .js,.html.
    f) Click on start button, it would start recording.
    g) Select Firefox browser & type URL.
    H )Record your test scenario for example you can perform login & logout action on the application.
    i) You can enter login credential for login action let say, username=u1 & password p1.
    j) Now go to JMeter and stop the recording by clicking Stop button.

    8.Verifying Recording

    The recorded events would display under relevant Transaction Controller. Open Tree in expended view and user would get the recorded events. One by one user can select the events and can see the details on the right hand side.

    9.Now we have done with the initial recording of the Scripts. We need to edit these scripts using parametrization:
    Steps: a).Open notepad, put desired Usernames and Passwords and Save As it with .csv extension. Provide file name Demo.csv.
    Note: Separate Username and Password field using Comma.
    b) Go to CSV data set config & dialog box will appear
    c).Give name, file location (c:\Anita\desktop\demo.csv ), variables name(username, pwd) & save it.
    d) Go to "login" trasaction controller & it would display HTTPS request on right hand side.
    e) On parameters tab in username & passwords fields "u1" & "p1" would display.
    f) Replace both fields with parameters ${username},${psw} & save it.

    10.Click on start button & open view result in table & it would display running scripts.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: