0

I'm facing a problem when writing a JMeter test plan. The goal is to test an OpenXava based application.

I perform the request with firefox then I try to copy the headers, parameters and cookies in my HTTP request sampler (thus in JMeter).

There are a lot of parameters (36) sent when trying to login. I copied all of them.

However, I can't make it work.

The HTTP response seems useless. It's nearly the same I get when sending a wwrong password with Firefox :

throw 'allowScriptTagRemoting is false.';
//#DWR-INSERT
//#DWR-REPLY
var s0={};
dwr.engine._remoteHandleCallback('1','0',{application:"bdsa",changedParts:null,currentRow:-1,dialogLevel:0,dialogTitle:null,error:null,focusPropertyId:null,forwardInNewWindow:false,forwardURL:null,forwardURLs:null,hideDialog:false,module:"SignIn",nextModule:null,propertiesUsedInCalculations:null,reload:true,resizeDialog:false,selectedRows:null,showDialog:false,strokeActions:s0,urlParam:null,viewMember:"",viewSimple:false});

Do you have a clue about what is happening ? Should I try to test the login page with another method ?

Gabriel
  • 163
  • 1
  • 1
  • 15

1 Answers1

1

Why don't you just record your flow using JMeter's HTTP(S) Test Script Recorder and your browser.

  1. Set up JMeter Proxy Server
  2. Set up your browser to use JMeter as the proxy
  3. Perform the test scenario in the browser - JMeter should capture the requests under the Recording Controller
  4. Perform correlation if required. If your application is deployed in the Internet you might get benefit of cloud-based proxy service which can perform automated detection of dynamic parameters and generating the relevant code to extract the values and substitute recorded hard-coded parameters with the variables
  5. Don't forget to add HTTP Cookie Manager to your Test Plan - it deals with cookies and cookie-based authentication
Dmitri T
  • 159,985
  • 5
  • 83
  • 133
  • It didn't work. I did what you suggest (the test recorder is great btw) but the authentication still don't work with JMeter... – Gabriel Sep 25 '18 at 11:03