Discussion:
[dart-misc] Dart-lang/test - Run Chrome in headless mode unless debugging is enabled.
a***@gmail.com
2018-01-04 03:54:54 UTC
Permalink
In the recent change log:
https://pub.dartlang.org/packages/test#-changelog-tab-

It lists: Run Chrome in headless mode unless debugging is enabled.

I don't know if this is suppose to be the default way the chrome platform
is handled or if there's any additional configuration needed (like defining
a platform that extends the chrome platform).

I tried running using it locally, I changed my platform from dartium top
chrome and then ran my angulardart tests.

But the first browser test just got stuck and stayed there. Whereas it
passed with dartium and had no hangups or issues.

Is there any guidance for it's use?
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'Anders Sandholm' via Dart Misc
2018-01-04 09:12:01 UTC
Permalink
Looks like the change log wording was included with this change:
https://github.com/dart-lang/test/commit/948fe28bcf71cf7d8e8ebc0f6e04eb
783a00a458#diff-4ac32a78649ca5bdd8e0ba38b7006a1e
In the recent change log: https://pub.dartlang.org/packa
ges/test#-changelog-tab-
It lists: Run Chrome in headless mode unless debugging is enabled.
I don't know if this is suppose to be the default way the chrome platform
is handled or if there's any additional configuration needed (like defining
a platform that extends the chrome platform).
I tried running using it locally, I changed my platform from dartium top
chrome and then ran my angulardart tests.
But the first browser test just got stuck and stayed there. Whereas it
passed with dartium and had no hangups or issues.
Is there any guidance for it's use?
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
Anders Sandholm, Product Manager, Dart
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
a***@gmail.com
2018-01-04 15:25:26 UTC
Permalink
Thanks, Anders. I appreciate your response.

I saw the changes, but to me it seems to reenforce the changelog's
statement about not doing it in debug mode.

I don't think I am running it in debug mode, as described below I remove
the definition from pubspec.

For example, I cloned this repo: https://github.com/Stargator/dart_toh.git

And then, I had to run pub upgrade to get the latest version of test.

I changed the dart_test.yaml by replacing dartium with chrome. I remove the
web_compiler and debug definition from pubspec.yaml

Then I ran `pub run angular_test`
Error getting
http://localhost:60162/all_test.dart.browser_test.dart.js.map: Connection
closed before full header was received, uri =
http://localhost:60162/all_test.dart.browser_test.dart.js.map

So I don't any guidance that clarifies what else may need to be done to
support headless chrome.

John
https://github.com/dart-lang/test/commit/948fe28bcf71cf7d8e8ebc0f6e04eb783a00a458#diff-4ac32a78649ca5bdd8e0ba38b7006a1e
Post by a***@gmail.com
https://pub.dartlang.org/packages/test#-changelog-tab-
It lists: Run Chrome in headless mode unless debugging is enabled.
I don't know if this is suppose to be the default way the chrome platform
is handled or if there's any additional configuration needed (like defining
a platform that extends the chrome platform).
I tried running using it locally, I changed my platform from dartium top
chrome and then ran my angulardart tests.
But the first browser test just got stuck and stayed there. Whereas it
passed with dartium and had no hangups or issues.
Is there any guidance for it's use?
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
Anders Sandholm, Product Manager, Dart
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
'William Hesse' via Dart Misc
2018-01-04 15:48:27 UTC
Permalink
I would file this failure and all related information as an issue against
the test package, at https://github.com/dart-lang/test/
Do the tests run correctly with Chrome in normal mode, when a version of
package:test before this change is used?

Please include about which OS you are using, and all other information
needed to reproduce the problem.
Post by a***@gmail.com
Thanks, Anders. I appreciate your response.
I saw the changes, but to me it seems to reenforce the changelog's
statement about not doing it in debug mode.
I don't think I am running it in debug mode, as described below I remove
the definition from pubspec.
For example, I cloned this repo: https://github.com/Stargator/dart_toh.git
And then, I had to run pub upgrade to get the latest version of test.
I changed the dart_test.yaml by replacing dartium with chrome. I remove
the web_compiler and debug definition from pubspec.yaml
Then I ran `pub run angular_test`
Error getting http://localhost:60162/all_test.dart.browser_test.dart.
js.map: Connection closed before full header was received, uri =
http://localhost:60162/all_test.dart.browser_test.dart.js.map
So I don't any guidance that clarifies what else may need to be done to
support headless chrome.
John
https://github.com/dart-lang/test/commit/948fe28bcf71cf7d8e8
ebc0f6e04eb783a00a458#diff-4ac32a78649ca5bdd8e0ba38b7006a1e
In the recent change log: https://pub.dartlang.org/packa
ges/test#-changelog-tab-
It lists: Run Chrome in headless mode unless debugging is enabled.
I don't know if this is suppose to be the default way the chrome
platform is handled or if there's any additional configuration needed (like
defining a platform that extends the chrome platform).
I tried running using it locally, I changed my platform from dartium top
chrome and then ran my angulardart tests.
But the first browser test just got stuck and stayed there. Whereas it
passed with dartium and had no hangups or issues.
Is there any guidance for it's use?
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to
http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google
Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send
--
Anders Sandholm, Product Manager, Dart
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
William Hesse
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
a***@gmail.com
2018-01-04 23:51:14 UTC
Permalink
Hey William,

The tests fail to run in with Chrome as the platform versus passing when
dartium is the platform set.

I'm on a MacOS 10.12.6.

Using package 0.12.29+1, I ran the tests in Chrome.

I'm using https://github.com/Stargator/dart_toh.git as my playground to
test out the feature

After running *pub run angular_test*, I get the following

The pub serve output is at
/var/folders/57/6wq090815bb1x_vldxxk5yl40000gn/T/angular_test_pub_serve_output.log.
Run with --verbose to get this output in the console instead.
pub serve test --port=0
Pub "serve" started on http://localhost:62870
Finished compilation. Running tests...
pub run test --pub-serve=62870
00:00 +0: compiling test/all_test.dart
00:00 +0: test/app_test.dart: (suite)
Skip: AppComponent tests need bootstrap equivalent for the Router init
00:00 +0 ~1: compiling test/all_test.dart
"pub serve" is compiling test/all_test.dart...
Bad state: Should only get this output once.
package:angular_test/src/bin/runner.dart 62 run.<fn>.<fn>
===== asynchronous gap ===========================
dart:async _Completer.completeError
package:angular_test/src/bin/runner.dart 74 run.<fn>.<fn>
===== asynchronous gap ===========================
dart:async new Future.microtask
package:angular_test/src/bin/runner.dart 50 run.<fn>.<fn>
===== asynchronous gap ===========================
dart:async Stream.forEach
package:angular_test/src/bin/runner.dart 50 run.<fn>
===== asynchronous gap ===========================
dart:async _asyncThenWrapperHelper
package:angular_test/src/bin/runner.dart 44 run.<fn>
package:stack_trace Chain.capture
package:angular_test/src/bin/runner.dart 44 run
Shutting down...
`pub serve` was not terminated
00:30 +0 ~1 -1: compiling test/all_test.dart [E]
Failed to load "test/all_test.dart":
Error getting
http://localhost:62870/all_test.dart.browser_test.dart.js.map: Connection
closed before full header was received, uri =
http://localhost:62870/all_test.dart.browser_test.dart.js.map
Make sure "pub serve" is running.
00:30 +0 ~1 -1: Some tests failed.


The dart_test.yaml file with changes I made so Chrome is the platform:

# Test Configuration

# This is a browser-only package, so test on content shell by default.
platforms: [chrome]

# Determines that platform our tests will run on
test_on: "browser || vm" # Essentially all browsers and command line on Windows, Mac, and Linux

# This boolean field controls whether or not stack traces are chained. Disabling stack trace chaining will improve
# performance for heavily asynchronous code at the cost of debuggability.
chain_stack_traces: false

# This package's tests are fine. The default timeout.
timeout: "none"

# This boolean field controls whether or not stack traces caused by errors are trimmed to remove internal stack frames.
# This includes frames from the Dart core libraries, the stack_trace package, and the test package itself.
# It defaults to false.
verbose_trace: true

# This boolean field controls whether or not stack traces caused by errors that occur while running Dart compiled to JS
# are converted back to Dart style. This conversion uses the source map generated by dart2js to approximate the original
# Dart line, column, and in some cases member name for each stack frame. It defaults to false.
js_trace: false

# This field controls whether or not tests are skipped. It's usually applied to specific tags rather than used at the top level. Like the skip parameter for test(), it can either be a boolean indicating whether the tests are skipped or a string indicating the reason they're skipped.
tags:
# Tests that are run with the Ahead of Time (AOT) compiler (ie: All AngularDart tests)
aot:

# Tag for any tests that need a browser
browser:

# Integration tests are fine, so use default timeout again.
integration: {timeout: 1x}

# Sanity tests are quick and verify that nothing is obviously wrong. Declaring
# the tag allows us to tag tests with it without getting warnings.
sanity:
retry: 2 # Determines number of retries for a test

ie:
skip: "IE is not officially supported"

# Runner Configuration

reporter: expanded

# This field applies configuration when specific operating systems are being used.
on_os:
windows:

mac-os:

linux:

# Indicates the filename pattern that the test runner uses to find test files in directories
# It defaults to "*_test.dart"
filename: "*_test.dart"

# Paths the Test Runner will find test files
# It defaults to test/
paths:
- test/
Post by 'William Hesse' via Dart Misc
I would file this failure and all related information as an issue against
the test package, at https://github.com/dart-lang/test/
Do the tests run correctly with Chrome in normal mode, when a version of
package:test before this change is used?
Please include about which OS you are using, and all other information
needed to reproduce the problem.
Post by a***@gmail.com
Thanks, Anders. I appreciate your response.
I saw the changes, but to me it seems to reenforce the changelog's
statement about not doing it in debug mode.
I don't think I am running it in debug mode, as described below I remove
the definition from pubspec.
https://github.com/Stargator/dart_toh.git
And then, I had to run pub upgrade to get the latest version of test.
I changed the dart_test.yaml by replacing dartium with chrome. I remove
the web_compiler and debug definition from pubspec.yaml
Then I ran `pub run angular_test`
Error getting
Connection closed before full header was received, uri =
http://localhost:60162/all_test.dart.browser_test.dart.js.map
So I don't any guidance that clarifies what else may need to be done to
support headless chrome.
John
https://github.com/dart-lang/test/commit/948fe28bcf71cf7d8e8ebc0f6e04eb783a00a458#diff-4ac32a78649ca5bdd8e0ba38b7006a1e
Post by a***@gmail.com
https://pub.dartlang.org/packages/test#-changelog-tab-
It lists: Run Chrome in headless mode unless debugging is enabled.
I don't know if this is suppose to be the default way the chrome
platform is handled or if there's any additional configuration needed (like
defining a platform that extends the chrome platform).
I tried running using it locally, I changed my platform from dartium
top chrome and then ran my angulardart tests.
But the first browser test just got stuck and stayed there. Whereas it
passed with dartium and had no hangups or issues.
Is there any guidance for it's use?
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to
http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google
Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send
--
Anders Sandholm, Product Manager, Dart
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
William Hesse
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Loading...