# Automated testing of fire and forget HTTP requests

**URL:** <https://club.ministryoftesting.com/t/automated-testing-of-fire-and-forget-http-requests/78243>\
**Category:** Discussions\
**Tags:** automation, api-testing\
**Created:** [8 August 2024 12:54 UTC](https://club.ministryoftesting.com/t/automated-testing-of-fire-and-forget-http-requests/78243 "2024-08-08T12:54:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthonygreen](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/anthonygreen/32/13763_2.png) [@anthonygreen](https://club.ministryoftesting.com/u/anthonygreen)\
**Post date:** [8 August 2024 12:54 UTC](https://club.ministryoftesting.com/t/automated-testing-of-fire-and-forget-http-requests/78243/1 "2024-08-08T12:54:09Z")

</div>

What approaches have people seen for automating the validation/checking of fire and forget outgoing HTTP requests?

Sceanario:  
We have a web app that sends HTTP Get requests to an analytics service to record how a user is interacting with the product.  
I want to check these outgoing HTTP request have certain values in their path.  
Other aspects of the product are tested using WDIO with Saucelabs.  
NB I have the ability to configure the app to send these requests to a different host.

The approaches I’ve been able to find so far fall into the categories or either interceptors or mocks/spies.

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/w4dd325/32/13269_2.png) [@w4dd325](https://club.ministryoftesting.com/u/w4dd325)\
**Post date:** [8 August 2024 13:16 UTC](https://club.ministryoftesting.com/t/automated-testing-of-fire-and-forget-http-requests/78243/2 "2024-08-08T13:16:39Z")

</div>

I’ve not personally worked with fire and forget calls, but my thoughts would be to request interception. You’d achieve this with a proxy tool. [Fiddler](https://www.telerik.com/fiddler/fiddler-classic) used to be my tool of choice, but I also really like [BURP Suite](https://portswigger.net/burp/communitydownload) these days. (BURP is aimed more at security testing but it would allow you to intercept the calls).

I would imagine there is a way to use a mock server to intercept and log outgoing HTTP requests too. Something like [Wire Mock](https://wiremock.org/) maybe?

---

<div class="post-metadata">

**Author:** ![anthonygreen](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/anthonygreen/32/13763_2.png) [@anthonygreen](https://club.ministryoftesting.com/u/anthonygreen)\
**Post date:** [8 August 2024 13:33 UTC](https://club.ministryoftesting.com/t/automated-testing-of-fire-and-forget-http-requests/78243/3 "2024-08-08T13:33:15Z")

</div>

Thanks James.  
I’ve considered Wiremock, but I’ve a feeling that would have to run on the machine running the browser which in this case is SauceLabs virtual boxes.

Anthony

---

<div class="post-metadata">

**Author:** ![nils](https://avatars.discourse-cdn.com/v4/letter/n/d6d6ee/32.png) [@nils](https://club.ministryoftesting.com/u/nils)\
**Post date:** [8 August 2024 13:51 UTC](https://club.ministryoftesting.com/t/automated-testing-of-fire-and-forget-http-requests/78243/4 "2024-08-08T13:51:23Z")

</div>

I have done something similar using Cypress. There seems to be a 3rd party package for WDIO [https://webdriver.io/de/docs/wdio-intercept-service/](https://webdriver.io/de/docs/wdio-intercept-service/)

---

<div class="post-metadata">

**Author:** ![a\_mcanirn](https://sea2.discourse-cdn.com/flex020/user_avatar/club.ministryoftesting.com/a_mcanirn/32/13559_2.png) [@a\_mcanirn](https://club.ministryoftesting.com/u/a_mcanirn)\
**Post date:** [9 August 2024 06:37 UTC](https://club.ministryoftesting.com/t/automated-testing-of-fire-and-forget-http-requests/78243/5 "2024-08-09T06:37:29Z")

</div>

If the client code triggers the request then you can likely use WDIO Intercept Service - [wdio-intercept-service](https://webdriver.io/docs/wdio-intercept-service/#:~:text=With%20wdio%2Dintercept%2Dservice%20you,request%20and%20corresponding%20responses%20later.)
