Mountebank Record Replay multiple responses for same request

199 views
Skip to first unread message

Nesa Ganesh

unread,
Apr 22, 2022, 4:55:11 AM4/22/22
to mountebank-discuss
Hello Guys,

I am new to Mountebank and working as an Automation tester
I am trying to record the tests and replay tests with recorded mock data 

My application has a UI user journey where it hits the same request multiple times and capture responses for the same request when I am playing back it only fetches the first response but my tests expecting the data from second or third responses 

so how can I tell mountebank to give the responses back to the request calls as it got recorded 

Kindly please let me on this 

{
    "protocol": "https",
    "port": 35892,
    "numberOfRequests": 0,
    "name": "MB_Test",
    "recordRequests": false,
    "key": "-----BEGIN RSA PRIVATE -----\n",
    "cert": "-----BEGIN-----END CERTIFICATE-----\n",
    "mutualAuth": false,
    "requests": [],
    "stubs": [
        {
            "predicates": [
                {
                  "equals": {
                    "method": "POST"
                  },
                  "caseSensitive": false
                }
              ],
            "responses": [{
                    "proxy": {
                        "key": "-----BEGIN RSA PRIVATE -----\n",
                        "cert": "-----BEGIN-----END CERTIFICATE-----\n",
                        "to": "https://api-XXXX.XXXX.XXXX.com/",
                        "mode": "proxyAlways",
                        "predicateGenerators": [{
                                "matches": {
                                    "path": true,
                                    "method": true
                                },
                                "caseSensitive": false
                            }
                        ]
                    }
                }
            ]
        }
    ]
}


Nesa Ganesh

unread,
Apr 23, 2022, 4:50:06 AM4/23/22
to mountebank-discuss
sorry about the spam managed to do replay the tests successfully 

skumar y

unread,
Apr 2, 2024, 8:20:58 PM4/2/24
to mountebank-discuss
Hi Ganesh,

Please let me know the solution you used to solve this.

Reply all
Reply to author
Forward
0 new messages