punktde / codeception-cli
此软件包为Codeception测试的cli提供gerhkin步骤定义
3.0.0
2023-08-30 14:48 UTC
Requires
- codeception/codeception: ^5.0
- codeception/module-cli: ^2.0
This package is auto-updated.
Last update: 2024-08-30 01:23:23 UTC
README
Codeception CLI模块的Gherkin步骤
如何使用
只需将特性 PunktDe\Codeception\Cli\ActorTraits\Cli
添加到您的测试actor中。然后您可以使用 *.feature
文件使用新步骤编写您的Gherkin测试。
示例actor
<?php
/*
* (c) 2018 punkt.de GmbH - Karlsruhe, Germany - http://punkt.de
* All rights reserved.
*/
/**
* Inherited Methods
* @method void wantToTest($text)
* @method void wantTo($text)
* @method void execute($callable)
* @method void expectTo($prediction)
* @method void expect($prediction)
* @method void amGoingTo($argumentation)
* @method void am($role)
* @method void lookForwardTo($achieveValue)
* @method void comment($description)
* @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL)
*
* @SuppressWarnings(PHPMD)
*/
class AcceptanceTester extends \Codeception\Actor
{
use _generated\AcceptanceTesterActions;
use \PunktDe\Codeception\Cli\ActorTraits\Cli; // use the cli steps trait
}
有哪些步骤?
要获取所有可用的步骤,您只需运行以下命令
vendor/bin/codecept -c path/to/codeception.yaml gherkin:steps suiteName
这将为您提供所有可用步骤的表格。