Cypress: Migrating from 9.x to 10.x manually
In this article, Im going to share step-by-step how to properly manually upgrade Cypress within your Node.js applications from 9.x (9.5.4) to 10.x (10.0.3)
If you’re using cucumber feature format for your tests, here is a good migration guide for the same.
Step 1. Update package.json
Before we start with the Cypress code itself, let’s first update the npm cypress version to 10.x. Just update this line in your package.json
...
"cypress": "9.5.4",
...
to (or any 10.x version you want)
...
"cypress": "10.0.3",
...
and run npm install
to auto update your package-lock.json.
After doing Step1, you can optionally use Cypress Migration Helper which automatically takes care of Step 2 and 3. If you wish to do that, you can open the test runner (
cypress open
) and click on the “Continue to Cypress 10” button to do the necessary changes. If you are doing this, you can skip directly to Step 4
Step 2. Update Cypress config file
You might currently have cypress.json
as your config file. This has been now replaced with cypress.config.js
or cypress.config.ts
. They have also removed the plugin file and the contents of…