Reputation: 361
I'm starting a project in C# .Net, were I'll create a windows service. This service will listen to several serial ports and forward some of the data one a different serial port. I'm trying to find a CI solution which will give me end-to-end testing. Basically sending data inn on virtual serial ports to my service, then listening on the output to make sure the correct data is forwarded.
For the inputs I'll have log files that can be sent to my service under test, and I will create files with the expected results. Using com0com to create virtual serial port pairs this should be doable.
I haven't really figured out how I should structure these tests, using which language or framework. I already know a bit of Python, which have good serial port support, so I might use that to run my tests. What I need then is a decent way of controlling a suite of tests, written in Python, testing a .Net Windows service.
Is this something Hudson or CruiseControl.Net could easily do? The source code will be hosted in a Mercurial (HG) repository, and Ideally my tests would run each time I push to the server (as long as the running time is acceptable).
Does this sound like a good plan? Any other ways I could do this?
Upvotes: 2
Views: 722
Reputation: 65
To be honest, if you wish to test the logic your service is doing, I'd be inclined to mock the virtual ports in C# and verify the inputs and outputs in code, particular to the scenarios you wish to evaluate. This way you keep the code in a simple to run C# unit testing framework like NUnit, XUnit etc. I wouldn't be introducing another language into the equation, nor complicating it further.
Regardless of your choice, something like Hudson/Jenkins would be suitable for your needs, and I would recommend them over something like CruiseControl.Net as it is getting a bit long in the tooth and doesn't have the same sort of community around it.
If you have any other questions, just shoot.
Cheers, Nathan
Upvotes: 1