Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Fully automated UI testing #788

Merged
merged 41 commits into from
Jul 6, 2016
Merged

Conversation

hiddentao
Copy link
Contributor

@hiddentao hiddentao commented Jun 7, 2016

WIP

  • Automated production app UI testing using spectron.

@hiddentao
Copy link
Contributor Author

Made some headway in terms of getting the app started up. But spectron is unable to detect the window properly. Am going to upgrade Electron to the latest version (so that I can use latest spectron with all recent bugfixes too).

@alexvandesande alexvandesande added this to the 0.8 milestone Jun 15, 2016
@hiddentao hiddentao changed the title Initial automated testing Fully automated UI testing Jun 16, 2016
@hiddentao hiddentao modified the milestones: 1.0, 0.8 Jun 16, 2016
@hiddentao
Copy link
Contributor Author

Made some more progress, but now am getting a Meteor is not defined error when the window loads up. This only happens when I run the app from spectron (the test framework), not when I run it directly. I haven't yet figured out what the problem is.

@frozeman
Copy link
Contributor

It might be a path issue, that can't load the meteor javascript files properly?
Meteor is only undefined if its either not at all loaded, or some errors happened during executions.

@hiddentao
Copy link
Contributor Author

hiddentao commented Jun 28, 2016

Unable to get this working decently in Travis CI - it takes forever to build the wallet distributable. Presumably because it has to download all the meteor package dependencies and then build the meteor app. Build is already running at 12 minutes and it's still building the Meteor package -> https://travis-ci.org/ethereum/mist/builds/140727836

There is no way of telling Travis to extend the timeouts (https://docs.travis-ci.com/user/customizing-the-build/#Build-Timeouts). This is rightly so too, as the build shouldn't really take more than a few minutes in my opinion. If it does then we have a build process.

We could see if we can modify the meteor build process to produce some logging output to avoid Travis timing out, though no obvious way of enabling this comes to mind.

@alexvandesande
Copy link
Collaborator

Was testing today, got this error:

  basic.test.js
    1) "before all" hook


  0 passing (26ms)
  1 failing

  1) basic.test.js "before all" hook:
     Error: Unable to find "geth" executable in PATH
      at new Geth (node_modules/geth-private/index.js:36:15)
      at module.exports (node_modules/geth-private/index.js:362:10)
      at Context._module.exports.(anonymous function).before (test/_base.js:36:19)
      at next (native)
      at onFulfilled (node_modules/co/index.js:65:19)
      at node_modules/co/index.js:54:5
      at Context.co (node_modules/co/index.js:50:10)
      at Context.createPromise (node_modules/co/index.js:30:15)
      at Hook.Runnable.run (node_modules/co-mocha/lib/co-mocha.js:43:16)



[18:02:21] 'test-wallet' errored after 1.55 s
[18:02:21] Error in plugin 'gulp-spawn-mocha'
Mocha exited with code 1

What's the geth-private node module? What about the Spawn Mocha?

@hiddentao
Copy link
Contributor Author

It can't find the geth executable in PATH. I'll change it so that it uses the one we download via gulp.

@hiddentao
Copy link
Contributor Author

geth-private is my geth wrapper which makes it easy to do private chains - https://github.com/hiddentao/geth-private

gulp-spawn-mocha runs Mocha tests in a separate process.

@hiddentao
Copy link
Contributor Author

Should find geth executable in mist folder now.

@alexvandesande
Copy link
Collaborator

It works! Awesome, Ram, thanks. Will merge

(node:33410) 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.
You can select a platform like: --platform (all or darwin or win32 or linux)
Mist version: 0.7.6
Electron version: 1.2.5
[10:50:59] Using gulpfile ~/dev/mist/gulpfile.js
[10:50:59] Starting 'test-wallet'...


  basic.test.js
    tests
      ✓ title
      ✓ account balances
      ✓ deposit into account (37186ms)


  3 passing (2m)

[10:53:02] Finished 'test-wallet' after 2.05 mim

@alexvandesande alexvandesande merged commit 4922876 into ethereum:develop Jul 6, 2016
@luclu luclu mentioned this pull request Jul 9, 2016
19 tasks
alexvandesande pushed a commit that referenced this pull request Jul 11, 2016
* bump version to 0.7.6

* updated os timesync

* adding setting to change UI language (fixes #813) (#896)

* simple language setting menu

* use i18n label in menu

* simple language setting menu

* use i18n label in menu

* change language of menu bar by triggering 'backendAction_setLanguage'

* adds translations for language names

* remove duplicate 'gulp update-nodes' (#897)

* add i18n entry for OSX's 'Services' (#887)

* add i18n entry for OSX's 'Services'

* update missing osx menu strings

* update-popup-window: prevent maximize (#885)

* update-popup-window prevent maximize

* add resizable:false

* added shrinkwrap (#903)

* fixed webview tagd and updated electrong to 1.2.5 (#905)

* Fixes the node start IPC connection (#841)

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* Adds Toggle password visibility to on boarding screen (#909)

* add password visibilty toggle to onboarding

* replaced 'showPassword' with 'passwordInputType'

* changed id into class

* 18n cleanup (former #889) (#910)

* Renamed Korean and Albanian to ISO standards
* Added menu items to set to Dutch,  Farsi, Albanian and Italian (these three are rather incomplete)

* changed log error to warn

* fixed ipcBackend notifications

* Fixing wallet tab insertion (#911)

* small cleanup

* added admin:true permission

* removed webview duplicate

* Fully automated UI testing (#788)


* got app launching via test

* work towards testing - private net integration

* change how we name options to pass directly to geth, so that test suite works

* refactor preloader scripts

* cleanly quitting the app at the end of tests

* trying to get electron working properly, upgrade to 1.2.2

* upgrade spectron

* work towards getting tests to work

* dont use NODE_ENV var as Meteor production uses it

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* got basic test working

* update travis build

* trigger build

* update readme, travis

* fix gulp-download-stream use

* fix build command

* testing account creation

* added account creation test

* only do a shallow clone

* final deposit test

* should be able to find geth executable now

* adds the wallet as the default tab (#924)

* Text updates

Fix typos and make writing more clear and accurate

* Capitalization consistency

* adds the wallet as the default tab

* always upsert

* Update version to 0.8 (#930)

* update to 0.8

* fixes menu margin clipping

* remove comma

* fix ipcpath bug
alexvandesande pushed a commit that referenced this pull request Jul 17, 2016
* bump version to 0.7.6

* updated os timesync

* adding setting to change UI language (fixes #813) (#896)

* simple language setting menu

* use i18n label in menu

* simple language setting menu

* use i18n label in menu

* change language of menu bar by triggering 'backendAction_setLanguage'

* adds translations for language names

* remove duplicate 'gulp update-nodes' (#897)

* add i18n entry for OSX's 'Services' (#887)

* add i18n entry for OSX's 'Services'

* update missing osx menu strings

* update-popup-window: prevent maximize (#885)

* update-popup-window prevent maximize

* add resizable:false

* added shrinkwrap (#903)

* fixed webview tagd and updated electrong to 1.2.5 (#905)

* Fixes the node start IPC connection (#841)

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* Adds Toggle password visibility to on boarding screen (#909)

* add password visibilty toggle to onboarding

* replaced 'showPassword' with 'passwordInputType'

* changed id into class

* 18n cleanup (former #889) (#910)

* Renamed Korean and Albanian to ISO standards
* Added menu items to set to Dutch,  Farsi, Albanian and Italian (these three are rather incomplete)

* changed log error to warn

* fixed ipcBackend notifications

* Fixing wallet tab insertion (#911)

* small cleanup

* added admin:true permission

* removed webview duplicate

* Fully automated UI testing (#788)


* got app launching via test

* work towards testing - private net integration

* change how we name options to pass directly to geth, so that test suite works

* refactor preloader scripts

* cleanly quitting the app at the end of tests

* trying to get electron working properly, upgrade to 1.2.2

* upgrade spectron

* work towards getting tests to work

* dont use NODE_ENV var as Meteor production uses it

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* got basic test working

* update travis build

* trigger build

* update readme, travis

* fix gulp-download-stream use

* fix build command

* testing account creation

* added account creation test

* only do a shallow clone

* final deposit test

* should be able to find geth executable now

* adds the wallet as the default tab (#924)

* Text updates

Fix typos and make writing more clear and accurate

* Capitalization consistency

* adds the wallet as the default tab

* always upsert

* Update version to 0.8 (#930)

* update to 0.8

* fixes menu margin clipping

* remove comma

* work towards new minimonogo sync

* fix ipcpath bug

* got basic persistence working

* minor error

* refactor sendTransaction error alerts (#959)

* "Change language" translated in mist.nb.i18n.json (#953)

"Change language" translated in mist.nb.i18n.json

* timer delay on menu refreshing from tab updates

* rename 'passwordError' to 'wrongPassword' for consistency (#951)

* sync not specific to a window

* refactor to enable access to mongo sync from all windows

* update .meteor paths on .gitignore (#977)

* DAO fork support (#970)

* created DAO fork dummy code

* text update

* added node flags choice 

* changed DAO fork texts

* disable eth-node switch until hardfork is supported (#975)

* disable eth-node until hardfork is supported

* remove test function

* reworded the disclaimer link
alexvandesande pushed a commit that referenced this pull request Jul 23, 2016
Merging of Choose account popup #814

* Creating change account modals

* connect popup

* fixing typo

* connect account popup

* Straightens checkbox on connect account modal

* Connect account popup interface

* fixing scroll gradient on choose account popup

* Informing account names on connect popup

* Adding animations on account and dapp info

* Improvements on connect popup

* Tweaking URL breakdown to show arrows when necessary

* Fixing edgy cases on breadcrumb

* Removing browserBar interface

* Removing browser bar fold-down element

* Vertical flexbox - window stretches appropriately

* Popup updates

* change dapp style and icon (#1)

* more working code

* Reload permissions and code cleaning

* Website placeholder icon

* Cleaning code

* Unpin tab

* Not showing remove button on wallet tab

* Merge Hard Fork choice - Mist into master (#979)

* bump version to 0.7.6

* updated os timesync

* adding setting to change UI language (fixes #813) (#896)

* simple language setting menu

* use i18n label in menu

* simple language setting menu

* use i18n label in menu

* change language of menu bar by triggering 'backendAction_setLanguage'

* adds translations for language names

* remove duplicate 'gulp update-nodes' (#897)

* add i18n entry for OSX's 'Services' (#887)

* add i18n entry for OSX's 'Services'

* update missing osx menu strings

* update-popup-window: prevent maximize (#885)

* update-popup-window prevent maximize

* add resizable:false

* added shrinkwrap (#903)

* fixed webview tagd and updated electrong to 1.2.5 (#905)

* Fixes the node start IPC connection (#841)

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* Adds Toggle password visibility to on boarding screen (#909)

* add password visibilty toggle to onboarding

* replaced 'showPassword' with 'passwordInputType'

* changed id into class

* 18n cleanup (former #889) (#910)

* Renamed Korean and Albanian to ISO standards
* Added menu items to set to Dutch,  Farsi, Albanian and Italian (these three are rather incomplete)

* changed log error to warn

* fixed ipcBackend notifications

* Fixing wallet tab insertion (#911)

* small cleanup

* added admin:true permission

* removed webview duplicate

* Fully automated UI testing (#788)


* got app launching via test

* work towards testing - private net integration

* change how we name options to pass directly to geth, so that test suite works

* refactor preloader scripts

* cleanly quitting the app at the end of tests

* trying to get electron working properly, upgrade to 1.2.2

* upgrade spectron

* work towards getting tests to work

* dont use NODE_ENV var as Meteor production uses it

* fixed eth start, but crash is not graceful

* better socket connection logic, remove master ps logic for eth

* fix splash screen display of state text for eth

* better gulp download plugin, remove master passwd stuff once and for all

* got basic test working

* update travis build

* trigger build

* update readme, travis

* fix gulp-download-stream use

* fix build command

* testing account creation

* added account creation test

* only do a shallow clone

* final deposit test

* should be able to find geth executable now

* adds the wallet as the default tab (#924)

* Text updates

Fix typos and make writing more clear and accurate

* Capitalization consistency

* adds the wallet as the default tab

* always upsert

* Update version to 0.8 (#930)

* update to 0.8

* fixes menu margin clipping

* remove comma

* work towards new minimonogo sync

* fix ipcpath bug

* got basic persistence working

* minor error

* refactor sendTransaction error alerts (#959)

* "Change language" translated in mist.nb.i18n.json (#953)

"Change language" translated in mist.nb.i18n.json

* timer delay on menu refreshing from tab updates

* rename 'passwordError' to 'wrongPassword' for consistency (#951)

* sync not specific to a window

* refactor to enable access to mongo sync from all windows

* update .meteor paths on .gitignore (#977)

* DAO fork support (#970)

* created DAO fork dummy code

* text update

* added node flags choice 

* changed DAO fork texts

* disable eth-node switch until hardfork is supported (#975)

* disable eth-node until hardfork is supported

* remove test function

* reworded the disclaimer link

* Syncing Tabs after account connection

* Enable Tabs sync and persistence in all windows (#2)

* sync not specific to a window

* refactor to enable access to mongo sync from all windows

* Pin/unpin Tabs

* Adding show password on Create account popup

* change remove button animation

* add globe image as default non-icon
@evertonfraga evertonfraga self-assigned this Nov 23, 2016
@evertonfraga evertonfraga modified the milestones: 0.8.9, 1.0 Apr 19, 2017
@lock
Copy link

lock bot commented Mar 31, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked and limited conversation to collaborators Mar 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants