黑盒测试时的结果执行和呈现
我用 Python 3.2 开发了一个 Blackbox 测试环境来测试硬件。在此环境中,我有一个 TestExecution.py 模块,在其中运行测试如下:
while(True):
TestWithRestart("Test122")
TestWithRestart("Test123",keys="invalid_keys.dat")
TestWithOneComPort("Test200", keys="invalid_keys.dat")
TestWithTwoComPorts("Test200")
TestWithTwoComPorts("Test200", ppc_simulation_script="Test200.pcc")
TestWithNoComPort()
TestTime("Test500")
Test600()
TestWithComPortNoise("Test600")
TestWithComPortInteruption("Test601")
我测试的每个硬件版本在我的 PC 上由其自己的测试环境文件夹表示。该文件夹包含日志、密钥和 TestExecution.py。每个测试用例都有自己的结果文件夹,在这个文件夹中,我有每次测试执行的日志文件夹。
我也可能需要为新的硬件版本设计新的测试。在这种情况下,我可能需要多次尝试才能使该测试正常工作。
关于测试的通过/失败状态,我通过手动检查日志文件来完成此操作。下一个改进将是自动化确定测试是否通过的过程。我将为此编写单独的课程。这个过程将会持续进行。
我想知道是否可以将我的环境与持续集成软件集成,以便以良好的图形形式呈现测试执行和/或结果。选择我想要执行的测试也很好。您会推荐哪些开源软件?
谢谢,
巴里
I have developed a Blackbox Test Environment in Python 3.2 for testing a piece of hardware. In this environment I have a TestExecution.py module where I run my tests as follows:
while(True):
TestWithRestart("Test122")
TestWithRestart("Test123",keys="invalid_keys.dat")
TestWithOneComPort("Test200", keys="invalid_keys.dat")
TestWithTwoComPorts("Test200")
TestWithTwoComPorts("Test200", ppc_simulation_script="Test200.pcc")
TestWithNoComPort()
TestTime("Test500")
Test600()
TestWithComPortNoise("Test600")
TestWithComPortInteruption("Test601")
Each hardware release I test is represented on my PC by its own Test Environment folder. This folder contains logs, keys and a TestExecution.py. Each Test Case has its own results folder and in this folder I have log folders for each execution of the test.
Its also possible that I need to design new tests for a new hardware release. In this case it can take numerous attempts until I get this test to work properly.
With regard to the Pass/Fail status of a test, I do this by manually checking within my log files. The next improvement will be to automate the process of establishing if a test passed or not. I will write separate classes for this. This process will be ongoing.
I'm wondering if I can integrate my environment with Continuous Integration Software with a view to presenting both test execution and/or results in a nice graphical form. It would also be nice to select the tests I wish to execute. What open source software would you recommend?
Thanks,
Barry
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
詹金斯。例如,您可以将测试结果转储为 JUnit XML 格式,Jenkins 将自动生成不错的结果图表。
当然,插件取决于您的需求,但这里列出了基本插件以及我最喜欢的插件(其中一些捆绑在基本包中):
作为一名 Python 程序员,您还将受益匪浅Python Jenkins API 包装器。
但是,一般来说,请小心使用插件:有时它们不稳定和/或无法正常运行。查看插件修订历史记录通常可以告诉您它是否维护良好。
您可以在计算机上本地安装 Jenkins,并使用它几天,然后再决定它是否适合您的需求。
Jenkins. For example, you can dump your test results in JUnit XML format and Jenkins will automatically produce nice graphs.
Plugins depend on your needs, of course, but here is a list of the essential plugins plus my favorites (some of them are bundled in the basic package):
As a Python programmer you will also benefit greatly from Python Jenkins API Wrapper.
In general, however, be careful with plugins: sometimes they are unstable and/or don't function properly. A look at plugin revision history usually can tell you if it is well-maintained.
You may install Jenkins locally on your machine and play with it for a few days before deciding if it fits your needs.