webdriverio-community / wdio-vscode-service

A service to test VSCode extensions from end to end using WebdriverIO

Home Page:https://webdriverio-community.github.io/wdio-vscode-service/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

executeWorkbench() doesn't work after Open Folder is called

jeffb-sfdc opened this issue · comments

We've built up several test suites for our product, and our order of execution for each suite is typically always:

  1. start up the automation/open VS Code
  2. create a folder and sample files used for test projects
  3. script VS Code to open the folder which was just created
  4. run tests within the suite

We've discovered that when VS Code opens a folder, it performs some kind of reset. (and to the end user, they see a little bit of flashing when the UI resets itself)

Prior to opening a folder, executeWorkbench() works w/o any issues.

After opening a folder, executeWorkbench() ceases to work. I dug into this and the VSCode service for WDIO is using a socket to communicate with the VS Code app, and when VS Code opens a folder, the socket is closed and not reestablished. I attempted to find a fix for this myself, but wasn't able to come up with a solution.

Thanks for filing and analysing the issue. It seems the solution you've outlined (reconnecting if connection ceases) is the right way to fix the problem.

This is quite problematic for me. What is the alternative way of opening a project inside a given test?

I'd like my tests to be able to open a different project, as they may want to test unique environments. So I'd like to avoid a project-wide configuration in the config file.