A lightweight npm library designed to generate temporary mobile numbers that shall be used for SMS verification as part of end-to-end testing with Cypress. It streamlines the process of testing OTP,2FA -related functionalities in your applications.
Thanks https://receive-smss.com/ 🙏
- Quick Setup: Easily integrate with your Cypress tests.
- Disposable mobile numbers: Generate temporary mobile numbers for testing sign-ups, password resets, and more.
Install cypress-temp-sms
using below command:
npm install cypress-temp-sms --save-dev
Add below line in your Cypress project - cypress/support/commands.js
import 'cypress-temp-sms'
cy.getRandomNumber()
//Returns you a temp number generated using https://receive-smss.com/
cy.getNumberFrom('India')
//Returns you a temp number generated using https://receive-smss.com/
cy.getSMS('+123456789')
//Returns below array object for the SMS inbox data. ( Last 40 Messages )
{ sender: string, message: any, received: string }[]
Contributions are welcome!
#HappyTesting