-
Notifications
You must be signed in to change notification settings - Fork 280
Dredd redirects server output #593
Comments
I think you want the |
Ha, I forgot about |
@ecordell I wasn't aware of that option. Good catch! |
I think the dot reporter is not working. Dredd stall when used with that reporter. |
I am using the dot reporter, but for some reason, the output is not what I am expecting. Instead of having something like
I have something like:
How should I configure dredd to get the output I'd like? |
Seems like a bug to me. My fault, I should have better check if everything works as expected when closing #594. Looks like the dot reporter never properly worked and you are digging it up from its tomb. I'm sorry for the issues, but many thanks for going through this! I'll try to look into it in following days. |
@honzajavorek Thanks! |
@aledeg I wasn't able to reproduce this. What exactly is your setup? This is what I get:
How do you run Dredd, what is your |
@honzajavorek I use dredd 2.0 Here is my config file: dry-run: null
hookfiles: [tests/dredd/*Hook.php]
language: vendor/bin/dredd-hooks-php
sandbox: false
server: 'php -S 127.0.0.1:8888 -t web/'
server-wait: 3
init: true
custom: {}
names: false
only: []
reporter: dot
output: []
header: []
sorted: false
user: null
inline-errors: false
details: false
method: []
color: true
level: info
timestamp: false
silent: false
path: []
hooks-worker-timeout: 50000
hooks-worker-connect-timeout: 15000
hooks-worker-connect-retry: 500
hooks-worker-after-connect-wait: 1000
hooks-worker-term-timeout: 50000
hooks-worker-term-retry: 500
hooks-worker-handler-host: localhost
hooks-worker-handler-port: 61321
blueprint: apiary.apib
endpoint: 'http://127.0.0.1:8888/app_dredd.php' When I wrote that ticket, it was with the previous stable version. But I did reproduced the same behavior. It might be linked to my environment though. |
Thanks for getting back! Do you think it's possible that PHP hooks produce the extra output? What is the output if you run Dredd without them? Or maybe the server ( |
@honzajavorek Here are the tests I ran:
It looks like I need some changes on my end. I'll keep you posted |
Ah, I'm sorry for advicing you to use If you have Python, you can use this for a server: |
No problem. We all have the same problem in the morning :P I replaced FYI, I am testing an API written in PHP using Symfony 3 and API platform |
Then the logging comes from the server. The question is, whether Dredd should mute the server output or redirect it. Is it useful? Maybe it would be better if it was |
In my use case, I don't need the output when it's normal. But if there is an error, I want to see it. |
@aledeg Any updates on this? |
@honzajavorek unfortunately no :( I didn't have the time to investigate. I'll keep you posted though |
@honzajavorek I found the culprit. It's the PHP server launched by dredd. I need to find how to silent it. |
@aledeg what is the problem with the php server?? |
@ddelnano Everytime you call the server, it outputs something like @honzajavorek As I am using Symfony for my developments, I've changed I still have a problem with the output, though. If I keep the default level, I have the following output:
If I set the
I wish I could have something in between, for instance:
Maybe adding a level |
@aledeg ok I see. So I am thinking that would probably be a concern of Dredd's. It should properly swallow the server's stdout / stderr in order to print clean dot reporting. |
@aledeg @ddelnano That's a question. Should Dredd generally swallow server output or not? In current codebase, it's hard to swallow the output just for a certain reporter (moreover, you can have multiple reporters). I see three options:
What would be most useful, in your opinion? @aledeg Regarding the logging level, the priority goes like this, but I'm not sure if it's possible to achieve what you want. Which is not good, since that's what people probably expect from dot reporter. Thanks again for this "dot reporter adopter" job, it really helps! We think of revamping reporters and logging output in the future and these limitations, while it might not be possible to fix them easily right away, can help us to design it the right way at least for future. |
@honzajavorek I am thinking that option 3 makes the most sense. |
@ddelnano @honzajavorek |
@honzajavorek So I made a test where I set the level to
|
I also added the
Which is much nicer. |
Good! Thanks for sharing! I hope this helps also to other dot reporter users. I think this should be qualified as improvement of Dredd's CLI output. We plan to rethink it a bit in the future and the inconvenience of how dot reporter works is definitely something we should address. |
Just wanted to share my workaround, with the caveat that I'm new to Ruby. I think this will be useful for anyone using servers that don't have a working
...but Dredd would fail when trying to spawn the process. Here's the workaround:
Everything seems to be working fine! I do wish there was an intermediate level between Edit 1: Updating |
It would be nice to address the output split in Dredd, since it currently has 2 instances of |
Unlike many tools available, I cannot have a nice progress output with dredd on CLI.
I am thinking of a dot progress like you can find with tools like behat or phpunit.
We could have something like:
This would be great especially when using with travis.
Bonus will be with colors :)
The text was updated successfully, but these errors were encountered: