Saagar
Saagar

Reputation: 834

Jmeter- Test plan Functional test mode

I tried to use Functional test mode in Jmeter. But not able to find any difference. How to use Functional test mode in Jmeter ? Where it stores Response and Sampler data?

enter image description here

Upvotes: 0

Views: 3249

Answers (1)

Dmitri T
Dmitri T

Reputation: 168002

If you run your test using JMeter GUI - nowhere. The results are being kept in memory and can be visualized using View Results Tree listener


According to the documentation you will only see the difference if:

  1. You add the following line to user.properties

    jmeter.save.saveservice.output_format=xml
    
  2. Run JMeter in command-line non-GUI mode like:

    jmeter -n -t test.jmx -l result.xml
    
    • If Functional Test Mode will be unticked - only basic information will be stored in result.xml file (according to what is specified in results file configuration - see ), i.e.

      <?xml version="1.0" encoding="UTF-8"?>
      <testResults version="1.2">
      <httpSample t="298" it="0" lt="297" ct="54" ts="1540368444288" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="1597" sby="115" ng="1" na="1">
        <java.net.URL>http://example.com/</java.net.URL>
      </httpSample>
      
      </testResults>
      
    • If Functional Test Mode will be ticked - everything will be stored in results.xml file including request and response details:

      <?xml version="1.0" encoding="UTF-8"?>
      <testResults version="1.2">
      <httpSample t="176" it="0" lt="176" ct="43" ts="1540368457253" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="1613" sby="115" ng="1" na="1">
        <responseData class="java.lang.String">&lt;!doctype html&gt;
      &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Example Domain&lt;/title&gt;
      
          &lt;meta charset=&quot;utf-8&quot; /&gt;
          &lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
          &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1&quot; /&gt;
          &lt;style type=&quot;text/css&quot;&gt;
          body {
              background-color: #f0f0f2;
              margin: 0;
              padding: 0;
              font-family: &quot;Open Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;
      
          }
          div {
              width: 600px;
              margin: 5em auto;
              padding: 50px;
              background-color: #fff;
              border-radius: 1em;
          }
          a:link, a:visited {
              color: #38488f;
              text-decoration: none;
          }
          @media (max-width: 700px) {
              body {
                  background-color: #fff;
              }
              div {
                  width: auto;
                  margin: 0 auto;
                  border-radius: 0;
                  padding: 1em;
              }
          }
          &lt;/style&gt;    
      &lt;/head&gt;
      
      &lt;body&gt;
      &lt;div&gt;
          &lt;h1&gt;Example Domain&lt;/h1&gt;
          &lt;p&gt;This domain is established to be used for illustrative examples in documents. You may use this
          domain in examples without prior coordination or asking for permission.&lt;/p&gt;
          &lt;p&gt;&lt;a href=&quot;http://www.iana.org/domains/example&quot;&gt;More information...&lt;/a&gt;&lt;/p&gt;
      &lt;/div&gt;
      &lt;/body&gt;
      &lt;/html&gt;
      </responseData>
        <cookies class="java.lang.String"></cookies>
        <method class="java.lang.String">GET</method>
        <queryString class="java.lang.String"></queryString>
        <java.net.URL>http://example.com/</java.net.URL>
      </httpSample>
      
      </testResults>
      

More information:

Upvotes: 1

Related Questions