Skip to content

improvements to integration test execution - #6803

Closed
shiftkey wants to merge 9 commits into
developmentfrom
launch-packaged-app-for-integration-test
Closed

shiftkey wants to merge 9 commits into
developmentfrom
launch-packaged-app-for-integration-test

Conversation

@shiftkey

@shiftkey shiftkey commented Feb 8, 2019 •

Copy link
Copy Markdown
Member

Overview

As part of #6793 I've found a bunch of ways to improve the integration tests run. It doesn't quite solve the issues we've seen (#6802 is related) but this should help with identifying any future issues.

Description

  • change launch test to use packaged app
  • improve beforeEach and afterEach so jest will exit cleanly when the spectron test fails, meaning tests are no longer held up until some sort of timeout occurs
  • remove usage of .resolves inside test because we can't seem to rely on these working
  • restore yarn test:review for CircleCI to see more information about failing integration tests internals
  • add yarn test:review to Pipelines config to see more information about failing integration tests internals
  • rebase on top of Stops node_modules from being cached during CI builds #6802
  • use the current set of tools to understand why CircleCI is failing

Release notes

Notes: no-notes

@shiftkey shiftkey added the infrastructure Issues and pull requests related to scripts and tooling for GitHub Desktop label Feb 8, 2019
@shiftkey
shiftkey force-pushed the launch-packaged-app-for-integration-test branch 7 times, most recently from 4bba674 to 76da3c9 Compare February 9, 2019 21:58
@shiftkey

shiftkey commented Feb 9, 2019

Copy link
Copy Markdown
Member Author

Now we're able to see a more interesting test failure about the state of the app:

  ● App › opens a window on launch

    expect(received).toBe(expected) // Object.is equality

    Expected: true
    Received: null

    Difference:

      Comparing two different types of values. Expected boolean but received null.

      82 |     const window = app.browserWindow
      83 |     const isVisible = await window.isVisible()
    > 84 |     expect(isVisible).toBe(true)
         |                       ^
      85 | 
      86 |     const isMinimized = await window.isMinimized()
      87 |     expect(isMinimized).toBe(false)

      at Object.it (test/integration/launch-test.ts:84:23)

And I can see the chrome-driver.log has this set of messages in the "Review Test Failures" output on CircleCI:

[2.476][SEVERE]: Unable to receive message from renderer
_stream_readable.js:607
    dest.end();
         ^

TypeError: dest.end is not a function
    at Socket.onend (_stream_readable.js:607:10)
    at Object.onceWrapper (events.js:272:13)
    at Socket.emit (events.js:185:15)
    at endReadableNT (_stream_readable.js:1106:12)
    at process._tickCallback (internal/process/next_tick.js:114:19)
[2.489][INFO]: Done waiting for pending navigations. Status: ok
[2.499][INFO]: Waiting for pending navigations...
[2.503][INFO]: Done waiting for pending navigations. Status: disconnected: not connected to DevTools
[2.503][DEBUG]: DevTools request: http://localhost:12491/json
[2.504][DEBUG]: DevTools request failed
[2.507][INFO]: RESPONSE ExecuteScript
[2.519][INFO]: COMMAND GetWindows {

}
[2.519][DEBUG]: DevTools request: http://localhost:12491/json
[2.519][DEBUG]: DevTools request failed
[2.523][INFO]: RESPONSE GetWindows chrome not reachable
  (Session info: content shell=)

Not sure of the underlying root cause at the moment, but this is definitely helpful to troubleshoot whatever is happening.

@shiftkey shiftkey changed the title [WIP] launching the packaged app rather than the plain files [WIP] improvements to integration test execution Feb 10, 2019
@shiftkey shiftkey changed the title [WIP] improvements to integration test execution improvements to integration test execution Feb 10, 2019
@shiftkey shiftkey modified the milestone: 1.6.3 Feb 10, 2019
@shiftkey
shiftkey force-pushed the launch-packaged-app-for-integration-test branch 2 times, most recently from efc7694 to 161a328 Compare February 14, 2019 12:46
@shiftkey shiftkey added the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Feb 14, 2019
@shiftkey shiftkey removed the ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Feb 14, 2019
@shiftkey
shiftkey force-pushed the launch-packaged-app-for-integration-test branch 2 times, most recently from 167aa13 to 29cfb00 Compare February 20, 2019 18:33
@shiftkey
shiftkey force-pushed the launch-packaged-app-for-integration-test branch from 29cfb00 to e83579b Compare February 21, 2019 17:23
@shiftkey

Copy link
Copy Markdown
Member Author

Parking this one for now, but I'll revive it if I see anything exceptional with the current integration test suite.

@shiftkey shiftkey closed this Feb 25, 2019
@rafeca
rafeca deleted the launch-packaged-app-for-integration-test branch July 22, 2020 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Issues and pull requests related to scripts and tooling for GitHub Desktop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant