简体   繁体   English

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

[英]Existing solutions to test a NSIS script

Does anyone know of an existing solution to help write tests for a NSIS script? 有没有人知道现有的解决方案来帮助编写NSIS脚本的测试?

The motivation is the benefit of knowing whether modifying an existing installation script breaks it or has undesired side effects. 动机是知道修改现有安装脚本是否会破坏它或产生不良副作用的好处。

Check out Pavonis . 看看帕沃尼斯

With Pavonis you can compile your NSIS script and get the output of any errors and warnings. 使用Pavonis,您可以编译NSIS脚本并获取任何错误和警告的输出。

Another solution would be AutoIT. 另一种解决方案是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. 您可以使用Jenkins和NSIS命令行编译器编译安装,设置AutoIT测试脚本并让Jenkins运行测试。

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. 我可能会使用类似RSpec2Cucumber的东西,但这是因为我对Ruby有点熟悉,并且如果脚本需要在另一台机器上运行,它就像是一个xcopy部署。 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. 我也喜欢使用基于BDD的解决方案的想法,因为使用非常接近可读文本的特定于域的语言意味着其他人可以在必要时更容易理解并在必要时修改测试规范。

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. 别忘了让其他人知道您何时/如果找到您喜欢的解决方案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM