Giter Club home page Giter Club logo

codeception-gherkin-param's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar edno avatar ekhvalov avatar fossabot avatar gimler avatar scrutinizer-auto-fixer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

codeception-gherkin-param's Issues

Support array parameters

Extend parameter support to array

Feature: Array parameter
  In order to create dynamic Gherkin scenario
  As a tester
  I need to be able to retrieve array parameters

  Scenario: Scenario using simple parameter
    Given I have an array "test" with value "[1,2,3,4,5]"
    Then I should see "{{test[0]}}" equals to "1"

Similarly for JSON objects, I should be able to compare them with a JSON string (gherkin snippets should implement the comparison logic, the module should only return the value of the param)

Support config parameters

Extend parameter support to Codeception config data

Given a configuration file .yml
  """
  actor: Tester
  paths:
    tests: tests
    log: tests/_output
    data: tests/_data
    support: tests/_support
    envs: tests/_envs
  settings:
    bootstrap: _bootstrap.php
    colors: true
    memory_limit: 2048M
    strict_xml: true
    my_param:
      - user: 'mylogin'
      - password: 'mypassword'
  """
  When I write a scenario using the with a parameter "{{settings['my_param']['user']}}"
  Then the value of "{{settings['my_param']['user']}}" should be "mylogin"

[Insight] Unused use statement should be avoided - in src/GherkinParam.php, line 12

in src/GherkinParam.php, line 12

The class RuntimeException is declared but never used. You should remove the use statement.

 *  {{param}} will be replaced by the value of Fixtures::get('param')
 *
 */
namespace Codeception\Extension;

use RuntimeException;
use Codeception\Util\Fixtures;
use Behat\Gherkin\Node\TableNode;
use ReflectionProperty;

class GherkinParam extends \Codeception\Platform\Extension

Posted from SensioLabsInsight

undeclared static property: GherkinParam::$excludeActions

I have an error when I activate this extension

Warning: array_merge(): Expected parameter 2 to be an array, object given in /var/www/project/vendor/codeception/codeception/src/Codeception/Extension.php on line 29

Call Stack:
    0.0003     412264   1. {main}() /var/www/project/vendor/codeception/codeception/codecept:0
    0.0379    5796912   2. Codeception\Application->run() /var/www/project/vendor/codeception/codeception/codecept:43
    0.0379    5796912   3. Codeception\Application->run() /var/www/project/vendor/codeception/codeception/src/Codeception/Application.php:108
    0.0409    6030320   4. Codeception\Application->doRun() /var/www/project/vendor/symfony/console/Application.php:145
    0.0411    6033824   5. Codeception\Application->doRunCommand() /var/www/project/vendor/symfony/console/Application.php:269
    0.0412    6033824   6. Codeception\Command\Run->run() /var/www/project/vendor/symfony/console/Application.php:908
    0.0415    6037208   7. Codeception\Command\Run->execute() /var/www/project/vendor/symfony/console/Command/Command.php:255
    0.0492    7334784   8. Codeception\Command\Run->runSuites() /var/www/project/vendor/codeception/codeception/src/Codeception/Command/Run.php:390
    0.0492    7334784   9. Codeception\Codecept->run() /var/www/project/vendor/codeception/codeception/src/Codeception/Command/Run.php:495
    0.0508    7340528  10. Codeception\Codecept->runSuite() /var/www/project/vendor/codeception/codeception/src/Codeception/Codecept.php:159
    0.0511    7380296  11. Codeception\SuiteManager->__construct() /var/www/project/vendor/codeception/codeception/src/Codeception/Codecept.php:187
    0.0529    7671632  12. Codeception\Lib\ModuleContainer->create() /var/www/project/vendor/codeception/codeception/src/Codeception/SuiteManager.php:67
    0.0534    7691080  13. Codeception\Lib\Di->instantiate() /var/www/project/vendor/codeception/codeception/src/Codeception/Lib/ModuleContainer.php:92
    0.0534    7691384  14. ReflectionClass->newInstanceArgs() /var/www/project/vendor/codeception/codeception/src/Codeception/Lib/Di.php:84
    0.0534    7691544  15. Codeception\Extension\GherkinParam->__construct() /var/www/project/vendor/codeception/codeception/src/Codeception/Lib/Di.php:84
    0.0534    7691544  16. array_merge() /var/www/project/vendor/codeception/codeception/src/Codeception/Extension.php:29


Fatal error: Uncaught Error: Access to undeclared static property: Codeception\Extension\GherkinParam::$excludeActions in /var/www/project/vendor/codeception/codeception/src/Codeception/Lib/ModuleContainer.php on line 164

Error: Access to undeclared static property: Codeception\Extension\GherkinParam::$excludeActions in /var/www/project/vendor/codeception/codeception/src/Codeception/Lib/ModuleContainer.php on line 164

Call Stack:
    0.0003     412264   1. {main}() /var/www/project/vendor/codeception/codeception/codecept:0
    0.0379    5796912   2. Codeception\Application->run() /var/www/project/vendor/codeception/codeception/codecept:43
    0.0379    5796912   3. Codeception\Application->run() /var/www/project/vendor/codeception/codeception/src/Codeception/Application.php:108
    0.0409    6030320   4. Codeception\Application->doRun() /var/www/project/vendor/symfony/console/Application.php:145
    0.0411    6033824   5. Codeception\Application->doRunCommand() /var/www/project/vendor/symfony/console/Application.php:269
    0.0412    6033824   6. Codeception\Command\Run->run() /var/www/project/vendor/symfony/console/Application.php:908
    0.0415    6037208   7. Codeception\Command\Run->execute() /var/www/project/vendor/symfony/console/Command/Command.php:255
    0.0492    7334784   8. Codeception\Command\Run->runSuites() /var/www/project/vendor/codeception/codeception/src/Codeception/Command/Run.php:390
    0.0492    7334784   9. Codeception\Codecept->run() /var/www/project/vendor/codeception/codeception/src/Codeception/Command/Run.php:495
    0.0508    7340528  10. Codeception\Codecept->runSuite() /var/www/project/vendor/codeception/codeception/src/Codeception/Codecept.php:159
    0.0511    7380296  11. Codeception\SuiteManager->__construct() /var/www/project/vendor/codeception/codeception/src/Codeception/Codecept.php:187
    0.0529    7671632  12. Codeception\Lib\ModuleContainer->create() /var/www/project/vendor/codeception/codeception/src/Codeception/SuiteManager.php:67
    0.0539    7697600  13. Codeception\Lib\ModuleContainer->getActionsForModule() /var/www/project/vendor/codeception/codeception/src/Codeception/Lib/ModuleContainer.php:99
    0.0539    7700328  14. Codeception\Lib\ModuleContainer->includeMethodAsAction() /var/www/project/vendor/codeception/codeception/src/Codeception/Lib/ModuleContainer.php:145

I'm using:

  • Codeception 2.5.5
  • php 7.3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.