indigophp/oro-behat-extension

此软件包已被弃用且不再维护。未建议替代软件包。

Oro Platform 的 Behat 扩展

安装: 209

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 1

类型:behat-extension

v0.3.0 2016-08-19 18:37 UTC

This package is auto-updated.

Last update: 2021-11-24 09:11:18 UTC


README

Latest Version Software License Build Status Code Coverage Quality Score Total Downloads

为 Oro Platform 提供的 Behat 扩展。

安装

通过 Composer

$ composer require indigophp/oro-behat-extension

使用方法

此软件包提供了一些工具,以简化使用 功能测试,通过 Behat 为基于 Oro Platform 的应用程序。

支持的功能

与原始 Oro 行为不同,事务回滚和重建索引是按场景而不是按功能(测试用例)进行的。

首先,您需要配置 Behat 和 Symfony2 扩展

default:
    # ...
    extensions:
        Behat\Symfony2Extension: ~

之后,您需要配置一个包并加载 Oro 上下文

default:
    suites:
        acme:
            type: symfony_bundle
            contexts:
                - Indigo\Oro\Behat\Context\OroContext
                - Acme\Bundle\AcmeBundle\Features\Context\FeatureContext
            bundle: AcmeBundle
    # ...

现在您可以编写您的功能

@dbIsolation
Feature: I do something
    In order to something
    As someone
    I should be able to do that thing

    @wsse
    Scenario: I do the thing using the REST API
        Given I am someone
        When I do the thing using the REST API
        Then the thing should have been done

    @dbReindex
    Scenario: I search for something
        Given I am someone
        When I search for something
        Then I should see that thing

测试

$ composer test

贡献

请参阅我们位于 developers.indigophp.com 的贡献指南。

安全

如果您发现任何安全相关的问题,请通过 security@indigophp.com 联系我们。

许可证

MIT 许可证 (MIT)。有关更多信息,请参阅 许可证文件