Blazemeter / jmeter-http2-plugin

HTTP2 plugin for Apache JMeter
Apache License 2.0
46 stars 27 forks source link

Support for CORS in HTTP2 Async controller #48

Open ck-singh opened 1 year ago

ck-singh commented 1 year ago

The HTTP2 Async controller is great to simulate HTTP2 behavior similar to browsers. However, it becomes difficult to accurately simulate CORS traffic where the browser automatically triggers a preflight OPTIONS request before making a call to actual API endpoint. We do not currently have a way to correctly time the Preflight call and actual API call so that these are executed sequentially even when started in parallel (as shown in screenshot below) and this can be best simulated by using 2 different async controllers in sequence. The approach of using multiple async controllers in sequence to simulate CORS correctly becomes complicated and unrealistic when the number of such calls are large and we have several other HTTP2 calls triggered in parallel at the same time.

I have used a public website to show the lineup of Preflight and actual API call in action below-

CORS-Example