Closed codambro closed 9 months ago
We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news.
We discussed it with the team and decided to close the issue. The scope of this issue is very narrow. Besides, there are multiple working workarounds for this scenario. Moreover, the link you shared has the 301 response status code (moved permanently). So, it's not necessary to pass the ‘logResponseBody’ option because the body will be empty. For your specific scenario, you can use a direct link (‘https://www.youtube.com/’) instead of ‘https://youtube.com’ for your loggers to work as you expect.
The implementation of your scenario will take a lot of resources because of its complexity. Unfortunately, we do not see a chance that we start working on this feature soon.
What is your Scenario?
Native Automation DIsabled. We are trying to have a global request logger, as well as adding addition request loggers in specific tests. The global request logger is correct recording all requests. But the local logger is not collecting all responses.
What is the Current behavior?
The downstream RequestLogger hook will not record a
response
if a previous RequestLogger hook captured a request withlogResponseBody: true
. IflogResponseBody: false
or not set, the local RequestLogger WILL have the response recorded.What is the Expected behavior?
I expect the response to appear in all request logger hooks.
What is the public URL of the test page? (attach your complete example)
https://youtube.com
What is your TestCafe test code?
Your complete configuration file
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
1. 2. 3.
TestCafe version
3.1.0
Node.js version
v18.17.1
Command-line arguments
using api launcher
Browser name(s) and version(s)
chrome
Platform(s) and version(s)
No response
Other
It appears adding
logResponseBody: true
to the local request logger too also resolves it. This is the workaround we are using for now, but as we don't need the response body and just the status code, its a bit of unecessary logging.Can also remove the
logResponseBody
option from the global logger to see it work: