Wait for an SMS on a SIM
Wait for an SMS on a real SIM and verify its sender, its text and, for long messages, its number of parts.
Use it to check one-time passwords (OTP), notifications and alerts. When an earlier action triggers the SMS (a Send SMS or USSD action, for example), start watching from that action so the message isn't missed. You can also extract a value from the SMS, such as an OTP code, into a variable for the next actions.
Parameters
| Parameter | Required | Description |
|---|---|---|
| Expected Message | No | The SMS content you expect. The result records the match ratio. |
| Check SMS reception from a previous step | No | Start watching from a previous action's position, for SMS triggered earlier in the flow (a Send SMS or USSD action, for example). |
| SMS reception is optional | No | The test passes even if no SMS arrives; variables get their default values. Default: off. |
Results and metrics
In the action report (result), for each SMS received:
| Field | Description |
|---|---|
sender | Phone number that sent the SMS. |
message | The SMS body. |
count | Number of parts, for multi-part (concatenated) messages. |
ratio | Match ratio (0 to 100) against the expected message. |
relative_duration | How long after the watch started the SMS arrived, in seconds. |
dynamic_variables | Values extracted from the SMS (an OTP code, for example) into variables. |
In Analytics, each run feeds the SMS reception measurement with reception_duration_seconds and duration_seconds, tagged by status, antenna, and access technology.
Assertions can target sms_sender, message, concatenated_sms (part count), or extract a variable.
What's next?
Last updated on