I am trying to run my UI test using testcafe and saucelabs. I am facing this above error. Currently I am using testcafe v1.8.3 and testcafe-browser-provider-saucelabs v1.7.0
I have tried changing versions of browser provider also but still facing the above error. Pls help out with a solution for this as i am stuck with it for more than a week
CodePudding user response:
It looks like your provider is installed locally, while you are using the global TestCafe installation. You also need to install TestCafe locally or both packages globally. After this, check your browser provider: testcafe -b saucelabs
.
I am using testcafe v1.8.3 and testcafe-browser-provider-saucelabs v1.7.0
Please update your testcafe
and testcafe-browser-provider-saucelabs
versions to the latest ones.
CodePudding user response:
So, it looks like the runner you are using (testcafe-browser-provider) is a very old one, there is a new runner you can use for testcafe tests called saucectl.
TLDR:
- Install saucectl globally
npm install -g saucectl
- Set up saucectl within your project folder with
saucectl init
This will create a .sauce/config.yml file - Tweak the settings to run the spec files and OS/ browser of your choice
- Use
saucectl run
You can see an example proj here: https://github.com/saucelabs/saucectl-testcafe-example