Closed edumserrano closed 9 months ago
It can be reproduced to Github Actions, see report here
How does the current OS
work:
1, OS = ${system.version} (${system.arch})
2, system.version = os.version() and system.arch = os.arch()
see Node.js os API os.version() and os.arch(), both are native Node.js API that fast, compatible and no need to load dependencies.
I found that there is a lib systeminformation very popular, seems that its osInfo.distro is what we want, but it should be slow, see implementation:
A stackoverflow quesion
any better idea?
Unfortunately I can't help you much here. My expertise is not on Node.js. What I can say is that I don't think this is a big issue. If you feel that you haven't found a good solution yet then you can leave the OS as is and close this issue until you find a good solution. I reported it because I thought at least it should be on your radar.
You mentioned that systeminformation
library but you seem to be afraid that it's going to slow down the report. Have you tested it somehow?
yes, I previously used systeminformation
in another Node.js project, it is slow and large even slow down the main process.
Hi @cenfun,
Bug
When you run the Playwright tests in a docker container, the OS displayed in the monocart-reporter html report is weird. For instance, when running on the mcr.microsoft.com/playwright:v1.40.1-jammy I get this:
Note that the OS is set to
#1 SMP PREEMPT_DYNAMIC Thu Nov 16 10:55:59 UTC 2023 (x64)
.How to reproduce
You can use the docker demo in the edumserrano/playwright-adventures repo to replicate the bug.
1) Clone the edumserrano/playwright-adventures repo. 2) Using your favorite shell go to
/demos/docker
. 3) Install the required npm packages with:4) Install the playwright browsers with:
5) Run the tests with:
6) After running the tests with
npm test
you can view test results with:Other notes
This is a very minor bug of course but perhaps it's also easy to fix. I believe the OS should display the fact that it ran in an Ubuntu Linux OS. For example:
Windows 10 Enterprise (x64)
#55~20.04.1-Ubuntu SMP Mon Nov 6 12:15:34 UTC 2023 (x64)
. Even this is doesn't seem to be the best for the OS description so perhaps there's some room for improvement in how the report is getting the OS info for Unix platforms.