Closed stevez closed 2 months ago
Has 'logging: debug' been set to coverage?
// playwright.config.js
module.exports = {
reporter: [
['list'],
['monocart-reporter', {
logging: 'debug',
name: "My Test Report",
outputFile: './test-results/report.html',
coverage: {
logging: 'debug', // for coverage
}
}]
]
};
No, I don’t know there is anther place to set, I will try and let you knowThanksSent from my iPhoneOn Jun 5, 2024, at 10:36 AM, CenFun @.***> wrote:
Has 'logging: debug' been set to coverage?
// playwright.config.js
module.exports = {
reporter: [
['list'],
['monocart-reporter', {
logging: 'debug',
name: "My Test Report",
outputFile: './test-results/report.html',
coverage: {
logging: 'debug', // for coverage
}
}]
]
};
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>
I just tried and it is not working either. Could you provide a working example?
Thanks
Actually, if we want to see the debugging information in console, we must write code to output the information what we want.
for example: console.log("my debug info")
So, what information do you need, and what is this information used for? I'm not sure what I should provide.
I want to debug the cdp-client.js, https://github.com/cenfun/monocart-coverage-reports/blob/main/lib/client/cdp-client.js, for example: https://github.com/cenfun/monocart-coverage-reports/blob/main/lib/client/cdp-client.js#L69 https://github.com/cenfun/monocart-coverage-reports/blob/main/lib/client/cdp-client.js#L84
OK, I got it, it said the existing code logDebug()
in cdp-client.js
does NOT work with option logging=debug
, let me check.
I thought the CDPClient
could be called in different processes, so the option logging
doesn't take effect.
This is my idea, it should work:
import { CDPClient, CoverageReport } from 'monocart-coverage-reports';
new CoverageReport({
logging: 'debug'
});
Please try monocart-coverage-reports@2.8.4, it expose an API for logging
import { Util, CoverageReport } from 'monocart-coverage-reports';
Util.initLoggingLevel('debug');
I want to see the debug info in the console, for example I want to see debug messages in cdp-client.js, I set
logging:debug
in the playwright.config.js, but only see a couple of other messages.Please advise
Thanks