mercredi 19 octobre 2016

How to run (unit) tests on virtual machine?

I have a scenario which I would like to automate via tests.

I have an app which is build by TeamCity. After build is done, I would like to get this app, create a setup (via InstallShield wizard - allready implemented), install it to virtual machine and than do some tests on current app installation state (for example check that some crucial files are not missing, they are on correct place and so on...).

I want to do it on VM so it's easy to get back to "clean" state without reinstalling OS.

What I was struggling is to find a good way how to achieve this. OS on VM will be Windows 7. I know I can call for example a batch file on that VM which will be preinstalled as part of "clean" state. And this batch file can maybe run some tests. Or I can create a custom application that would behave like real unit tests and run this executable via VM console.

But I don't think that this approach is clean and flexible.

Do you know how to achieve this? I guess there has to be a way how to test installed state of app after it was built without doing it manually every time.

Thanks for any advice on this topic

Aucun commentaire:

Enregistrer un commentaire