在干净的环境中自动运行软件测试?

发布于 2024-11-30 13:28:27 字数 377 浏览 1 评论 0原文

最近我在客户的电脑上部署了一些软件。该软件在我的开发机器上正确构建并运行,并通过了构建服务器上的所有单元和代码质量检查,但在客户端 PC 上运行时突然崩溃。

我将问题范围缩小到外部 .NET 库,该库引用了仅包含在 .NET Framework 3.5 中的本机库,而客户端的 PC 仅安装了 .NET Framework 4.0。 (罪魁祸首是Sql Server CE 3.5)。

主动检测此类问题的有效方法是什么?我可以使用在干净的环境中运行的自动化 UI 测试框架,该框架可以由构建服务器远程调用。除了回答“它在这个环境上运行吗?”的目标之外,这也可能是一系列 GUI 测试的延续。但我担心这两个目标应该有更清晰的分离,而不是集中到一组自动化测试中。有更好的办法吗?另外,这种平台兼容性测试有名称吗?

Recently I deployed some software onto a client's PC. The software built and ran correctly on my dev machine and passed all unit and code quality checks on the build server but it crashed explosively when run on the client's PC.

I narrowed the problem down to an external .NET library which referenced a native library that was only included in the .NET Framework 3.5, and the client's PC only had .NET Framework 4.0 installed. (The culprit was Sql Server CE 3.5).

What would be an effective way to detect this kind of issue proactively? I could use an automated UI testing framework running on a clean environment which could be remotely invoked by the build server. This could also be a segue into a set of GUI tests in addition to the goal of answering "Does it run on this environment?" but I'm concerned the two objectives should have clearer separation rather than being lumped together into one set of automated tests. Is there a better way? Also, is there a name for this kind of platform compatibility test?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

单挑你×的.吻 2024-12-07 13:28:28

使用 WiX 或某些此类工具将安装包装在 MSI 中,可以让您测试先决条件,例如.NET 3.5等

Wrapping your install in an MSI using WiX or some such tool would allow you to test for pre-requisites such as .NET 3.5 etc.

吻泪 2024-12-07 13:28:27

除了确保软件在尽可能接近最终安装软件的机器的环境中进行测试之外。除此之外,我怀疑是否有任何灵丹妙药可以解决此类问题。

Aparting from making sure that software is tested on the environment closing as closely as possible to the machines where software is going to be ultimately installed. Apart from that I doubt there is any magic pill which can solve these sort of issues.

若无相欠,怎会相见 2024-12-07 13:28:27

我发现在干净的环境中自动化测试过程有点矫枉过正,因为每次公开发布只需执行一次。我选择了带有“撤消磁盘”的部署环境的虚拟 PC 映像,该映像可以在每次测试运行后恢复到干净的状态。

I found it was overkill to automate the process of testing on a clean environment since it only has to be done once per public release. I settled for a Virtual PC image of my deployment environment with an "Undo disk" which can be reverted to a clean state after each test run.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文