froggdev/behat-installer 问题修复 & 功能扩展

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

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

froggdev/behat-installer

Composer 安装命令:

composer require froggdev/behat-installer

包简介

Easy Behat installation with new features and multiple reports options.

README 文档

README

Latest Stable Version Latest Unstable Version Total Downloads License

behat-installer

This package install BeHat to your symfony projet (or a new symfony project) configured to work with Selenium directly after installing this package.

Adding additionnal contexts & functionnalities to Behat

  • Advanced demo with Selenium navigation
  • Demo with Internet Explorer using BeHat Profile configuration
  • Demo with Environment options
  • Lot of new contexts
  • possibility to define and use variables in scenarios
  • HTML report using emuse/behat-html-formatter
  • (optional) copy the html report and zip it if no error occured
  • (optional) sending mail once test are done

Installation

Symfony

Using symfony.exe

Symfony new ./myProject --version=4.4

Or with composer create-project command

composer create-project symfony/skeleton ./myProject 4.4.99

Package

composer require --dev froggdev/behat-installer

Installation & configuration

php bin\console behat:install

Run BeHat

command to run BeHat advanced demo with Selenium

vendor\bin\behat

Todo list

  • Install without stability dev required
  • Remove package remove bootstrap.php ( was in symfony extension recipies)
  • symfony 5.0
            behat/behat/Testwork/src/ServiceContainer/Configuration/ConfigurationTree.php 
            // Symfony <= 4.4
            $tree = new TreeBuilder();
            $root = $tree->root('testwork');
            // Symfony >= 5.0
            $tree = new TreeBuilder('testwork');
            $root = $tree->getRootNode();
            // Symfony <= 4.4
            Symfony\Component\EventDispatcher\Event 
            // Symfony >= 5.0            
            Symfony\Contracts\EventDispatcher\Event
           // Symfony >= 5.0  
           mink-drivers/src/BrowserKitDriver.php
           public function __construct($client
           
           behat/Behat/src/Output/Node/Printer/CounterPrinter.php
           public function __construct(
                   ResultToStringConverter $resultConverter,
                   ExceptionPresenter $exceptionPresenter,
                   $translator,
                   $basePath
                   
           behat/Behat/src/Output/Node/Printer/ListPrinter.php
           public function __construct(ResultToStringConverter $resultConverter, $translator)
           
           behat/Behat/src/Gherkin/Cli/SyntaxController.php               
           public function __construct(KeywordsDumper $dumper,  $translator)
           
           behat/Behat/src/Definition/Translator/DefinitionTranslator.php
           public function __construct($translator)
           
           behat/Behat/src/Context/Cli/ContextSnippetsController.php           
           public function __construct(ContextSnippetGenerator $generator,  $translator)
           
           behat/Behat/src/Snippet/Printer/ConsoleSnippetPrinter.php
           public function __construct(OutputInterface $output,  $translator)
           
           behat/Behat/src/Transformation/Transformer/RepositoryArgumentTransformer.php    
           public function __construct(
                   TransformationRepository $repository,
                   CallCenter $callCenter,
                   PatternTransformer $patternTransformer,
                   $translator
                   
           behat/Behat/src/Context/Cli/InteractiveContextIdentifier.php

           behat/Testwork/src/EventDispatcher/Tester/EventDispatchingExercise.php
           $this->eventDispatcher->dispatch( $event,$event::BEFORE);
           $this->eventDispatcher->dispatch( $event,$event::AFTER_SETUP);
           
           behat/Testwork/src/EventDispatcher/TestworkEventDispatcher.php   
           // Symfony <= 4.4  
           //$this->doDispatch($this->getListeners($eventName), $eventName, $event);
           // Symfony >= 5.0  
           $this->callListeners($this->getListeners($eventName), $eventName, $event);
           
           behat/Testwork/src/EventDispatcher/Tester/EventDispatchingSuiteTester.php
           $this->eventDispatcher->dispatch( $event,$event::BEFORE);
           $this->eventDispatcher->dispatch( $event,$event::AFTER_SETUP);
           
           behat/Behat/src/EventDispatcher/Tester/EventDispatchingFeatureTester.php
           $this->eventDispatcher->dispatch($event,$event::BEFORE);
           $this->eventDispatcher->dispatch($event,$event::AFTER_SETUP);
           
           behat/Behat/src/EventDispatcher/Tester/EventDispatchingScenarioTester.php
           $this->eventDispatcher->dispatch($event,$this->beforeEventName);
           $this->eventDispatcher->dispatch($event,$this->afterSetupEventName);
           $this->eventDispatcher->dispatch($event,$this->beforeTeardownEventName);       
           $this->eventDispatcher->dispatch($event,$this->afterEventName);
           
           behat/Behat/src/EventDispatcher/Tester/EventDispatchingStepTester.php
           $this->eventDispatcher->dispatch($event,$event::BEFORE);
           $this->eventDispatcher->dispatch($event,$event::AFTER_SETUP);
           $this->eventDispatcher->dispatch($event,$event::BEFORE_TEARDOWN);
           $this->eventDispatcher->dispatch($event,$event::AFTER);
           
           behat/Behat/src/EventDispatcher/Tester/EventDispatchingFeatureTester.php
           $this->eventDispatcher->dispatch( $event,$event::BEFORE_TEARDOWN);
           $this->eventDispatcher->dispatch($event,$event::AFTER);
           
           + other $this->eventDispatcher->dispatch( ...
           
           + todo $this->translator->transChoice( ...
        
  • Work with IE
  • Remove ralouphie package
  • Script behat:config
  • add uservar to user feature
  • Bug result ok is based only on 1st scenario
  • Replace :value to RegExp
  • Do more advanced scenario
  • Add demo with BeHat TAG sample
  • Linux version
  • Translation

Credits

Maintainers

Frogg FroggDev

Specials thanks

Mouncef ZAGHRAT

Copyright

Copyright (c) 2019 Frogg admin@frogg.fr.

froggdev/behat-installer 适用场景与选型建议

froggdev/behat-installer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 41 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 12 月 08 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 froggdev/behat-installer 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-12-08