I started playing with JMeter to load test a rails app. I have it working for th most part but I am having a problem with InvalidAuthenticityToken when posting forms. The problem is that JMeter is recording the InvalidAuthenticityToken value to post when it runs the test. Of course its valid when recording but when I play back the token is no longer valid. Anyone gotten around this? Any other free load testing tools (that have a record feature) that might work better? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi there, I''m also having trouble with JMeter and InvalidAuthenticityToken. I managed to pull the current token from a web form with an XPathExtractor[1], but I can''t get JMeter to insert this value in subsequent form POST actions. Anyone who has experience in using values from an Extractor in subsequent requests? @Homer: did you manage to perform a login by turning protect_from_forgery off? If so, how did you configure the Cookie Manager? I can''t even seem to stay logged in with JMeter at the moment... Greetings, Marcel. 1: http://jakarta.apache.org/jmeter/usermanual/component_reference.html#XPath_Extractor On Feb 25, 6:30 pm, Homer Simpson <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I started playing withJMeterto load test a rails app. I have it > working for th most part but I am having a problem with > InvalidAuthenticityToken when posting forms. > > The problem is thatJMeteris recording the InvalidAuthenticityToken > value to post when it runs the test. Of course its valid when recording > but when I play back the token is no longer valid. > > Anyone gotten around this? > > Any other free load testing tools (that have a record feature) that > might work better? > -- > Posted viahttp://www.ruby-forum.com/.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You need to extract the authenticity_token from the page each time it loads and add it to your form post. How to instructions are provided here: http://ertw.com/blog/2010/06/29/load-testing-a-rails-app-and-the-authenticity_token/ On Thursday, February 25, 2010 9:30:30 AM UTC-8, Ruby-Forum.com User wrote:> > I started playing with JMeter to load test a rails app. I have it > working for th most part but I am having a problem with > InvalidAuthenticityToken when posting forms. > > The problem is that JMeter is recording the InvalidAuthenticityToken > value to post when it runs the test. Of course its valid when recording > but when I play back the token is no longer valid. > > Anyone gotten around this? > > Any other free load testing tools (that have a record feature) that > might work better? > -- > Posted via http://www.ruby-forum.com/. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/fJHvS6X7HaMJ. For more options, visit https://groups.google.com/groups/opt_out.