Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor how the debug is handled #25

Merged
merged 17 commits into from
Mar 31, 2017
Merged

Refactor how the debug is handled #25

merged 17 commits into from
Mar 31, 2017

Conversation

Taluu
Copy link
Owner

@Taluu Taluu commented Mar 28, 2017

Fixes #24 : Move the DebugRest context into a proper listener

  • Move the damn thing
  • Change the necessary tag from @api to @http
  • Make it work for all kind of scenarios (Background, Scenario and ScenarioOutline)
  • Debug why on ScenarioOutline only the last request is debugged (and not the other ones)
  • Add more specific debug options (like something allowing to debug moar, through composition : see Refactor how the debug is handled #25 (comment))
  • Rename the --api-debug into --behapi-debug (as --debug is already taken, and was changed thanks to @lunika in rename debug option in full-debug #1)

echo (string) $response->getBody();
}

echo "\n";
Copy link
Owner Author

@Taluu Taluu Mar 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo : add some sort of separator ? otherwise it goes

| Request: ...
| Request Content-Type: ....
| Response status: ...
| Response Content-Type: ...

{
...
}
| Request: ...
| Request Content-Type: ....
| Response status: ...
| Response Content-Type: ...

{
...
}

Or maybe another (!) line break... ?

@Taluu
Copy link
Owner Author

Taluu commented Mar 29, 2017

Another thing that is quite bothersome : With passing the Debug into a listener, we lose the possibility to erase it with custom headers.

so todo : have something like a composition (sub services ?) to add debug possibilities, which would (re)define the getDebug method

@Taluu Taluu changed the title Debug http listener Refactor how the debug is handled Mar 30, 2017
@Taluu
Copy link
Owner Author

Taluu commented Mar 30, 2017

To do in a later pass : using Behat's printers instead of doing echos (better handling of errors, outputs, and all)

@Taluu Taluu merged commit 570699b into master Mar 31, 2017
@Taluu Taluu deleted the debug-http-listener branch March 31, 2017 07:30
@Taluu Taluu modified the milestone: v1.0 Mar 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants