Giter VIP home page Giter VIP logo

Comments (20)

bpasero avatar bpasero commented on July 28, 2024

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.

DanTup avatar DanTup commented on July 28, 2024

@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.

bpasero avatar bpasero commented on July 28, 2024

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.

DanTup avatar DanTup commented on July 28, 2024

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.

DanTup avatar DanTup commented on July 28, 2024

@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.

bpasero avatar bpasero commented on July 28, 2024

@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.

DanTup avatar DanTup commented on July 28, 2024

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.

bpasero avatar bpasero commented on July 28, 2024

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.

bpasero avatar bpasero commented on July 28, 2024

@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.

DanTup avatar DanTup commented on July 28, 2024

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.

bpasero avatar bpasero commented on July 28, 2024

@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.

rebornix avatar rebornix commented on July 28, 2024

+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.

joaomoreno avatar joaomoreno commented on July 28, 2024

@bpasero https://vscode-update.azurewebsites.net/1.4.0/win32-archive/stable

from vscode-extension-vscode.

bpasero avatar bpasero commented on July 28, 2024

@joaomoreno thanks!

@DanTup pushed support with new vscode module update (0.11.16), let me know how it goes.

from vscode-extension-vscode.

DanTup avatar DanTup commented on July 28, 2024

Awesome! Do I need to wait for the next stable build to use this?

Thanks!

from vscode-extension-vscode.

bpasero avatar bpasero commented on July 28, 2024

@DanTup no, we update the vscode node module independent from releases 👍

from vscode-extension-vscode.

DanTup avatar DanTup commented on July 28, 2024

Awesome; I forced the build on AppVeyor for my test branch and it just starting working. Thank you!

from vscode-extension-vscode.

bpasero avatar bpasero commented on July 28, 2024

nice.

from vscode-extension-vscode.

rebornix avatar rebornix commented on July 28, 2024

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.

bpasero avatar bpasero commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.