Question

Background:

We have a windows installer which simply installs and starts our custom WinForms installation program. This custom installer does the real installation: creating an IIS Web Application, copying dlls, installing database, etc...

We now want to write some automated acceptance tests, which will include installing the software using the same installation procedure as we use in production. We want to start by running the acceptance tests every night on a dedicated machine, and later as part of a continuous integration pipeline.

Problem:

It is proving difficult to automate the WinForms installation program. And we do not want special installation code for the acceptance tests.

Question:

What advice do you clever people have for integrating the deployment process into an automated test?

I suspect that the decision to use WinForms for the installer was a bad choice - particularly because the resulting application does not clearly separate the UI code from the real installation code.

Was it helpful?

Solution

My recommendation would be to use an MSI based installer instead of trying to roll your own using Windows Forms. Look into using the Windows Installer XML (WiX) toolset which is a popular free open source toolset for creating installers.

Using MSI has many advantages, in particular it makes it fairly difficult to mix installer logic and UI (kind of like falling into the pit of success) and so making an unattended installer suitable for running on a remote machine is a piece of cake.

If you are already committed to your current installation method then you need to work on separating your UI and logic to the point where you can run an installation without showing any UI - its difficult to give any specific advice on how to do this without a more concrete example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top