如何自动化安装程序测试 [英] How to automate installer testing

查看:27
本文介绍了如何自动化安装程序测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人有任何最佳实践来自动测试具有可能不同硬件/软件配置文件的各种机器上的安装程序,并通过为安装程序指定各种选项.我的想法是我可以编写类似单元测试"的代码来设置机器,运行安装程序,然后测试某些事情是否正确.测试可能类似于:

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?

推荐答案

我们创建了一组虚拟机,发现它非常易于管理.我们通宵运行 13 个不同的 Windows 安装程序的测试.我们创建的虚拟机非常简单,因此可以并行运行多个测试.

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.

这篇关于如何自动化安装程序测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆