Thursday, December 1, 2011

Recording a Test Plan

In this post we will learn how to record a test plan in JMeter.
Follow the steps below. I have kept it in simple and interactive way, so follow each step following the screen to cross-check with yours.

1] Go to jakarta-jmeter-2.5.1 > bin > ApacheJMeter (Executable Jar File)

                                                                     OR

    Go to jakarta-jmeter-2.5.1 > bin > jmeter.bat (Windows Batch File)
     You will get started to JMeter Screen.

2] Add Thread Group
                        Right Click on Test Plan > Add > Threads (Users) > Thread Group


3] Add HTTP Request to the Thread Group 
            Right Click on Thread Group > Add > Sampler > HTTP Request

            A HTTP Request element will be added below Thread Group in element tree and now Add the Server Name or IP as “ http://www.irctc.co.in



4] Add Recording Controller to the Thread Group
                     Right Click on Thread Group > Add > Logic Controller > Recording Controller


5] Add Proxy Server to the Workbench
                  Right Click on Workbench > Add > Non-test Elements > HTTP Proxy Server


6] On HTTP Proxy Server, click 3 times the “Add” button in “URL Patterns to Exclude”. This will          create 3 blank entries.
                  Enter “.*\.png” pattern, “.*\.gif” pattern and “.*\.ico” pattern


   Add Listener View Results Tree
              Click on Thread Group > Add > Listener > View Results Tree



7] Now Start the HTTP Proxy Server



8] Now go to Mozilla Firefox and type http://www.irctc.co.in



9] Now Login in as a user and do some actions on the Mozilla Firefox and just logout and Stop the recording from proxy server in JMeter and then the recordings would be generated as a script in the JMeter Window.






10] Applying Load :
            Select Thread Group
            Number of threads – enter 5
            Ramp up period – do not change
            Loop count – 5






11] At this point, we are ready to run our test plan and see what happens. But first Save the test   plan. When you're ready to run the test, there's two ways:
            Run menu > Start          OR
            Ctrl + R
While the test is running, in the upper right-hand corner, there should be a green square.
When the test is done, the box should be grey.





12] Now check the results of the script which we just run in the “View Results Tree” element below Thread Group element.





This is the way we record a test plan in JMeter. I hope you will not get any problems in recording if you follow all steps in flow.

22 comments:

  1. How to get lower berth for all passengers travelling together...because irctc allocate only one person to LB ?

    ReplyDelete
  2. what d hale is this ....its a example steps not an irctc complaint center.

    ReplyDelete
  3. Latest JMeter 2.9 has some updated in HTTP Proxy: now there is no need to add manually URL Patterns to exclude. HTTP Proxy has button "Add suggested Excludes", which are configured in jmeter.properties - by default - "proxy.excludes.suggested=.*\.js;.*\.css;.*\.swf;.*\.gif;.*\.png;.*\.jpg;.*\.bmp"
    Some other updates desribed in post Jmeter 2.9 - What's new?

    ReplyDelete
  4. Hey,
    first let me thank you for your blog, very nice for a beginner like me
    i did until step 9 (not included) when i needed to login as a user i needed to register first
    there is a mandatory field - mobile
    i cant insert it - i am from a different country +91 not good for me
    any suggestions?
    thanks
    i.

    ReplyDelete
  5. Hey,

    Superb tutorial. But i am pretty advanced user. want an advanced tutorial on this. please can you post a tutorial for advanced user.

    ReplyDelete
    Replies
    1. Hi What kind of advance you want to know buddy??

      Delete
  6. How to get side berth . Please help me..

    ReplyDelete
  7. Having Online booking ticket in mobile.. TTE is saying not a valid ticket. Please help me what to do..

    Thanks in Advance.
    Nagarjuna Kommuri

    ReplyDelete
  8. I have boarded the train and forgot to bring ticket. Ticket Collector(TC) misbehaved with me and I want to file an complaint again him. Please help.
    My Details, are : Name : Deepak S, Coach No: S3, Berth No: 49,PNR No : 4159461619.

    ReplyDelete
    Replies
    1. Install jmeter and book your complaint .........

      Delete
    2. First Check your log files and then install Jmeter....

      Delete
  9. I have boarded the train and forgot to bring ticket. Ticket Collector(TC) misbehaved with me and I want to file an complaint again him. Please help.
    My Details, are : Name : Deepak Surthi , Coach No: S3, Berth No: 49,PNR No : 4159461619.
    Mobile No: 919704382122

    ReplyDelete
  10. this is an apache-jmeter website. not an IRCTC website. Nobody from IRCTC will be able to see these complaints.

    ReplyDelete
  11. No, online booking does not work for me. Please help! Thanks in advance!

    ReplyDelete
  12. kaun chutiya hai jo IRCTC ki complaint yahan post kar raha hai

    ReplyDelete

  13. Nice blog..! I really loved reading through this article. Thanks for sharing such a amazing post with us and keep blogging...

    ABiNitio online training in Hyderabad

    ABiNitio training in Hyderabad

    online ABiNitio training in Hyderabad

    ReplyDelete
  14. thank you so much

    regard
    rahul@7mcar.com
    www.7mcar.com

    ReplyDelete
  15. thanks for sharing great article blog keeps posting like this with us. Fuel Digital Marketing is a house of the most talented content writers in Tamil Nadu, editors, and creative minds in Chennai.

    Best SEO Services in Chennai | digital marketing agencies in chennai | Best seo company in chennai | digital marketing consultants in chennai | Website designers in chennai

    ReplyDelete