Jmeter and JUnit Testing.

Jmeter and JUnit Testing.


 I was asked to test my junit class in a multi-threaded environment.

 I choose JMeter.

 Download-apache-jmeter-2.6.zip for the apache jmeter site.

 Unzip the apache-jmeter-2.6.zip file.


 Use Eclipse to create a Executable jar.

 In Eclipse-click on Export

 An Export Dialogue should appear.

  1. Click on Java->runnable JAR file.
  2. Select a main Class of your project.If you dont have create a dummy main class.
  3. Under-Library Handling:Select -"Extract required libraries into generated JAR"
  4. Click on Finish.
  5. A executable Jar will be created in the specified folder with lib extracted .
  6. Also remeber the JUNIT test version,i.eJunit3 or Junit4.
  7. Also take care of the libs--dont have duplicate libs in the jar.

  In Jmeter;

  •  Go to the installation folder of Jmeter
  •  Browse Lib->junit here you will find a test.jar.Thats meant for example.
      •  Drop your application jar here.
    •  Browse to the bin dir of jmeter
    •  click on jmeter.bat
  • This will start the jmeter
    •  ON the Right side you will see the TestPlan
    •  Right Click on testplan->add->threads-thread group
    •  Enter Thread Name and Thread Properties
    •  Click on Save
  •  Right Click on Thread Group->Add->Sampler->Junit request
    •  Enter Name
    •  Select junit Class
    •  Select Metho
    • Click on Save
 Click on Junit Request->Add->Listner->View Result as a Table


  •  Click on Save
  •  Now Click on the thread group and hit Run

    • Comments

      1. I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.

        Best Java Training Institute Chennai

        Java Training Institute Bangalore

        ReplyDelete
      2. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
        java training in chennai

        ReplyDelete
      3. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
        Click here:
        angularjs training in chennai
        Click here:
        angularjs2 training in chennai
        Click here:
        angularjs4 Training in Chennai
        Click here:
        angularjs5 Training in Chennai
        Click here:
        Selenium Training in Chennai
        Click here:
        Aws Training in Chennai

        ReplyDelete
      4. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
        Click here:
        Microsoft azure training in tambaram
        Click here:
        Microsoft azure training in chennai

        ReplyDelete
      5. I simply wanted to write down a quick word to say thanks to you for those wonderful tips and hints you are showing on this site.
        Blueprism training in Chennai

        Blueprism training in Bangalore

        Blueprism training in Pune

        Blueprism online training

        Blueprism training in tambaram

        ReplyDelete
      6. I am a regular reader of your blog and being students it is great to read that your responsibilities have not prevented you from continuing your study and other activities. Love
        angularjs-Training in velachery

        angularjs Training in bangalore

        angularjs Training in bangalore

        angularjs Training in btm

        angularjs Training in electronic-city

        ReplyDelete
      7. Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say
        health and safrety courses in chennai

        ReplyDelete
      8. This is a nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.
        Microsoft Azure online training
        Selenium online training
        Java online training
        Python online training
        uipath online training

        ReplyDelete
      9. Hi,
        Good job & thank you very much for the new information, i learned something new. Very well written. It was sooo good to read and usefull to improve knowledge. Who want to learn this information most helpful. One who wanted to learn this technology IT employees will always suggest you take big data hadoop training in bangalore. Because big data course in Bangalore is one of the best that one can do while choosing the course.

        ReplyDelete
      10. Very well and informative blog..
        Thanks for sharing with us,
        We are again come on your website,
        Thanks and good day,
        Please visit our site,
        buylogo

        ReplyDelete

      Post a Comment

      Popular posts from this blog

      defining functions clojure

      Integrating Struts2 with Spring Security using Custom Login Form