Comments (20)
Sorry, but we do currently not support running integration tests for extensions on Windows. See https://code.visualstudio.com/docs/extensions/testing-extensions
from vscode-extension-vscode.
@bpasero Thanks for clarifying. Is this something you have planned, or are there reasons not to do it? (apologies if the complications should be obvious!)
from vscode-extension-vscode.
If you want you can give it a shot, I do not remember the details why it fails. I think it was some electron upstream issue with Windows :-/
from vscode-extension-vscode.
The current failure for me is caused by the test script just not handling Windows, so it's not getting as far as running (it downloads a Linux version of Code then bombs). If you happen across any info on other causes do post them here; I might have a play if I do get some time.
from vscode-extension-vscode.
@bpasero Just to be clear - I'm trying to run my own extensions tests here, and not the Code test suite; not sure if that was obvious?
from vscode-extension-vscode.
@DanTup yeah, if you need access to the vscode API namespace, then it will currently not work. Of course any headless mocha tests would just work fine.
from vscode-extension-vscode.
Currently I don't use the vscode API, I can't get the tests to run at all (just the samples that call indexOf
) because of the error in the test script?
from vscode-extension-vscode.
This line:
import * as vscode from 'vscode';
requires the full VS Code environment to be there. So yes, if you want to run the default tests, you need the setup where it calls into our test runner.
from vscode-extension-vscode.
@DanTup I just gave it a try and I think it works on Windows but one of our own tests makes the run hang.
Let me try to see if I can make this work for normal extensions 👍
from vscode-extension-vscode.
So yes, if you want to run the default tests, you need the setup where it calls into our test runner.
I understand that, but it seemed to me that it was failing before it got to execution (but I didn't investigate much).
Let me try to see if I can make this work for normal extensions 👍
Cool; thanks! This isn't high priority for us; I currently have no tests and our build runs on Jenkins (Linux + Mac OS X) too, but obviously it'd be nice to have the full set as we do start building tests (especially with people sending PRs).
Thanks again!
from vscode-extension-vscode.
@joaomoreno in order for this to work I need a URL to call to download the ZIP for Windows and not the exe. Today I have a URL https://vscode-update.azurewebsites.net/1.4.0/win32/stable
that results in the EXE being downloaded but for the tests I need the ZIP file.
Can we add a way to get the ZIP? Maybe by me sending an Accept
header?
from vscode-extension-vscode.
+1 for Windows support.
It stops me from running tests by cmd on Windows but since we can always run the test cases within Code, it's not a blocker.
from vscode-extension-vscode.
@bpasero https://vscode-update.azurewebsites.net/1.4.0/win32-archive/stable
from vscode-extension-vscode.
@joaomoreno thanks!
@DanTup pushed support with new vscode module update (0.11.16), let me know how it goes.
from vscode-extension-vscode.
Awesome! Do I need to wait for the next stable build to use this?
Thanks!
from vscode-extension-vscode.
@DanTup no, we update the vscode node module independent from releases 👍
from vscode-extension-vscode.
Awesome; I forced the build on AppVeyor for my test branch and it just starting working. Thank you!
from vscode-extension-vscode.
nice.
from vscode-extension-vscode.
Updated to 0.11.16 and ran tests for Vim extensions, sometimes it failed immediately with below error messages:
> [email protected] test C:\Users\cici\code\Vim
> node ./node_modules/vscode/bin/test
(node:6764) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
(node:6764) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
### VS Code Extension Test Run ###
Current working directory: C:\Users\cici\code\Vim
Running extension tests: C:\Users\cici\code\Vim\.vscode-test\Code C:\Users\cici\code\Vim\out\test --extensionDevelopmentPath=C:\Users\cici\code\Vim --extensionTestsPath=C:\Users\cici\code\Vim\out\test
[[8888:5584:0816/112906:VERBOSE1:crash_service_main.cc(68)] Session start. cmdline is [--reporter-url=https://ticinocrashreporter.azurewebsites.net/crash --application-name=VSCode --v=1]
2964:7068:0816/112906:VERBOSE1:crash_service_main.cc(68)] Session start. cmdline is [--reporter-url=https://ticinocrashreporter.azurewebsites.net/crash --application-name=VSCode --v=1]
[[2964:7068:0816/112906:VERBOSE1:crash_service.cc(142)] window handle is 00440752
8888:5584:0816/112906:VERBOSE1:crash_service.cc(142)] window handle is 004B0260
[[2964:7068:0816/112906:VERBOSE1:crash_service.cc(290)] pipe name is \\.\pipe\VSCode Crash Service
dumps at C:\Users\cici\AppData\Local\Temp\VSCode Crashes
8888:5584:0816/112906:VERBOSE1:crash_service.cc(290)] pipe name is \\.\pipe\VSCode Crash Service
dumps at C:\Users\cici\AppData\Local\Temp\VSCode Crashes
[[8888:5584:0816/112906:VERBOSE1:crash_service.cc(294)] checkpoint is C:\Users\cici\AppData\Local\Temp\VSCode Crashes\crash_checkpoint.txt
server is https://ticinocrashreporter.azurewebsites.net/crash
maximum 128 reports/day
reporter is electron-crash-service
2964:7068:0816/112906:VERBOSE1:crash_service.cc(294)] checkpoint is C:\Users\cici\AppData\Local\Temp\VSCode Crashes\crash_checkpoint.txt
server is https://ticinocrashreporter.azurewebsites.net/crash
maximum 128 reports/day
reporter is electron-crash-service
[[2964:7068:0816/112906:ERROR:crash_service.cc(301)] could not start dumper
8888:5584:0816/112906:ERROR:crash_service.cc(301)] could not start dumper
Error: Illegal state: missing config
Loading development extension at C:/Users/cici/code/Vim
[C:/Users/cici/code/Vim]: Overwriting extension C:/Users/cici/.vscode/extensions/vscodevim.vim-0.1.7 with C:/Users/cici/code/Vim.
Tests exited with code: 0
The content of crash checkpoint is
GBP1
20160816
2
from vscode-extension-vscode.
Thats weird. Btw we do run lots of extension tests for VS Code via Appveyor on Windows and they typically run fine. But since you run in a Electron environment you need to be aware of all the issues this brings (native crashes, out of memory, etc.).
from vscode-extension-vscode.
Related Issues (20)
- Failed to get code binary when testing in environment that needs to use strictSSL:false HOT 1
- Missing error messages for bad setup HOT 1
- Add functionality to change locale in VS Code test instance HOT 16
- Servers(child processes) are cashing HOT 1
- vscode-install failed for vscode module HOT 11
- `node ./node_modules/vscode/bin/install` won't detect VSCode engine in ubuntu docker container HOT 5
- Error installing vscode.d.ts: Error: Request returned status code: 500 HOT 3
- Split module into @types/vscode and vscode-test HOT 8
- Can this module point to microsoft/vscode? HOT 3
- Switch to yarn instead of npm HOT 2
- Pass mocha options for easier CI test reports HOT 2
- Remove lib/shared and update install script
- Move test runner to `vscode-test` HOT 1
- Unable to use local URIs with vscode-resource HOT 1
- Local VSCode No Longer Installed as `stable`... HOT 6
- diff security vulnerability HOT 3
- Wrong node version for extension HOT 1
- [JS] eslint complains: "Unable to resolve path to module 'vscode'" HOT 1
- Can extensions have control for hiding context menus like Add Logpoint.. HOT 1
- Failed to execute fetch TypeError: Cannot read property '0' of undefined HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-extension-vscode.