I have a QR scan feature to make payments. I am trying to scan QR code through my bank app, i want to send the Image of the QR code to the camera feed and get it scanned.
I see device clouds like BrowserStack allow injecting camera images, but with physical devices I can’t find a way, can someone help me?
I have a barcode reader in my test system. I use Raspberry Pi and an display to show barcodes to the reader. Raspberry is connected via LAN cable directly to the test pc which can transfer wanted barcode images to Raspberry to be shown on the display.
Sounds like this is something one may have to build themself a test rig like @hyytiainen described.
On the desktop side, you might get away with this using virtual device camera driver (if you search the internet), which may offer an API or some interface to programmatically or manually feed some input as output of the camera. Likely where you can feed it a static image, a video file, or a live video stream from somewhere.
Such driver might be or also have a loopback or mux interface, where you output of some other device/driver or application becomes input to the virtual camera to display as output.
But I’m not aware if you can find such type virtual driver/camera for mobile device/OS. If there is you have better luck on Android than iPhone/iPad, where you can root the device, you might need to jailbreak for iOS.
I’d go with what @hyytiainen said. Also, in these sort of questions, having at least some information available like “what is the device” would help - for example, in some cases, running the app in a emulator might have the ability to mock any camera - albeit that might not be helpful. If its desktop/web app, and runs on linux, V4L2 might work
Also, is it your team that makes the banking app ? In these sort of scenario’s and in my honest opinion, its your point to talk to the devs to “ensure testability” of the application. Eg, a debug or test build could be configured to use predefined file location to acquire the raw image and then that would be fed into QRC data extraction.