Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I work in the prodution area at my works and I design and create the software to run our automated test equipment for testing our products. Everytime I get involved with a new machine I end up with a different and (hopefully) better design. Anyway I have come to the point where I feel I need to start standardizing all the machines with the same program. I see a problem when it comes to applying updates as at the moment the test procedures are hard coded into the program at each station. I neeed to be able to update the core program without affecting the testing section.

The way I see it is that this will mean splitting the program into 2 sections.

  1. Main UI - This is the core that talks to everything on the machine such as cameras, sensors, printer etc and is a standalone application.
  2. Test Procedure - This is the steps that is executeted everytime the machine runs through a test.

The main UI will load the test procedure and execute when ever a test is required.

My question is what is the best approach to this in terms of having an application load a file and execute the code with in? Take into account that the code in the test procedure will need access to public methods on the UI/core system to communicate to sensors etc. I have heard about MS Roslyn and had a quick look, would this solve my issue?

share|improve this question

migrated from Mar 31 '12 at 23:38

This question came from our site for professional and enthusiast programmers.

I think it belongs to Programmers.SE – om-nom-nom Mar 30 '12 at 13:53
And consider to look at dependency injection and in particular -- it allow you to define parts of your app and dependencies between them in xml and thus don't require to recompile your code. – om-nom-nom Mar 30 '12 at 13:56
Never seen Programmers.SE, just checked it out and your probably right. I will take a look at dependency injection, cheers for that. – Gaz83 Mar 30 '12 at 14:30
What benefits will "standardisation" net you? How similar are the test equipment machines? – whatsisname Apr 1 '12 at 5:51
Well by standardising you only have one program to maintain and the operators won't need training on how to use difference machines. Plus it looks better when people walk around and see the same UI interface on all the machines. They are very similar as they are all in house built machines so we try to use similar components. I have a dll file wich communicates to various different sensors, PLC's, Cameras etc – Gaz83 Apr 2 '12 at 8:30

It sounds like what you need for the test procedure is Automated GUI testing. This allows you to replay GUI actions (normally via a script) and then check the results. The Main GUI as you describe remains unchanged and is just automated via the GUI Tester.

Below are some links with futher references:

There's some functionality built into VS 2010 (Premium) called 'Coded UI'

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.