简体   繁体   English

找不到Behave的配置文件

[英]Can't find Behave's configuration file

I'm creating automated test scripts using the Python behave framework.我正在使用 Python行为框架创建自动化测试脚本。 I wanted to edit my behave configuration file ( behave.ini ), but I can't find it.我想编辑我的behave配置文件( behave behave.ini ),但我找不到它。

Where is the file located?该文件位于何处? Do I need to create the file myself in the home directory?我需要自己在主目录中创建文件吗?

Behave has an excellent and complete documentation, I recommend you always check there first. Behave 有一个出色而完整的文档,我建议您始终先查看那里。 Now, to answer your question, here's the documentation for the configuration files现在,要回答您的问题,这是配置文件的文档

Please follow the steps to add a customize configuration file for default properties请按照步骤为默认属性添加自定义配置文件

  1. Create behave.ini file and features file at the same level在同一级别创建behave.ini 文件和features 文件

在此处输入图片说明

  1. set properties in this file, which you want to run default, for example i have set default_tags=@defaulttag在这个文件中设置属性,你想默认运行,例如我已经设置了 default_tags=@defaulttag

在此处输入图片说明

  1. Now when i run the behave command, then it execute only scenario that has a tag @defaulttag现在,当我运行behave命令时,它只执行具有标签 @defaulttag 的场景

在此处输入图片说明

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

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