alfred-nutile-inc/behat-laravel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

alfred-nutile-inc/behat-laravel

最新稳定版本:v1.5.1

Composer 安装命令:

composer require alfred-nutile-inc/behat-laravel

包简介

Adding BDD test with Behat to laravel 4

README 文档

README

ProjectStatus

Behat-Laravel is a solution test your application using the BDD methodology.

Features:

Current:

  • Create the folder structure to for receiving the Acceptance tests.
  • Run the acceptance test.
  • Ingration with Zizaco/TestCases-Laravel, that provide the useful methods test your application.

Quick start:

Required setup

In the require key of composer.json file add the following:

"guilhermeguitte/behat-laravel": "dev-master"

Run the Composer update comand

$ composer update

In your config/app.php add 'GuilhermeGuitte\BehatLaravel\BehatLaravelServiceProvider' to the end of the $providers array

'providers' => array(

    'Illuminate\Foundation\Providers\ArtisanServiceProvider',
    'Illuminate\Auth\AuthServiceProvider',
    ...
    'GuilhermeGuitte\BehatLaravel\BehatLaravelServiceProvider',

),

Install selenium.

http://docs.seleniumhq.org/download/

Commands

Now generate the Behat's structure folder using the follow artisan's command:

$ php artisan behat:install

You can pass the test path if you not using the app/tests which folder`s test.

$ php artisan behat:install --test_path==your/test/path

Generating Documentation

You can create a document in html just run:

$ php artisan behat:html # will create a file at application's root

or

$ php artisan behat:html --out path/you/need/doc.html # will create a file specified path

Structure

http://docs.behat.org/

Adding Contexts

When you create a contextat folder tests\acceptance\contexts this files will be included at FeatureContext preventing the specification of files that will used to tests.

$ php artisan behat:feature --name=NameOfFeature

Will create:

    app\tests\acceptance\contexts\NameOfFeatureContext.php
    app\tests\acceptance\features\name_of_feature\name_of_feature.feature

Running tests

To run all test, you can use the follow command:

$ php artisan behat:run

To run tests for specific features, you can specify the name of the folder or the .feature file:

$ php artisan behat:run name_of_feature
$ php artisan behat:run name_of_feature/name_of_feature.feature
$ php artisan behat:run name_of_feature/separated_scenarios.feature

If you have large feature files and you only want run a specific senario use

$ php artisan behat:run --name="name of feature"

Laravel behat currently supports the following command line options from behat:

 --format (-f)        How to format features. pretty is default.
                      Default formatters are:
                      - pretty: Prints the feature as is.
                      - progress: Prints one character per step.
                      - html: Generates a nice looking HTML report.
                      - junit: Generates a report similar to Ant+JUnit.
                      - failed: Prints list of failed scenarios.
                      - snippets: Prints only snippets for undefined steps.

 --no-snippets        Do not print out snippets
 --profile (-p)       Specify config profile to use.
 --name               Only execute the feature elements which match
                      part of the given name or regex.

License

Behat-Laravel is free software distributed under the terms of the MIT license

alfred-nutile-inc/behat-laravel 适用场景与选型建议

alfred-nutile-inc/behat-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 802 次下载、GitHub Stars 达 0, 最近一次更新时间为 2014 年 11 月 06 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 alfred-nutile-inc/behat-laravel 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 802
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 14
  • Forks: 15
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-11-06