``Chrome for Testing'' for developers convenient for testing and verification is released, and it is possible to specify the version of Chrome and start it



When developing a web application, you actually operate it in the browser and test whether it works as expected, but the test results change in areas other than the developer's changes, such as browser version upgrades. is troublesome. For developers of such web applications, Google has released `` Chrome for Testing '', which makes it possible to use a specific version of Google Chrome.

Chrome for Testing: reliable downloads for browser automation - Chrome Developers

https://developer.chrome.com/blog/chrome-for-testing/



Browser testing, whether automated or manual, is essential if you want to develop high-quality web apps, but until now it has been very difficult to set up a proper testing environment .

◆ Problem 1: Automatic update of the browser
The ability to automatically update the browser to the latest version is a great feature for general users, but it is a headache for developers. For example, when running a test to check the impact of a code change during development, it would be difficult to narrow down the scope of impact if the impact of the change was captured because the browser had been updated.

◆ Problem 2: Difficult to use past versions of Google Chrome
In order to prevent automatic update problems, it seems good to save the executable file of a specific version of Google Chrome. However, Google intentionally does not provide version-by-version downloads to avoid user confusion about version numbers. Since it is not possible to download the 'executable file of a specific version' later, in addition to increasing the time and effort of managing the executable file, it is also difficult to verify when a user reports a bug that 'it does not work with a specific version'. .

In addition, if you are using the tool ' ChromeDriver ' to automate browser operations, you will have to search for 'Chrome Driver versions compatible with specific versions of Chrome'.



The method devised by developers to solve the above two problems is 'use

Chromium instead'. Of course, although it is developed based on Chromium, Chrome and Chromium are different, so Chrome and Chromium versions are not completely compatible, and the operating platforms are not exactly the same.



That's why Google developed 'Chrome for Testing'. In Chrome for Testing, it is possible to use executable files that match the actual release as much as possible for each version. In addition, Chrome for Testing and ChromeDriver version integration makes it easier to know which version of ChromeDriver is right for you.

To download the Chrome for Testing executable, it is easy to use npm 's ' @puppeteer/browsers '. For example, you can download it with the following command.

[code]# Download the latest Chrome for Testing executable that matches the current stable version
npx @puppeteer/browsers install chrome@stable

# download specific version of Chrome for Testing
npx @puppeteer/browsers install [email protected]

# Download the version of ChromeDriver that matches the canary version of Chrome
npx @puppeteer/browsers install chromedriver@canary

# download specific version of ChromeDriver
npx @puppeteer/browsers install [email protected][/code]



In addition, it is said that it is intentionally not described on the normal download page of Google Chrome so that general users do not use it by mistake.

in Software, Posted by log1d_ts