2017 © Pedro Peláez
 

behat-extension debug-extension

Debug Behat scenarios and print any information to command line

image

behat/debug-extension

Debug Behat scenarios and print any information to command line

  • Monday, May 9, 2016
  • by BR0kEN-
  • Repository
  • 0 Watchers
  • 1 Stars
  • 23,122 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 9 % Grown

The README.md

Behat Debug Extension

Print any information you'd like to a command line during the test suite execution., (*1)

Build Status Coverage Status Quality Score Total Downloads Latest Stable Version License, (*2)

Usage

Add @debug tag to your feature definition:, (*3)

@debug
Feature: Test

  Scenario: Test
  # ...

Add extension to your configuration file:, (*4)

default:
  extensions:
    Behat\DebugExtension: ~

Extend your object with a trait:, (*5)

use Behat\DebugExtension\Debugger;

class Example
{
    use Debugger;
}

Use the debug method wherever you like:, (*6)

public function method()
{
    // ...
    self::debug([
        'Function arguments: %s',
        'Second line',
    ], [
        var_export(func_get_args(), true),
    ]);
    // ...
}

As you can see the debug method processed by sprintf() function, so second argument for a method is an array of placeholders., (*7)

Messages

Also, with this extension, you able to print styled messages to a command line., (*8)

new \Behat\DebugExtension\Message('comment', 2, [
    'This is a first line of a message that will be printed to a command line.',
    'Read documentation for this class to know how to use it.',
]);

Programmatic usage

export BEHAT_DEBUG=true

This environment variable tells that messages should be printed in any way., (*9)

The Versions

09/05 2016

dev-master

9999999-dev https://github.com/BR0kEN-/behat-debug-extension

Debug Behat scenarios and print any information to command line

  Sources   Download

MIT

The Requires

 

The Development Requires

debug services behat debugger

09/05 2016

1.0

1.0.0.0 https://github.com/BR0kEN-/behat-debug-extension

Debug Behat scenarios and print any information to command line

  Sources   Download

MIT

The Requires

 

The Development Requires

debug services behat debugger