测试 NSIS 脚本的现有解决方案

发布于 2024-10-17 03:30:24 字数 75 浏览 2 评论 0原文

有谁知道现有的解决方案可以帮助为 NSIS 脚本编写测试?

动机是了解修改现有安装脚本是否会破坏它或产生不需要的副作用。

Does anyone know of an existing solution to help write tests for a NSIS script?

The motivation is the benefit of knowing whether modifying an existing installation script breaks it or has undesired side effects.

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

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

发布评论

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

评论(3

黎歌 2024-10-24 03:30:24

不幸的是,我认为您问题的答案至少部分取决于您需要验证的内容。

如果您所担心的只是安装将正确的文件复制到正确的位置,设置正确的注册表信息等,那么几乎任何单元测试工具都可能满足您的需求。我可能会使用类似 RSpec2Cucumber,但那是因为我对 Ruby 有点熟悉,并且喜欢这样的事实:如果脚本需要在另一台计算机上运行,​​那么这将是 xcopy 部署。我还喜欢使用基于 BDD 的解决方案的想法,因为使用非常接近可读文本的特定于领域的语言意味着其他人可以更轻松地理解测试规范,并在必要时修改测试规范。

但是,如果您担心用户体验(显示哪些进度消息等),那么我不确定您需要的测试是否可以轻松表达......或者至少不会没有一定程度的痛苦。

祝你好运!不要忘记让这里的其他人知道您何时/是否找到了您喜欢的解决方案。

Unfortunately, I think the answer to your question depends at least partially on what you need to verify.

If all you are worried about is that the installation copies the right file(s) to the right places, sets the correct registry information etc., then almost any unit testing tool would probably meet your needs. I'd probably use something like RSpec2, or Cucumber, but that's because I am somewhat familiar with Ruby and like the fact that it would be an xcopy deployment if the scripts needed to be run on another machine. I also like the idea of using a BDD-based solution because the use of a domain-specific language that is very close to readable text would mean that others could more easily understand, and if necessary modify, the test specification when necessary.

If, however you are concerned about the user experience (what progress messages are shown, etc.) then I'm not sure that the tests you would need could be as easily expressed... or at least not without a certain level of pain.

Good Luck! Don't forget to let other people here know when/if you find a solution you like.

不必你懂 2024-10-24 03:30:24

查看 Pavonis

使用 Pavonis,您可以编译 NSIS 脚本并获取任何错误和警告的输出。

Check out Pavonis.

With Pavonis you can compile your NSIS script and get the output of any errors and warnings.

思念满溢 2024-10-24 03:30:24

另一个解决方案是 AutoIT。

您可以使用 Jenkins 和 NSIS 命令行编译器来编译安装,设置编写一个 AutoIT 测试脚本并让 Jenkins 运行测试。

Another solution would be AutoIT.

You can compile your install using Jenkins and the NSIS command line compiler, set up an AutoIT test script and have Jenkins run the test.

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