You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the debugger for a SharePoint app the dumps can get very big very easily, because Cypress and in turn the Debugger snapshot all of the libraries and other stuff.
So I've enabled the option to only dump on failed tests. But then I started noticing some odd things about the Player.
For starters, sometimes the "Console" tab showed 5 digit numbers on the first step of the test.
I do have a bunch of debug output littered all over the tests and the app itself, but that amount felt off even considering that.
It got weirder when I clicked the tab in that state, and gave the Player a minute to filter out whatever it is doing in that case, only to see "No logs" as a result.
I then proceeded to find a software that can handle parsing an 800 MB JSON file to check if there actually were logs, and yes, all of those 5 digit logs were recorded and dumped.
So in my case I had run the entire test set for the app and only in the last 80% it encountered it's first failure.
Which then made it dump the entire console output from the beginning of the run up to this point.
Luckily, it's only the console output that is affected from this, so unless the test or app itself dump a lot of complex objects into the console (like mine does...) it has hardly a noticeable effect on the dump's size.
The sheer amount of logged entries though that the Player then in turn has to filter out do have a noticeable effect on it's responsiveness.
Expected behavior
Console output 'cache' should be cleared in on("before:spec") like below.
This prevents a dump of old console output and I'm running everything with this change so far without issues.
Command and Setup
Setup: new folder in which I only ran npm install cypress cypress-debugger, then added/configured the following files after during npx cypress open once to initialize Cypress:
The two specs are almost identical, except for the text and that the 1st uses console.debug and the 2nd console.info.
It makes it easier to check the actual dump without having to unfold the deeper nestings as it's directly shown in the "type":.
Although only the 2nd of the two specs failed it's last test, all logs of the 1st spec is also present.
The change I've made to the Debugger locally on my end prevents this.
PS: These logs made from Tests rather than the app/site being tested don't show up in the Player at all, but I'm making a separate issue for that after this.
Full log and debug output
Will be added later if needed as it will take a while to verify that all sensitive information is actually removed, and considering how easy this was to reproduce from scratch, I'm not making this my top priority now.
# Put your logs below this line
The text was updated successfully, but these errors were encountered:
Before opening, please confirm:
Environment information
Describe the bug
I'm using the debugger for a SharePoint app the dumps can get very big very easily, because Cypress and in turn the Debugger snapshot all of the libraries and other stuff.
So I've enabled the option to only dump on failed tests. But then I started noticing some odd things about the Player.
For starters, sometimes the "Console" tab showed 5 digit numbers on the first step of the test.
I do have a bunch of debug output littered all over the tests and the app itself, but that amount felt off even considering that.
It got weirder when I clicked the tab in that state, and gave the Player a minute to filter out whatever it is doing in that case, only to see "No logs" as a result.
I then proceeded to find a software that can handle parsing an 800 MB JSON file to check if there actually were logs, and yes, all of those 5 digit logs were recorded and dumped.
Which brings me to what I think the actual issue is: looking at
https://github.com/currents-dev/cypress-debugger/blob/5d55028563559cd80c93ed0fb1b52cd6a70f15dd/packages/plugin/src/install.ts#L71C19-L71C19
it seems that the logs are never cleared unless a dump is made.
So in my case I had run the entire test set for the app and only in the last 80% it encountered it's first failure.
Which then made it dump the entire console output from the beginning of the run up to this point.
Luckily, it's only the console output that is affected from this, so unless the test or app itself dump a lot of complex objects into the console (like mine does...) it has hardly a noticeable effect on the dump's size.
The sheer amount of logged entries though that the Player then in turn has to filter out do have a noticeable effect on it's responsiveness.
Expected behavior
Console output 'cache' should be cleared in
on("before:spec")
like below.Modified section of https://github.com/currents-dev/cypress-debugger/blob/5d55028563559cd80c93ed0fb1b52cd6a70f15dd/packages/plugin/src/install.ts#L118-L120C6
This prevents a dump of old console output and I'm running everything with this change so far without issues.
Command and Setup
Setup: new folder in which I only ran
npm install cypress cypress-debugger
, then added/configured the following files after duringnpx cypress open
once to initialize Cypress:cypress.config.js
cypress/support/e2e.js
cypress/e2e/poke1.cy.js
cypress/e2e/poke2.cy.js
debug_runner.bat
actual test command ran:
.\debug_runner.bat .\cypress\e2e\p*
(no-s
for specs because that's in the .bat already)The test then runs normally and creates a dump for the 5th test in the 2nd spec.
But here's how the "browserLogs" section of the dump looks like (I've trimmed it to the essential parts here):
The two specs are almost identical, except for the text and that the 1st uses
console.debug
and the 2ndconsole.info
.It makes it easier to check the actual dump without having to unfold the deeper nestings as it's directly shown in the
"type":
.Although only the 2nd of the two specs failed it's last test, all logs of the 1st spec is also present.
The change I've made to the Debugger locally on my end prevents this.
PS: These logs made from Tests rather than the app/site being tested don't show up in the Player at all, but I'm making a separate issue for that after this.
Full log and debug output
Will be added later if needed as it will take a while to verify that all sensitive information is actually removed, and considering how easy this was to reproduce from scratch, I'm not making this my top priority now.
The text was updated successfully, but these errors were encountered: