黑盒回归测试的测试框架
我正在寻找一种工具来对我们正在建造的一套设备进行回归测试。
当前的概念是为工具创建一个输入文件 (text/csv),指定被测系统的输入。 然后,该工具捕获系统的输出并将输入和输出记录到输出文件中。
输出与原始输入文件的格式相同,可用作该工具后续运行的输入,测量的输出与上次运行的值相匹配。
两次运行的结果不会完全匹配,存在一些时间差异,这取决于电池的状态,或者取决于设备的其他内部状态。
我们必须编写自己的接口,将命令从工具传递到设备并捕获设备的输出。
这是一个相对简单的任务,但我正在寻找一个现有的工具/包/库,以避免重新发明轮子/从中吸取教训。
I am looking for a tool for regression testing a suite of equipment we are building.
The current concept is that you create an input file (text/csv) to the tool specifying inputs to the system under test. The tool then captures the outputs from the system and records the inputs and outputs to an output file.
The output is in the same format as the original input file and can be used as an input for following runs of the tool, with the measured outputs matched with the values from the previous run.
The results of two runs will not be exact matches, there are some timing differences that depend on the state of the battery, or which depend on other internal state of the equipment.
We would have to write our own interfaces to pass the commands from the tool to the equipment and to capture the output of the equipment.
This is a relatively simple task, but I am looking for an existing tool / package / library to avoid re-inventing the wheel / steal lessons from.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我最近在 git 之上构建了一个这样的系统 (http://git.or.cz/) 。 基本上,编写一个程序来获取所有输入文件,将它们发送到服务器,读回输出,并将其写入一组输出文件。 第一次运行后,将输出文件提交到 git。
对于未来的运行,您的成功取决于运行完成后 git 存储库是否干净:
作为奖励,您可以使用所有 git 工具来比较差异,如果发现差异是一种改进,则提交它们,这样未来的运行将会过去。 在分支之间合并时它也非常有效。
I recently built a system like this on top of git (http://git.or.cz/). Basically, write a program that takes all your input files, sends them to the server, reads the output back, and writes it to a set of output files. After the first run, commit the output files to git.
For future runs, your success is determined by whether the git repository is clean after the run finishes:
As a bonus, you can use all the git tools to compare differences, and commit them if it turns out the differences were an improvement, so that future runs will pass. It also works great when merging between branches.
我不确定是否有一个软件包完全适合您的需求。 您需要考虑以下几点:
diff
工具,并且必须编写智能脚本。I'm not sure there will be a single package that exactly suits your needs. You have a few considerations to make:
diff
tool and will have to write an intelligent script.您可以使用任何测试框架。 困难的部分是编写工具来从测试系统发送/检索数据,而不是实际的字符串比较。
您的测试将如下所示:
You can just use any test framework. The hard part is writing the tools to send/retrieve the data from your test system, not the actual string comparisons.
Your tests would just all look like this: