Pages

Wednesday, 25 January 2017

JMeter - "WorkBench" Element

     The WorkBench (deprecated JMeter 4.0 onwards) simply provides a place to temporarily store test elements while not in use, for copy/paste purposes, or any other purpose you desire. When you save your test plan, WorkBench items are not saved with it by default unless you check "Save Workbench" option. Your WorkBench can be saved independently if you like (right-click on WorkBench and choose Save ).
   
What is the use of "WorkBench" element in JMeter?
WorkBench element is very useful while scripting. You can drag and drop the elements in workbench which can be used later. The most important use of workbench is in script recording. Below are some important uses of "WorkBench"
1. It is very useful to record a script in JMeter (How to record a script in JMeter?)
2. To keep JMeter elements aside for a while
3. To exclude JMeter elements from replaying without deleting it
4. To keep the original copy of JMeter elements captured during recording 
5. To view the non-GUI result by adding a listener in the workbench and browsing a .jtl file  

How to add "WorkBench" element?
When you launch JMeter in GUI mode, you can see “Test Plan” and “WorkBench” elements appear in the top left corner of JMeter window. Refer below figure:



How to remove "WorkBench" element?
You can not remove "WorkBench" element, because it is a default element. Although you can disable it by following below steps:
1. Select "WorkBench" node
2. Right click on "WorkBench"
3. Click "Disable"

Refer below screenshot:


Other useful options (on right click)
             1. Add: To add child elements like Non-Test elements etc.
             2. Paste: To paste any copied element.
             3. Reset Gui: This option resets WorkBench attributes and make it default workbench.
             4. Open: To open another script (.jmx)
             5. Merge: To merge another script (.jmx) with current script
             6. Save Selection As...: To save Test Plan
             7. Save Node As Image: This option saves node in image form (.png)
             8. Save Screen As Image: This option saves JMeter screen in image form (.png)
             9. Enable: To enable disabled "WorkBench"
             10. DisableTo disable enabled "WorkBench" 
             11. Help: This option opens JMeter Help window 

What are the attributes of "WorkBench" element?
"WorkBench" has below attributes:
1.      Name: To provide WorkBench name.
2.      Comments: To provide comments.
3.      Save WorkBench: Check the box if you want to save WorkBench

Non-Test elements which are available on the WorkBench:
                                i.   HTTP(S) Test Script Recorder
                               ii.   HTTP Mirror Server
                              iii.   Property Display

Next Topic:
Apache JMeter - "Thread Group" Element

Previous Topic:
Apache JMeter - "Test Plan" Element

Related Topic:

15 comments:

  1. HI Gagandeep when i recording a https website using Apache jmeter why its not record instead when i have record a http webpage its recording easily

    ReplyDelete
    Replies
    1. Hi Vishal,

      1. Have you checked "Use this proxy servers for all protocol" in browser setting?

      2. If your application is secured then you need to install JMeter certificate in browser. A file called ApacheJMeterTemporaryRootCA.crt will be generated in jmeter/bin folder.
      Install this certificate in respective browser. Installation steps are given below:

      Installing the certificate in Firefox:
      a. Tools / Options
      b. Advanced / Certificates
      c. View Certificates
      d. Authorities
      e. Import …
      f. Browse to the JMeter launch directory, and click on the file "ApacheJMeterTemporaryRootCA.crt", press Open
      g. Click View and check that the certificate details agree with the ones displayed by the JMeter Test Script Recorder
      h. If OK, select "Trust this CA to identify web sites", and press OK
      i. Close dialogs by pressing OK as necessary

      Installing the certificate in Chrome or Internet Explorer:
      1. Browse to the JMeter launch directory, and click on the file "ApacheJMeterTemporaryRootCA.crt", and open it
      2. Click on the "Details" tab and check that the certificate details agree with the ones displayed by the JMeter Test Script Recorder
      3. If OK, go back to the "General" tab, and click on "Install Certificate …" and follow the Wizard prompts

      Delete
    2. I have already install this certificate and also uncheck "Capture HTTP Header" On HTTP(s) Test script recorder but As i am trying to record https site that site is recorded in mozilla browser

      Delete
    3. I have already install this certificate and also uncheck "Capture HTTP Header" On HTTP(s) Test script recorder but As i am trying to record https site that site is not recorded in mozilla browser

      Delete
    4. Means you are able to record navigation in Mozilla correct?

      Delete
    5. NO Sir It was typing mistake i am not able to record in Mozilla, MOzilla is displaying
      Error code: SEC_ERROR_UNKNOWN_ISSUER this error and as i add exception not load full page

      Delete
    6. Hi Vishal,

      Can you please try to capture application using Fiddler?

      Because, Fiddler works on the same concepts as JMeter uses for recording. If Fiddler captures the request and response then no issue with browser and need to do identify the issue in JMeter.

      Also, please check in the log file of JMeter, if you are getting any error message. After seeing exact error message; we can try to resolve the issue.

      Delete
  2. Sir my Apache ApacheJMeterTemporaryRootCA.crt is displya as expired in mozilla certificate, may be due to this reason my jmeter not record any https website so how i will download a new updated certificate

    ReplyDelete
    Replies
    1. No, that should not be an issue.

      This error you can resolve by re-installing JMeter .crt file in bin folder. Generally, JMeter generates its own certificate(s) with a default validity period of 7 days. If you double click on "ApacheJMeterTemporaryRootCA.crt", you can see the validity period.

      Hence issue is something different.

      Delete
  3. Hi Sir,
    I have solved this issue it was happening due to certificate expire i have reinstall certificate and record now recording working perfect. thanks a lot for help me.

    ReplyDelete
  4. hi
    i didn't find Workbench in Jmeter 4.0 ...only Test Plan was showing there

    ReplyDelete
    Replies
    1. Hi Pallawi,

      Workbench element has been removed from JMeter 4.0 onward.

      Delete
  5. And also the ApacheJMeterTemporaryRootCA.crt file is not present in bin folder.

    ReplyDelete
    Replies
    1. ApacheJMeterTemporaryRootCA.crt file is automatically generated when you launch JMeter first time.

      Delete