Mailbox Functions
The mailbox API allows us to have an internal message bus for our tests. The mailbox is a key value store in which each key can store an array of values. It acts as a Last in, first out (LIFO) stack, so the last message that was posted to the mailbox will be popped the first.
You can use the following functions to interact with the Mailbox.
POST
This function will add a new value to the specified key.
POP
This function will pop the last data that was added to the key.
Response:
COUNT
This function gives a count of the number of values with the current key.
Response:
DUMP
This function dumps all the content inside the key instead of popping the values one by one.
It returns an array with all the values.
Response:
DELETE
This function deletes all the data for the mentioned key.
Last updated