How to automate installer testing

我的未来我决定 提交于 2019-12-18 13:19:33

问题


I'm wondering if anyone has any best practices for automating the testing of installers on various machines with potentially different hardware / software profiles and by specifying various options to the installer. The idea would be that I could write "unit test like" code to set up a machine, run the installer, then test that certain things are true. Tests might look similar to:

Test:
    Boot Machine without IIS
    Run Installer
    Assert Installer Had Errors

Test:
    Boot Machine with IIS
    Run Installer
    Assert Installer Ran

Test_Fixture:
    SetUp:
        Boot Machine with IIS

    Test:
        Run Installer without IIS install
        Assert Website Not Installed

    Test:
        Run Installer with IIS install
        Assert Website Installed

I know I could create lots of VMs, but waiting for a VM to boot for each functional test sounds like way more work than I want. What I really want is a way to virtualize the installer environment. Any suggestions?


回答1:


We have created a set of VMs and find it is very easy to manage. We run the tests for 13 different Windows installers over night. The VMs we have created our very bare bones, so it is possible to run a number of tests in parallel.




回答2:


If you have the installer runnable from the command line, it's easy to have a script to call it automatically.

Then you can use a web app testing tool to see it the install was successful, like this one http://seleniumhq.org/ For this you will need an unique way to test a new install - like a page with the current version.



来源:https://stackoverflow.com/questions/1100040/how-to-automate-installer-testing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!