I'm making UI tests for an application that scans barcodes. I've successfully found a way of inserting a barcode image in the emulator virtual scene to test scanning following this post.
I've made it following this answer since it was exactly what I needed:
The problem is that I want to test different barcode images for each test case, and I'm trying to find a way of doing it.
An approach I've thought is replacing the image in real time, but I think you need to restart the emulator plus it looks dirty and I don't know how to implement it in kaspresso. Another way is injecting a fake result in the scanner, but then the purpose of end-to-end UI tests is lost so...
What would be the best approach to do this and implement it (if possible). I'm looking for answers but it seems no one has done it yet.
I've also sen there are macros in the resource folders in emulator folder, this may be useful but I don't know how to use them: