Api tests locally

I’m trying to run locally the integration tests by: yarn test:browser

On windows server starts but no test are running.

On WSL I get the following error:

Uncaught Exception: Error: Page crashed!
Error: Page crashed!
at Page._onTargetCrashed (/home/i066470/repos/theia/node_modules/puppeteer/lib/Page.js:216:24)
at CDPSession.Page.client.on.event (/home/i066470/repos/theia/node_modules/puppeteer/lib/Page.js:124:56)
at CDPSession.emit (events.js:198:13)
at CDPSession._onMessage (/home/i066470/repos/theia/node_modules/puppeteer/lib/Connection.js:200:12)
at Connection._onMessage (/home/i066470/repos/theia/node_modules/puppeteer/lib/Connection.js:112:17)
at WebSocketTransport._ws.addEventListener.event (/home/i066470/repos/theia/node_modules/puppeteer/lib/WebSocketTransport.js:44:24)
at WebSocket.onMessage (/home/i066470/repos/theia/node_modules/puppeteer/node_modules/ws/lib/event-target.js:120:16)
at WebSocket.emit (events.js:198:13)
at Receiver.receiverOnMessage (/home/i066470/repos/theia/node_modules/puppeteer/node_modules/ws/lib/websocket.js:789:20)
at Receiver.emit (events.js:198:13)
{ TimeoutError: Navigation timeout of 30000 ms exceeded
at Promise.then (/home/i066470/repos/theia/node_modules/puppeteer/lib/LifecycleWatcher.js:142:21)
– ASYNC –
at Frame. (/home/i066470/repos/theia/node_modules/puppeteer/lib/helper.js:111:15)
at Page.goto (/home/i066470/repos/theia/node_modules/puppeteer/lib/Page.js:675:49)
at Page. (/home/i066470/repos/theia/node_modules/puppeteer/lib/helper.js:112:23)
at Object. (/home/i066470/repos/theia/dev-packages/cli/lib/run-test.js:146:51)
at step (/home/i066470/repos/theia/dev-packages/cli/lib/run-test.js:47:23)
at Object.next (/home/i066470/repos/theia/dev-packages/cli/lib/run-test.js:28:53)
at fulfilled (/home/i066470/repos/theia/dev-packages/cli/lib/run-test.js:19:58)
at process._tickCallback (internal/process/next_tick.js:68:7) name: ‘TimeoutError’ }
error Command failed with exit code 1.

Am I doing something wrong?

[original thread by amiramw]

I’ve never tried to run them on Windows and WSL. Maybe it does not work. Have you tried to google?

[amiramw]

teamate was able to run it on mac. only KeybindingService.resolveKeybinding failed other tests passed

keybindings are different on windows :slight_smile: ?

[amiramw]

no. on windows the test don’t start at all :frowning:

Could you send a PR? We should start running them on max and windows travis jobs.

Could you open an issue?

[amiramw]

i’ll open an issue, any hint how to debug the cli?

it is node.js process adding –inspect should do and then attach to it?

but good point we should add how to debug it in https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#debugging Could you open another issue for it too?

[amiramw]

[amiramw]

for ci: https://github.com/eclipse-theia/theia/issues/7646

[amiramw]

@anton-kosyakov it seems that for me theia front end starts with window[‘theia’] containing {container: …}

[amiramw]

and no other modules

[amiramw]

like ‘@theia/core/lib/common/logger’

[amiramw]

nevermind. i may have found the bad slash…

@amiramw btw you are going to adopt this testing approach

so far i had good experience and caught real timing issues with them

[amiramw]

that what i try to do. it looks like what i have done a year ago as a POC (I think we discuessed) but more mature.