3

If I use RAP 3.0 together with JMeter and/or Gatling SelectionListeners of Buttons are never called. With RAP prior version 3.0 it is working.

button.addSelectionListener(new SelectionAdapter() {
    @Override
    public void widgetSelected(SelectionEvent e) {
        System.out.println("button pressed");
    }
});

While recording the method widgetSelected is called, but not if JMeter or Gatling is replaying it.

Does someone has a hint how to configure JMeter or Gatling?

Michael
  • 65
  • 7

3 Answers3

0

AFAIK, RAP is just a JSON format based on HTTP.

If so most probably you have an issue in your recording setup.

If you are trying to record a localhost hosted application, did you ensure that in your browser options for Proxy, you don't have "localhost" excluded (by default), if so remove it.

To test that your browser is passing through JMeter recorder, stop the JMeter Recorder and test your application, if it answers then your browser is misconfigured.

UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
  • If I stop JMeter the browser does not answer. The connection seems to be ok. Some parts in the webapp are called, but not the SelectionAdapter of a button. – Michael Jul 24 '15 at 14:23
  • Try switching to Java implementation in JMeter Test script recorder and restart it. Then if it's still failing check in Firebug or Chrome that it's really http and not websocket or some other protocol – UBIK LOAD PACK Jul 24 '15 at 14:45
  • It seams for recorded click I get a `Cause: java.io.IOException: Server returned HTTP response code: 403 for URL: ...` – Michael Jul 24 '15 at 14:59
  • Do you get this when you record or when you replay, if when you record, it's an issue, did you switch to Java in Recorder ? Could you submit the full stack trace ? Maybe it's worth submitting a bug report to JMeter. If when you replay it can be due to a non correlated value somewhere you need to find – UBIK LOAD PACK Jul 24 '15 at 15:16
  • I get this on replaying. Yes, I switched to Java in Recorder. I have to look do a deeper look into the protocoll. – Michael Jul 24 '15 at 16:53
  • use jmeter recording template, record again and look at the request in the view results tree under the recorder it will show you the working request , compare it with the replayed one you will see the missing header or dynamic parameter – UBIK LOAD PACK Jul 24 '15 at 17:08
0

What to know in RAP is, for each client action by client is sent as JSON Request to the server. The header of theses requests always contains a variable "requestCounter", incremented one by one in each user request. If in the meantime, this value jumped the next value or whatelse, the server will send a 403, or mainly a "session timeout". With JMeter, you have to play with local variables to auto-increase your JMeter variable. And alwayse start at 1.

Myndel
  • 26
  • 1
0

I had similar problem.To solve this follow the steps.

  1. Follow the steps on Eclipse Wiki site (RAP/Load Testing).
  2. After recording the script, you have to customize it. Add Regular Expression Extractor to get the "cid nr". from server, because every user have unique user number session. Regular Expression
  3. Change Path, with extracted cid.

I can't paste more than one screenshot yet, because I don't have enough comments here. For more question you can contact me.