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

Log Reset Outputchannel settings issues #337

Closed
alekdavis opened this issue Oct 30, 2024 · 2 comments
Closed

Log Reset Outputchannel settings issues #337

alekdavis opened this issue Oct 30, 2024 · 2 comments

Comments

@alekdavis
Copy link

alekdavis commented Oct 30, 2024

The checkbox text says: "reset output channel before runs". I assume the idea is to clear outputs (for both httpyac - Request and httpyac - Log) before each test run. What actually happens is that the httpyac - Request log clears after every request. So if you run 10 requests in a file, only the last request will appear in the log at the end of the run.

I cannot think of a use case, where such behavior would be beneficial, but if this is the intended behavior, the checkbox text should say something like: "reset output channel before each request".

A more useful behavior would be to allow clearing all httpYac outputs (TEST RESULTS tab, httpyac - Log, and httpyac - Request) from a previous run, so if you execute 15 tests in a single run repeatedly, at the end of each run, only 15 results would be displayed in the respective channels. If that was the original idea, I would title the setting Log Reset Output Channels and checkbox text reset output channels before test runs (once it works as expected).

I'm not sure if this was also intended for the httpyac - Log channel (it would be helpful if the setting label said what is is intended for, e.g.: Log Reset Output Channels, or Log Reset Output Request Channel), but it does not seem to do anything for logs. Also, in the httpyac - Log output, I noticed an error with the message that starts with "toUri failed for [object Object]" and followed by what looked like over 100 lines of JSON code representing what seems to be my test project (it has properties pointing to folders, files, request details, variables, etc). It is so huge that in some runs it cuts off the beginning. The next message following the error was: "Config Env Provider found environments []". I suspect this was caused by the Response View Preferred Filename setting that I changed to statusCodeAndUrl. So, I changed the setting metaData and the error seems to have gone away, but then I noticed that I cannot permanently clear the httpyac - Log output. Or I can clear it, but the next time I execute tests, the log output from previous runs gets restored, so it is always growing. Maybe it is related to the error, maybe not, but something fishy is going on there.

@AnWeber
Copy link
Owner

AnWeber commented Nov 3, 2024

Or I can clear it, but the next time I execute tests, the log output from previous runs gets restored

It is a error in VSCode microsoft/vscode#224516

Intended behaviour of this settings is, to clear alll output channels on every execution of a http file. On running multiple tests at once this behaviour is not ideal. I change it, to only clear logs on every user interaction to start a test run or a code lens action

@alekdavis
Copy link
Author

Yes, that would be great because every time before I do a test run I need to do a few click to clear test results, output logs/requests, history, and sometimes I forget and after the test run it's hard to navigate the results. Having a setting that clears them all before a test run would make it easier. Thanks.

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

No branches or pull requests

2 participants