I have written a class that implements some BLE scanning functionality. I have also written some test code that helped me to manually verify my scanner works as intended.
Now I want to somehow preserve that test code for future use. But I find myself stumped - how would I do this? I am currently using a unit test method, but that's really just because it was the easiest way to add some test cases that I can run on demand with a single mouse click. The actual test however isn't suitable for being committed as a unit test, because:
- it depends on external factors to have a result (it needs one BLE device in range to see that the code actually does something)
- I can't really assert that result (since the "result" depends on the devices in range of the computer that's running the test, it will be always different)
- the execution time is a scan period of 40 seconds, not milliseconds
All this pretty strongly suggests "not a unit test", since it goes against any reasonable definition of what constitutes a unit test. But what else is there, actually? Apart from maybe creating a brand new C# project with a console application, is there any feature in the MS Test framework that I can use to provide future me and my colleagues with code they can "just run" to check if the scanner works?
(Note: I'd usually ask SO, but I guess this maybe fall under the category of "asking for tools", so I figured I'm better off asking here)