Open vicioussn opened 6 years ago
Hi, we actually moved away from using this extension to run the tests in a docker image with Chromium installed instead. You can use a docker file similar to this:
FROM node:10.1.0-alpine
RUN apk add --no-cache make gcc g++ python xvfb udev ttf-freefont chromium
COPY . /app
WORKDIR /app
RUN npm install
ENV DISPLAY=:99
ENV CHROME_BIN=/usr/bin/chromium-browser
RUN Xvfb :99 -ac -screen 0 1280x720x16 -nolisten tcp &
RUN npm run test
If you are using Karma for running the tests, the browser should be set up like this:
customLaunchers: {
ChromeNoSandbox: {
base: 'ChromiumHeadless',
flags: ['--no-sandbox', '--headless', '--disable-gpu', '--disable-translate', '--disable-extensions']
}
}
This runs in about 3-4 minutes depending on the speed of npm install and your tests. You can also use this docker image as the first stage to produce a second one which runs your application, or extract the produced result to avoid building/installing twice.
It's due to Invoke-Request progress bar (see this thread for more info).
I submitted a PR for this issue. On my own fork I'm down to ~30seconds to get it installed. I can share my forked extension if someone needs it until it's merged,
Thanks for the PR @sandorfr, much appreciated.
Will you have a chance to publish soon ?
The PAT in our release to publish to our marketplace has expired, waiting for it to be renewed by someone with the right permissions.
Haha classic :) On Sun 1 Jul 2018 at 16:41, Helge Fosse notifications@github.com wrote:
The PAT in our release to publish to our marketplace has expired, waiting for it to be renewed by someone with the right permissions.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Schlumberger/vsts-chromium-task/issues/3#issuecomment-401586724, or mute the thread https://github.com/notifications/unsubscribe-auth/ACiXpi5PHysUXK0NKuLGa9JvbvSfQyVqks5uCG8kgaJpZM4UzXPk .
I got a new PAT, but the marketplace wont allow me to update the extension. I am on vacation for the next three weeks with limited internet access and wont have a chance to fix this until I get back. Hope that is OK.
Also note that Chrome is pre-installed on the VSTS Hosted Agent. Just setting an environment variable will make things even faster:
If Chromium isn't detected automatically, add the chromium.bin variable and point it to chrome.exe.
Indeed it is, thanks for letting us know @jessehouwing. I guess we can close this issue then @sandorfr? As it makes this extension more or less obsolete.
Yes I don't need it for my personal use case anymore. However, It would be gould to fix it for people still using it. Also, for users using on premises agent who might not have chrome preinstalled it is still valuable.
Hello,
Installation of Chromium on Hosted VSTS Agent too slow - about 15 minutes. Is there's something we can do?
Thanks in advance.