2

In JMeter I am attempting to create a login test plan that can be used by many other test plans. The setup is as follows:

LoginTest.jmx

     TestPlan
          TestFragement
               PostLogin_HTTPRequest

OtherTest.jmx

     TestPlan
          Thread Group
               HTTPRequestDefault (Contains web server name and port, HTTP request implementation and protocol)
               HTTPCookieManager
               OnceOnlyController
                    IncludeController (Includes test plan LoginTest.jmx)
               RuntimeController
                    HTTPRequest (reverts to login page because cookie is not stored)
                    ...

The issue is that for some reason the cookie manager and request defaults are not accessed by the included login test plan so the rest of the test does not work properly because the session cookie does not exist.

Does anyone know what I may be doing wrong or can assist me in resolving this issue? I am using JMeter Version 2.5 r1158837.

Matt Pascoe
  • 8,651
  • 17
  • 42
  • 48

1 Answers1

0

As per reference 18.2.14 Include Controller:

If the test uses a Cookie Manager or User Defined Variables, these should be placed in the top-level test plan, not the included file, otherwise they are not guaranteed to work.

Aliaksandr Belik
  • 12,725
  • 6
  • 64
  • 90