amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

I2I - Test Suite relies on test order and test leakages

Open bradfrizzell opened this issue 9 years ago • 9 comments

Currently, the test runner in the AMP project is exhibiting behavior that indicates that multiple tests are leaking state to each other, and that there is some unexplained jank in the overall infrastructure. This can be seen due to the following scenarios that are repeatedly observed:

  • A test file will pass when run in isolation, but fail when run with the entire suite.
  • A test file will fail when run in isolation, but pass when run with the entire suite.
  • Tests will fail when run locally, but pass when run on Travis.

To help combat these issues, I propose two new gulp tasks: gulp test --randomize to randomize the order the testfiles are run in. gulp bisect --file=foo.js to discover test files that are leaking state into failing test file foo.js by running a binary search on groups of test files until the grouping that causes a test failure is found.

I have already made a PR, https://github.com/ampproject/amphtml/pull/8779, that adds gulp test --randomize and assuming there is not a fundamental issue in my code I've somehow missed, the findings are not great. Simply by running the test files in a random order, I have observed many new test errors that I have not seen before. Additionally, running the test files in a random order is frequently crashing Karma entirely. Why this is occurring is not yet known, but this added task brings many issues to light we did not yet know about. Our test files should each be totally hermetic, but that is widely not the observed behavior in my initial findings.

bradfrizzell avatar Apr 18 '17 16:04 bradfrizzell

from that code it randomizes file level (describe level) but not at the "it" level correct?

erwinmombay avatar Apr 18 '17 17:04 erwinmombay

Yes, this is only randomizing at the file level. Randomizing at the 'it' level would be much more complicated due to the beforeEach and afterEach blocks.

bradfrizzell avatar Apr 18 '17 17:04 bradfrizzell

Yeah, we are still not yet entirely hermetic...

dvoytenko avatar Apr 19 '17 04:04 dvoytenko

@bradfrizzell could you include the results of a randomized run here? Would be good to give an idea of how much the tests are currently not hermetic.

FWIW - my vote is that randomized should be the default execution method to ensure tests are properly set up. This will however require some initial effort to fix currently failing tests and potentially lead to flakiness.

keithwrightbos avatar May 26 '17 13:05 keithwrightbos

Sure, I just ran a randomize run and got 21 failures:

Chrome 58.0.3029 (Linux 0.0.0) amp-youtube renders responsively FAILED
	Error: Script error. (:0)
Chrome 58.0.3029 (Linux 0.0.0) amp-social-share "before each" hook FAILED
	TypeError: Cannot read property 'currentRetry' of undefined
Chrome 58.0.3029 (Linux 0.0.0) amp-app-banner Android should remove banner if chrome FAILED
	Error: Uncaught TypeError: Cannot read property 'postMessage' of null (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:103406 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-viewer-integration/0.1/test/viewer-initiated-handshake-viewer-for-testing.js:133:4)
Chrome 58.0.3029 (Linux 0.0.0) amp-app-banner "before each" hook for "should parse manifest and set hrefs" FAILED
	TypeError: Attempted to wrap isIos which is already wrapped
	    at checkWrappedMethod (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:112215:29 <- node_modules/sinon/lib/sinon/util/core.js:81:0)
	    at Object.wrapMethod (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:112255:21 <- node_modules/sinon/lib/sinon/util/core.js:121:0)
	    at Object.stub (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:111683:26 <- node_modules/sinon/lib/sinon/stub.js:67:0)
	    at F.stub (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:109870:44 <- node_modules/sinon/lib/sinon/collection.js:117:0)
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:57342:13 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-app-banner/0.1/test/test-amp-app-banner.js:201:12)
	--------------
	Error: Stack Trace for original
	    at Object.wrapMethod (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:112274:34 <- node_modules/sinon/lib/sinon/util/core.js:140:0)
	    at Object.stub (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:111683:26 <- node_modules/sinon/lib/sinon/stub.js:67:0)
	    at F.stub (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:109870:44 <- node_modules/sinon/lib/sinon/collection.js:117:0)
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:57342:13 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-app-banner/0.1/test/test-amp-app-banner.js:201:12)
Chrome 58.0.3029 (Linux 0.0.0) amp-app-banner "before each" hook for "should setup click listener" FAILED
	TypeError: Attempted to wrap isIos which is already wrapped
	    at checkWrappedMethod (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:112215:29 <- node_modules/sinon/lib/sinon/util/core.js:81:0)
	    at Object.wrapMethod (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:112255:21 <- node_modules/sinon/lib/sinon/util/core.js:121:0)
	    at Object.stub (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:111683:26 <- node_modules/sinon/lib/sinon/stub.js:67:0)
	    at F.stub (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:109870:44 <- node_modules/sinon/lib/sinon/collection.js:117:0)
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:57342:13 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-app-banner/0.1/test/test-amp-app-banner.js:201:12)
	--------------
	Error: Stack Trace for original
	    at Object.wrapMethod (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:112274:34 <- node_modules/sinon/lib/sinon/util/core.js:140:0)
	    at Object.stub (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:111683:26 <- node_modules/sinon/lib/sinon/stub.js:67:0)
	    at F.stub (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:109870:44 <- node_modules/sinon/lib/sinon/collection.js:117:0)
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:57342:13 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-app-banner/0.1/test/test-amp-app-banner.js:201:12)
Chrome 58.0.3029 (Linux 0.0.0) #getLifecycleReporter type = adsense should return a null reporter for amp eid = 2092618 FAILED
	Error: Uncaught TypeError: Cannot read property 'postMessage' of null (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:103406 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-viewer-integration/0.1/test/viewer-initiated-handshake-viewer-for-testing.js:133:4)
Chrome 58.0.3029 (Linux 0.0.0) #getLifecycleReporter type = adsense should return a null reporter for amp eid = 117152681 FAILED
	Error: Uncaught TypeError: Cannot read property 'postMessage' of null (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:103406 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-viewer-integration/0.1/test/viewer-initiated-handshake-viewer-for-testing.js:133:4)
Chrome 58.0.3029 (Linux 0.0.0) #getLifecycleReporter type = adsense should return a null reporter for amp eid = 117152681 FAILED
	Error: Uncaught TypeError: Cannot read property 'postMessage' of null (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:103406 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-viewer-integration/0.1/test/viewer-initiated-handshake-viewer-for-testing.js:133:4)
	Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
Chrome 58.0.3029 (Linux 0.0.0) #getLifecycleReporter type = adsense should return null reporter for a4a eid = 117152652 FAILED
	Error: Uncaught TypeError: Cannot read property 'postMessage' of null (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:103406 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-viewer-integration/0.1/test/viewer-initiated-handshake-viewer-for-testing.js:133:4)
Chrome 58.0.3029 (Linux 0.0.0) AccessServerJwtAdapter   config should load valid config FAILED
	TypeError: Cannot read property 'authorization' of undefined
	    at new AccessClientAdapter (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:22566:67 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-access/0.1/amp-access-client.js:46:54)
	    at new AccessServerJwtAdapter (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:22893:27 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-access/0.1/amp-access-server-jwt.js:92:26)
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:26398:21 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-access/0.1/test/test-amp-access-server-jwt.js:64:22)
Chrome 58.0.3029 (Linux 0.0.0) AccessServerJwtAdapter   config should fail if config is invalid: authorization FAILED
	TypeError: Cannot convert undefined or null to object
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:26410:14 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-access/0.1/test/test-amp-access-server-jwt.js:79:13)
Chrome 58.0.3029 (Linux 0.0.0) AccessServerJwtAdapter   config should fail if config is invalid: publicKeyUrl FAILED
	TypeError: Cannot convert undefined or null to object
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:26417:14 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-access/0.1/test/test-amp-access-server-jwt.js:86:13)
Chrome 58.0.3029 (Linux 0.0.0) AccessServerJwtAdapter   config should fail if config is invalid: http publicKeyUrl FAILED
	TypeError: Cannot set property 'publicKeyUrl' of undefined
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:26424:35 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-access/0.1/test/test-amp-access-server-jwt.js:93:33)
Chrome 58.0.3029 (Linux 0.0.0) AccessServerJwtAdapter   config should support either publicKey or publicKeyUrl FAILED
	TypeError: Cannot convert undefined or null to object
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:26431:14 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-access/0.1/test/test-amp-access-server-jwt.js:100:13)
Chrome 58.0.3029 (Linux 0.0.0) AccessServerJwtAdapter   config should tolerate when i-amphtml-access-state is missing FAILED
	TypeError: Cannot read property 'document' of undefined
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:26439:10 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-access/0.1/test/test-amp-access-server-jwt.js:108:10)
Chrome 58.0.3029 (Linux 0.0.0) AccessServerJwtAdapter "before each" hook FAILED
	Error: Uncaught TypeError: Cannot read property 'postMessage' of null (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:103406 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-viewer-integration/0.1/test/viewer-initiated-handshake-viewer-for-testing.js:133:4)
Chrome 58.0.3029 (Linux 0.0.0) AccessServerJwtAdapter   "before each" hook for "should fetch JWT directly and authorize-and-fill via server" FAILED
	TypeError: Cannot read property 'document' of undefined
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:26380:15 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/extensions/amp-access/0.1/test/test-amp-access-server-jwt.js:45:15)
Chrome 58.0.3029 (Linux 0.0.0)  "after each" hook for "should fetch JWT directly and authorize-and-fill via server" FAILED
	Error: You likely forgot to restore sinon timers (installed via sandbox.useFakeTimers).
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:157874:11 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/test/_init_tests.js:290:10)
Chrome 58.0.3029 (Linux 0.0.0)  "after each" hook for "should fetch JWT directly and authorize-and-fill via server" FAILED
	Error: You likely forgot to restore sinon timers (installed via sandbox.useFakeTimers).
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:157874:11 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/test/_init_tests.js:290:10)
Chrome 58.0.3029 (Linux 0.0.0) AccessServerJwtAdapter "after each" hook FAILED
	TypeError: Cannot read property 'customElements' of undefined
	    at AmpFixture.teardown (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:203326:14 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/testing/describes.js:627:12)
	    at /tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:202872:19 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/testing/describes.js:244:18
	    at Array.forEach (native)
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:202871:37 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/testing/describes.js:243:36)
Chrome 58.0.3029 (Linux 0.0.0)  "after each" hook for "should fetch JWT directly and authorize-and-fill via server" FAILED
	Error: You likely forgot to restore sinon timers (installed via sandbox.useFakeTimers).
	    at Context.<anonymous> (/tmp/53ee0a6d0ee95fc7619511b39f138a80.browserify:157874:11 <- /usr/local/google/home/bradfrizzell/A4A/amphtml/test/_init_tests.js:290:10)
Chrome 58.0.3029 (Linux 0.0.0): Executed 1013 of 5444 (21 FAILED) (skipped 24) (50.506 secs / NaN secs)

If you want to duplicate, copy the following test file blob into a file, and save it as json or txt, and then run gulp test --testlist=<<name of your file>>. This was the order of the test run that I just did.

["test/_init_tests.js","test/fixtures/*.html",{"pattern":"test/fixtures/served/*.html","included":false,"nocache":false,"watched":true},{"pattern":"dist/**/*.js","included":false,"nocache":false,"watched":true},{"pattern":"dist.tools/**/*.js","included":false,"nocache":false,"watched":true},{"pattern":"examples/**/*","included":false,"nocache":false,"watched":true},{"pattern":"dist.3p/**/*","included":false,"nocache":false,"watched":true},"test/functional/test-layout.js","test/functional/utils/test-array.js","test/functional/test-cid.js","_WONTMATCH.qqq","test/functional/test-jank-meter.js","test/functional/test-ad-cid.js","extensions/amp-video/0.1/test/test-amp-video.js","test/functional/test-crypto.js","extensions/amp-analytics/0.1/test/test-visibility-impl.js","test/functional/test-platform.js","test/functional/utils/test-rate-limit.js","test/functional/test-layout-delay-meter.js","test/functional/test-extensions.js","test/functional/test-polyfill-document-contains.js","test/functional/test-3p-nameframe.js","extensions/amp-nexxtv-player/0.1/test/test-amp-nexxtv-player.js","extensions/amp-analytics/0.1/test/test-analytics-root.js","extensions/amp-auto-ads/0.1/test/test-ad-tracker.js","test/functional/test-chunk.js","test/functional/utils/test-pem.js","extensions/amp-gfycat/0.1/test/test-amp-gfycat.js","test/functional/test-fixed-layer.js","test/integration/test-amp-carousel.js","test/functional/test-document-ready.js","test/functional/test-error.js","test/functional/test-cache-sw-core.js","extensions/amp-analytics/0.1/test/test-transport.js","test/functional/test-ampdoc.js","extensions/amp-dailymotion/0.1/test/test-amp-dailymotion.js","extensions/amp-ad/0.1/test/test-a2a-listener.js","test/functional/test-performance.js","extensions/amp-viewer-integration/0.1/test/test-amp-webview-viewer-integration.js","extensions/amp-kaltura-player/0.1/test/test-amp-kaltura-player.js","test/integration/test-amp-img.js","extensions/amp-vine/0.1/test/test-amp-vine.js","ads/google/a4a/test/test-performance.js","extensions/amp-a4a/0.1/test/test-amp-a4a.js","extensions/amp-ad/0.1/test/test-amp-ad.js","extensions/amp-bind/0.1/test/test-amp-state.js","test/functional/test-types.js","test/functional/inabox/test-inabox-messaging-host.js","test/functional/test-finite-state-machine.js","test/functional/test-3p.js","test/functional/test-pull-to-refresh.js","extensions/amp-youtube/0.1/test/test-amp-youtube.js","test/integration/test-errors.js","extensions/amp-social-share/0.1/test/test-amp-social-share.js","test/functional/test-integration.js","test/functional/test-web-components.js","test/functional/test-ios-scrollfreeze-bug.js","test/functional/test-gesture-recognizers.js","extensions/amp-ad-network-gmossp-impl/0.1/test/test-amp-ad-network-gmossp-impl.js","test/functional/test-ads-config.js","test/functional/test-amp-context.js","test/functional/test-friendly-iframe-embed.js","extensions/amp-auto-ads/0.1/test/test-ad-network-config.js","test/functional/test-document-submit.js","extensions/amp-list/0.1/test/test-amp-list.js","extensions/amp-viewer-integration/0.1/test/test-viewer-initiated-handshake.js","extensions/amp-viewer-integration/0.1/test/viewer-for-testing.js","extensions/amp-app-banner/0.1/test/test-amp-app-banner.js","ads/google/a4a/test/test-google-data-reporter.js","test/functional/test-cookies.js","extensions/amp-access/0.1/test/test-amp-access-server-jwt.js","test/functional/test-sanitizer.js","test/functional/test-standard-actions.js","extensions/amp-viewer-integration/0.1/test/test-touch-handler.js","test/functional/test-pass.js","test/functional/utils/test-promise.js","extensions/amp-carousel/0.1/test/test-slidescroll.js","extensions/amp-izlesene/0.1/test/test-amp-izlesene.js","extensions/amp-access/0.1/test/test-amp-access-other.js","test/functional/test-video-manager.js","extensions/amp-carousel/0.1/test/test-base-slide.js","test/functional/test-extension-location.js","test/functional/test-template.js","extensions/amp-share-tracking/0.1/test/test-amp-share-tracking.js","extensions/amp-image-lightbox/0.1/test/test-amp-image-lightbox.js","extensions/amp-access-laterpay/0.1/test/test-amp-access-laterpay.js","test/functional/test-shadow-embed.js","test/functional/test-anchor-click-interceptor.js","test/integration/test-example-validation.js","extensions/amp-access/0.1/test/test-amp-access.js","extensions/amp-viewer-integration/0.1/test/test-amp-viewer-integration.js","test/functional/web-worker/test-amp-worker.js","test/functional/test-motion.js","test/functional/test-srcset.js","extensions/amp-analytics/0.1/test/test-instrumentation.js","extensions/amp-ad-network-doubleclick-impl/0.1/test/test-doubleclick-integration.js","test/integration/test-video-players.js","test/integration/test-amp-bind.js","test/functional/test-action.js","test/functional/test-iframe-helper.js","test/functional/test-3p-environment.js","extensions/amp-live-list/0.1/test/test-poller.js","test/functional/test-font-stylesheet-timeout.js","test/functional/test-experiments.js","extensions/amp-form/0.1/test/test-form-verifiers.js","extensions/amp-form/0.1/test/test-validation-bubble.js","test/functional/test-resources.js","test/functional/test-style.js","extensions/amp-gist/0.1/test/test-amp-gist.js","extensions/amp-lightbox-viewer/0.1/test/test-amp-lightbox-viewer.js","test/functional/test-string.js","extensions/amp-reddit/0.1/test/test-amp-reddit.js","extensions/amp-auto-ads/0.1/test/test-amp-auto-ads.js","test/integration/test-amp-ad-3p.js","extensions/amp-auto-ads/0.1/test/test-ad-strategy.js","test/functional/test-dom.js","test/functional/utils/test-dom-fingerprint.js","extensions/amp-mustache/0.1/test/test-amp-mustache.js","test/functional/test-polyfill-array-includes.js","test/functional/test-object.js","extensions/amp-sticky-ad/0.1/test/test-amp-sticky-ad.js","test/functional/inabox/test-inabox-viewport.js","ads/google/test/test-adsense-amp-auto-ads.js","test/functional/test-layout-rect.js","extensions/amp-analytics/0.1/test/test-amp-analytics.js","test/functional/test-log.js","test/functional/test-transition.js","extensions/amp-a4a/0.1/test/test-a4a-integration.js","extensions/amp-pinterest/0.1/test/test-amp-pinterest.js","ads/google/a4a/test/test-utils.js","extensions/amp-fresh/0.1/test/test-amp-fresh.js","extensions/amp-analytics/0.1/test/test-events.js","test/integration/test-visibility-states.js","test/functional/test-task-queue.js","test/functional/test-timer.js","extensions/amp-iframe/0.1/test/test-amp-iframe.js","extensions/amp-fx-parallax/0.1/test/test-amp-fx-parallax.js","extensions/amp-live-list/0.1/test/test-live-list-manager.js","test/integration/test-extensions-loading.js","test/functional/test-resource.js","test/functional/test-style-installer.js","test/functional/test-ad-helper.js","test/functional/test-exponential-backoff.js","test/functional/test-mustache.js","test/functional/test-element-stub.js","extensions/amp-analytics/0.1/test/test-variables.js","extensions/amp-ad/0.1/test/test-amp-ad-ui.js","test/functional/test-base-element.js","test/functional/test-history.js","test/functional/test-storage.js","test/functional/test-3p-frame.js","extensions/amp-install-serviceworker/0.1/test/test-amp-install-serviceworker.js","extensions/amp-call-tracking/0.1/test/test-amp-call-tracking.js","test/functional/test-ie-media-bug.js","test/functional/test-document-state.js","extensions/amp-ad/0.1/test/test-amp-ad-custom.js","extensions/amp-analytics/0.1/test/test-visibility-manager.js","test/manual/test-sw.js","extensions/amp-ad-network-doubleclick-impl/0.1/test/test-amp-ad-network-doubleclick-impl.js","extensions/amp-o2-player/0.1/test/test-amp-o2-player.js","extensions/amp-animation/0.1/test/test-css-expr.js","test/functional/utils/test-signals.js","extensions/amp-ad/0.1/test/test-amp-ad-xorigin-iframe-handler.js","extensions/amp-fx-flying-carpet/0.1/test/test-amp-fx-flying-carpet.js","test/integration/test-amp-ad-doubleclick.js","extensions/amp-ad/0.1/test/test-amp-ad-3p-impl.js","test/functional/test-polyfill-object-assign.js","extensions/amp-experiment/0.1/test/test-amp-experiment.js","test/functional/test-iframe-stub.js","test/functional/test-animation.js","test/functional/test-custom-element.js","test/functional/test-intersection-observer.js","test/functional/test-runtime.js","test/functional/3p/test-3p-messaging.js","extensions/amp-auto-ads/0.1/test/test-placement.js","test/functional/test-viewer.js","test/functional/test-activity.js","extensions/amp-reach-player/0.1/test/test-amp-reach-player.js","test/integration/test-configuration.js","test/functional/ads/test-csa.js","extensions/amp-ad/0.1/test/test-concurrent-load.js","extensions/amp-viewer-integration/0.1/test/webview-viewer-for-testing.js","extensions/amp-form/0.1/test/test-amp-form.js","extensions/amp-timeago/0.1/test/test-amp-timeago.js","extensions/amp-playbuzz/0.1/test/test-amp-playbuzz.js","test/functional/test-json.js","extensions/amp-sticky-ad/1.0/test/test-amp-sticky-ad.js","extensions/amp-animation/0.1/test/test-web-animations.js","extensions/amp-carousel/0.1/test/test-scrollable-carousel.js","extensions/amp-a4a/0.1/test/testdata/valid_css_at_rules_amp.reserialized.js","extensions/amp-vimeo/0.1/test/test-amp-vimeo.js","ads/google/a4a/test/test-traffic-experiments.js","extensions/amp-bind/0.1/test/test-bind-impl.js","extensions/amp-dynamic-css-classes/0.1/test/test-dynamic-classes.js","extensions/amp-bind/0.1/test/test-bind-evaluator.js","extensions/amp-selector/0.1/test/test-amp-selector.js","test/functional/test-mode.js","test/functional/test-url-replacements.js","test/functional/test-xhr.js","extensions/amp-live-list/0.1/test/test-amp-live-list.js","test/functional/test-input.js","extensions/amp-instagram/0.1/test/test-amp-instagram.js","test/functional/test-intersection-observer-polyfill.js","test/functional/test-polyfill-math-sign.js","extensions/amp-access/0.1/test/test-amp-access-client.js","test/functional/test-impression.js","test/functional/3p/test-iframe-messaging-client.js","extensions/amp-form/0.1/test/test-form-proxy.js","test/functional/test-analytics.js","extensions/amp-access/0.1/test/test-amp-access-vendor.js","extensions/amp-analytics/0.1/test/test-visibility-model.js","extensions/amp-fresh/0.1/test/test-amp-fresh-manager.js","test/functional/test-focus-history.js","extensions/amp-ad-network-adsense-impl/0.1/test/test-amp-ad-network-adsense-impl.js","test/functional/test-document-info.js","test/functional/test-variable-source.js","extensions/amp-ad-network-triplelift-impl/0.1/test/test-amp-ad-network-triplelift-impl.js","extensions/amp-access/0.1/test/test-login-dialog.js","extensions/amp-access/0.1/test/test-jwt.js","extensions/amp-apester-media/0.1/test/test-amp-apester-media.js","test/integration/test-released.js","extensions/amp-font/0.1/test/test-fontloader.js","test/functional/test-preconnect.js","extensions/amp-a4a/0.1/test/utils.js","extensions/amp-google-vrview-image/0.1/test/test-amp-google-vrview-image.js","extensions/amp-access/0.1/test/test-amp-login-done-dialog.js","extensions/amp-3q-player/0.1/test/test-amp-3q-player.js","extensions/amp-audio/0.1/test/test-amp-audio.js","test/functional/utils/test-bytes.js","test/functional/test-batched-xhr.js","extensions/amp-facebook/0.1/test/test-amp-facebook.js","extensions/amp-viewer-integration/0.1/test/viewer-initiated-handshake-viewer-for-testing.js","test/functional/test-alp-handler.js","extensions/amp-access/0.1/test/test-amp-access-server.js","test/functional/inabox/test-position-observer.js","extensions/amp-fit-text/0.1/test/test-amp-fit-text.js","extensions/amp-ad-network-cloudflare-impl/0.1/test/test-amp-ad-network-cloudflare-impl.js","test/integration/test-video-players-helper.js","test/functional/test-gesture.js","test/functional/test-position-observer.js","extensions/amp-experiment/0.1/test/test-variant.js","test/functional/test-url.js","extensions/amp-form/0.1/test/integration/test-integration-form.js","extensions/amp-brightcove/0.1/test/test-amp-brightcove.js","test/functional/test-amp-pixel.js","extensions/amp-ima-video/0.1/test/test-amp-ima-video.js","extensions/amp-bind/0.1/test/test-bind-validator.js","test/functional/utils/test-priority-queue.js","extensions/amp-dynamic-css-classes/0.1/test/test-runtime-classes.js","test/functional/test-document-click.js","test/functional/test-vsync.js","extensions/amp-soundcloud/0.1/test/test-amp-soundcloud.js","extensions/amp-sidebar/0.1/test/test-amp-sidebar.js","test/functional/test-size-list.js","extensions/amp-a4a/0.1/test/test-a4a-var-source.js","extensions/amp-brid-player/0.1/test/test-amp-brid-player.js","test/functional/test-observable.js","extensions/amp-anim/0.1/test/test-amp-anim.js","ads/google/a4a/test/test-google-ads-a4a-config.js","extensions/amp-access/0.1/test/test-access-expr.js","test/functional/test-polyfill-domtokenlist-toggle.js","test/integration/test-amp-pixel.js","extensions/amp-springboard-player/0.1/test/test-amp-springboard-player.js","test/functional/test-service.js","test/functional/test-curve.js","test/functional/utils/test-base64.js","extensions/amp-twitter/0.1/test/test-amp-twitter.js","test/functional/test-event-helper.js","extensions/amp-form/0.1/test/test-form-validators.js","extensions/amp-accordion/0.1/test/test-amp-accordion.js","extensions/amp-font/0.1/test/test-amp-font.js","extensions/amp-access/0.1/test/test-signin.js","extensions/amp-user-notification/0.1/test/test-amp-user-notification.js","extensions/amp-ooyala-player/0.1/test/test-amp-ooyala.js","test/functional/test-render-delaying-services.js","extensions/amp-analytics/0.1/test/test-vendors.js","extensions/amp-animation/0.1/test/test-amp-animation.js","extensions/amp-a4a/0.1/test/testdata/test_fragments.js","test/integration/test-boilerplates.js","extensions/amp-ad-network-doubleclick-impl/0.1/test/test-doubleclick-a4a-config.js","extensions/amp-auto-ads/0.1/test/test-attributes.js","test/functional/test-get-html.js","extensions/amp-hulu/0.1/test/test-amp-hulu.js","extensions/amp-jwplayer/0.1/test/test-amp-jwplayer.js","test/functional/test-viewport.js","test/functional/test-amp-img.js","extensions/amp-bind/0.1/test/test-bind-expression.js"]

bradfrizzell avatar May 26 '17 17:05 bradfrizzell

This issue hasn't been updated in awhile. @bradfrizzell Do you have any updates?

ampprojectbot avatar Oct 19 '17 23:10 ampprojectbot

This is still an issue. Just ran gulp test --randomize and the test runner failed tests before crashing.

Reruns are now done using a random seed, i.e. gulp test --randomize --seed=0.32563876652782153

Migrating tests to use describes.realWin instead of just describes seems to mitigate the issue.

bradfrizzell avatar Oct 20 '17 13:10 bradfrizzell

This issue hasn't been updated in awhile. @bradfrizzell Do you have any updates?

ampprojectbot avatar Jan 22 '18 22:01 ampprojectbot

Since this issue was filed, several fixes have been made to the framework including the adoption of chai v4, which detects things like sandbox errors that cause test flakiness.

In addition, the --randomize flag was removed in #13292. We're tracking the last remaining log initialization bug in the A4A tests in #12135.

This issue is obsolete and can be closed.

rsimha avatar Feb 06 '18 17:02 rsimha