开发者

how to test barcode scanning while developing a application in c#

I am develop开发者_StackOverflow社区ing an application which will be used to scan the barcode from a particular document, as i am just developing who i will get know that barcode scanning is working i dont have device at the moment, can you please guide me about it.


Usually the barcode scanner will act like a normal input device (like a keyboard). It will return a number and hit enter.

Barcode scanners can act differently depending on it's settings. But they are usually configurable.


When creating our barcode controls I just bought a cheap USB scanner to test with locally. You can get a basic one for ~$50 that will give you an idea of what to expect.

While faking the input can be useful for unit testing, using a real device is a must for robust code. You'll find that the quality of the printed barcode, the paper, quirks of the scanner, etc. will reveal potential bugs that you'll never find with hard coded barcode data.

This is also why I recommend getting a cheap one - it is the most likely to exhibit odd or less than reliable results which you'll need to accommodate unless you require your customers to use a very specific model which you verify works elsewhere.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜