mercredi 11 novembre 2020

Use image or video as camera in android for Testing

My app scans barcodes using a barcode SDK. I want to run automated tests on my app using an emulator. In the future I want to run this on Jenkins but for now on the local emulator is fine.

The problem is, that I don't know, how to replace the camera with an image or video file. I don't want to scan a barcode for every single test I run. Instead I want to run automated tests. Is there a way to do this? I can't mock the camera, because the SDK has control over it, or can I?

Using these classes http://www.tomgibara.com/android/camera-source lets me mock a camera, but how do I pass that to the sdk?

Aucun commentaire:

Enregistrer un commentaire