My organisation is looking at implementing 2 step authentication using push notifications sent to a mobile app on Android or IOS and I am struggling to automate the associated scenarios within our Testcafe testsuite, which include
- enabling 2SA and connecting the mobile device via QR code scan from the web page and push confirmation
- Login, where push notification is sent to the mobile device automatically after success username/password authentication
- disabling 2SA via an automatically sent push notification to the mobile device
Is it possible to automate these scenarios using Testcafe, maybe using some mobile emulator or 'catching' the notifications at the API? To my knowledge, Testcafe is foremost targeted at browser testing and can also do API calls, but not consuming API messages without an associated call.
If you mean mobile push notifications (not web push notifications via Push API), there is no way TestCafe can access them since these notifications are native.