Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EPIC] Improve unit test developer experience #7

Closed
leggetter opened this issue Sep 26, 2013 · 5 comments
Closed

[EPIC] Improve unit test developer experience #7

leggetter opened this issue Sep 26, 2013 · 5 comments

Comments

@leggetter
Copy link
Contributor

At the moment it seems like the process is as follows:

  1. Start the test server using the CLI: ./bladerunner test-server
  2. Connect one or more browsers via http://localhost:4224/capture
  3. In another console/terminal tab run ./bladerunner test <test_location_to_scan>

In theory this doesn't seem to bad. However, based on my experience:

  • Working out why a test fails is very difficult if the error occurs in js.bundle
  • Running the tests sometimes gets stuck in a <browser_name>: reset slow cycle
  • Running the tests sometimes results in the tests executing but the process not exiting
  • Firefox sometimes hangs
  • The server seems to take a long time to detect a browser has disconnected (30 seconds?)
  • The debug experience is very difficult as the browser frequently doesn't actually know which line you are debugging (due to the size of js.bundle).
  • CLI lists a Java exception when the JavaScript tests fail, which is confusing. It should just list the JavaScript test results and exceptions.

This is a very important part of the development workflow, so we make some improvements here.

@stevesouth
Copy link
Contributor

Amy chance we can run headless?

-------- Original message --------
From: Phil Leggetter
Date:26/09/2013 19:06 (GMT+00:00)
To: BladeRunnerJS/brjs
Subject: [brjs] [EPIC] Improve unit test developer experience (#7)

At the moment it seems like the process is as follows:

  1. Start the test server: ./bladerunner test-server
  2. Connect one or more browsers via `http://localhost:4224/capture
  3. In another tab run ./bladerunner test <test_location_to_scan>

In theory this doesn't seem to bad. However, based on my experience:

  • Working out why a test fails is very difficult if the error occurs in js.bundle
  • Running the tests sometimes gets stuck in a <browser_name>: reset slow cycle
  • Running the tests sometimes results in the tests executing but the process not exiting
  • Firefox sometimes hangs
  • The server seems to take a long time to detect a browser has disconnected (30 seconds?)
  • The debug experience is very difficult as the browser frequently doesn't actually know which line you are debugging (due to the size of js.bundle).

This is a very important part of the development workflow, so we make some improvements here.


Reply to this email directly or view it on GitHubhttps://github.com//issues/7.

@leggetter
Copy link
Contributor Author

👍 to running headless

@mikes-c
Copy link

mikes-c commented Sep 27, 2013

And include support to generate code coverage

@fauna5
Copy link
Contributor

fauna5 commented Sep 27, 2013

In general we're going to be looking at other runners, so there may be little value in updating our current runner. We need to do some R&D here

dchambers added a commit that referenced this issue Nov 14, 2014
… ca52c0a..006fbec

006fbec Merge pull request #5 from adamshone/issue-4
5073659 Fixed broken UMD wrapper.
56b5f94 Merge pull request #7 from stevesouth/webkit-es6-map-foreach-fix
ed96d91 Webkit bug raised and comment added
cf23478 The latest webkit supports ES6 maps, but doesn’t seem to pass the third ‘map’ parameter back to a forEach function.
91f983d adding more browser versions for testing incl safari
cceb00a Issue 4: listeners that throw exceptions no longer prevent other listeners from being notified

git-subtree-dir: brjs-sdk/workspace/sdk/libs/javascript/emitr
git-subtree-split: 006fbec145ec367b99da4e53a6862231ae5d0110
@andy-berry-dev
Copy link
Member

Closing this as it will be fixed by allowing configurable test runners (#8) and it's already possible to run headless using PhantomJS (we do it for the core BRJS library tests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants