简体   繁体   English

如何使用某些单元测试框架运行Python和行为测试?

[英]How to run Python & Behave tests with some unit test framework?

I need to run my tests (written with Python and Behave) without using console. 我需要在不使用控制台的情况下运行测试(用Python和Behave编写)。 I prefer to create simple Python script and use some unit test runner. 我更喜欢创建简单的Python脚本并使用一些单元测试运行器。 I'm thinking about unittest, but pytest and nose solutions are also welcome:) I couldn't find any hint on behave's homepage. 我正在考虑单元测试,但是也欢迎pytest和鼻子解决方案:)我在行为的首页上找不到任何提示。

behave is the " test runner ". 表现是“ 测试跑步者 ”。 Use the "-o " option to store your results somewhere for whatever format(her) you want to use. 使用“ -o”选项可将结果存储在任何要使用的格式处。

NOTE: It is basically the same like py.test . 注意:它与py.test基本相同。

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

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