2

I am currently using Jmeter to test the response time for an API. Lets call it API A. If API A calls API B, which is hosted on the same server but different port, is there a way for me to capture the response time of API B using Jmeter?

I realize there is a similar question here which is trying to accomplish the same thing but it does not work for me. I don't see the internal call to API B.

2 Answers2

1

You could not. Jmet is an outsider, Jmet only know there is API-A, and doesn't know the internal implementation(that API-A calls API-B).

A better design would be, for each APIs, itself should metric the total run time and log into metric server. There's a lot of options about server side metrics system you could explore.

Ahmad Shahbaz
  • 222
  • 2
  • 5
  • 20
SDEZero
  • 363
  • 2
  • 13
  • Thank you, I figured this was the case. We do have other ways of getting the metrics. We ended up just logging the response times of each API and compiling that data but was just hoping that jmeter could handle that too. Again thanks – luis granados Jan 18 '20 at 07:03
1

JMeter knows nothing about what's going on under the hood of your application, it sends a HTTP Request, waits for the response and measures the time taken as well as some other metrics.

If there is some extra activity under the hood of an API call the only way to capture it is using a profiler tool or an APM tool at the application under test end.

Dmitri T
  • 159,985
  • 5
  • 83
  • 133