承接 acquia/drupal-spec-tool 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

acquia/drupal-spec-tool

Composer 安装命令:

composer require acquia/drupal-spec-tool

包简介

A tool for specifying Drupal architecture details and generating automated tests for them

关键字:

README 文档

README

Packagist Tests

This project provides a tool for specifying Drupal architecture details and generating automated tests for them. It consists of 1) a Google Sheet for capturing specification and generating tests from it and 2) the Behat contexts that automate the generated tests (examples).

Getting started

Google sheet

Copy the current Google sheet to your Google Drive:

Google Sheet Screenshot

Behat tests

Assuming you already have Behat installed via Composer...

  1. Install the Behat contexts:

    composer require --dev acquia/drupal-spec-tool
  2. Add the new contexts to your Behat configuration, e.g.:

    # behat.yml
    default:
      suites:
        default:
          contexts:
            - Acquia\DrupalSpecTool\Context\AccessControlContext
            - Acquia\DrupalSpecTool\Context\ContentModelContext
            - Acquia\DrupalSpecTool\Context\MediaContext
            - Acquia\DrupalSpecTool\Context\MenuContext
            - Acquia\DrupalSpecTool\Context\ViewsContext
            - Acquia\DrupalSpecTool\Context\WorkflowContext
  3. Copy the default feature files (representing the out-of-the-box configuration of Lightning) to your features directory. For example, given a BLT-based project:

    mkdir -p tests/behat/features/drupal-spec-tool
    cp vendor/acquia/drupal-spec-tool/features/*.feature tests/behat/features/drupal-spec-tool/
  4. As you change the specification, update the features to match using the generated Gherkin on the "Behat" tab of the Google sheet. (See Advanced below to automate this process.)

  5. Run Behat! If the tests pass, your application matches the specification. If not, change one or the other according to your needs.

Diagrams

Diagrams aren't, strictly speaking, a feature of this package--which is focused on the Behat integration--but it's convenient to document them here. See Diagrams.

Usage

Learn more about the features of the tool and best practices for using it in the announcement blog post on the Acquia Developer Center.

Customization

You can supplement or override out-of-the-box behavior by extending and replacing the default context classes with your own, e.g.:

namespace AcmeCorp;

class CustomContentModelContext extends Acquia\DrupalSpecTool\Context\ContentModelContext {

  /**
   * Override existing functionality.
   *
   * @Then exactly the following content entity type bundles should exist
   */
  public function assertBundles(TableNode $expected) {
    // ...
  }

  /**
   * Add new functionality.
   *
   * @Then something new should be true
   */
  public function assertSomethingNew(TableNode $expected) {
    // ...
  }

}
 # behat.yml
 default:
   suites:
     default:
       contexts:
-        - Acquia\DrupalSpecTool\Context\ContentModelContext
+        - AcmeCorp\CustomContentModelContext

Supporting tools

The community has provided tools to build on the Drupal Spec Tool:

  • Drupal Spec Tool Commands - Provides commands to automatically update the Google Sheet to match an existing Drupal site. This is helpful for adding the Drupal Spec Tool on a pre-existing project.
  • Drupal Entity Generator (DEG) - Automatically generates Drupal configuration based on the Google Sheet, i.e., goes "the other way" and updates your Drupal site to match your specification.

Known issues

See open bug reports in the issue queue.

Contribution

Contributions are welcome! See CONTRIBUTING.md.

License

Copyright (C) 2018 Acquia, Inc.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

acquia/drupal-spec-tool 适用场景与选型建议

acquia/drupal-spec-tool 是一款 基于 Gherkin 开发的 Composer 扩展包,目前已累计 2.66M 次下载、GitHub Stars 达 152, 最近一次更新时间为 2018 年 05 月 23 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「Behat」 「drupal」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 acquia/drupal-spec-tool 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 acquia/drupal-spec-tool 我们能提供哪些服务?
定制开发 / 二次开发

基于 acquia/drupal-spec-tool 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.66M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 154
  • 点击次数: 31
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 152
  • Watchers: 18
  • Forks: 37
  • 开发语言: Gherkin

其他信息

  • 授权协议: GPL-2.0-only
  • 更新时间: 2018-05-23