2017-12-06 8 views
0

나는 https://github.com/angular-examples/toh-6.git각도 테스트를 실행하는 방법은 무엇입니까?</p> <p>술집 테스트를 실행하는</p></li> <li><p>평가 해보십시오 :

  1. 로부터받은 종속성을 예제 프로젝트를 복제 angular_test

    술집 실행 --test을-ARG =를 - tags = aot --test-arg = - platform = dartium --test-arg = - 리포터 = 확장 됨 - verbose

,451,515,

Outpu : 각 테스트를 실행하는 방법을 제대로

PS Z:\Web\Test\dart_angular\external\toh-6> pub run angular_test --test-arg=--tags=aot --test-arg=--platform=dartium --test-arg=--reporter=expanded --verbose 
pub.bat serve test --port=0 
Loading source assets... 
Loading angular, test/pub_serve and dart_to_js_script_rewriter transformers... 
Pub "serve" started on http://localhost:52953 
Serving angular_tour_of_heroes test on http://localhost:52953 
Finished compilation. Running tests... 
pub.bat run test --tags=aot --platform=dartium --reporter=expanded --pub-serve=52953 
00:00 +0: test\app_test.dart: (suite) 
Skip: AppComponent tests need bootstrap equivalent for the Router init 
00:00 +0 ~1: loading test\all_test.dart 
00:00 +0 ~1 -1: loading test\all_test.dart [E] 
Failed to load "test\all_test.dart": 
Failed to run Dartium: Не удается найти указанный файл. 


Command: dartium.exe --user-data-dir=C:\Users\k.ponomarev\AppData\Local\Temp\dart_test_e20a0131-da5c-11e7-9d6f-902b34b6196e http://localhost:52953/packages/test/src/runner/browser/static/index.html?managerUrl=ws%3A%2F%2Flocalhost%3A52956%2FmFXmvlRej%252BuoXwBhtyWjm1u67DweMIM9%2F0&debug=false --disable-extensions --disable-popup-blocking --bwsi --no-first-run --no-default-browser-check --disable-default-apps --disable-translate. 
dart:async/future_impl.dart 22        _Completer.completeError 
dart:io-patch/process_patch.dart 412      _ProcessImpl._start.<fn> 
package:stack_trace/src/stack_zone_specification.dart 209 StackZoneSpecification._run 
package:stack_trace/src/stack_zone_specification.dart 119 StackZoneSpecification._registerCallback.<fn> 
dart:async/zone.dart 1116         _rootRun 
dart:async/zone.dart 1001         _CustomZone.run 
dart:async/zone.dart 901         _CustomZone.runGuarded 
dart:async/zone.dart 926         _CustomZone.bindCallback.<fn> 
package:stack_trace/src/stack_zone_specification.dart 209 StackZoneSpecification._run 
package:stack_trace/src/stack_zone_specification.dart 119 StackZoneSpecification._registerCallback.<fn> 
dart:async/zone.dart 1120         _rootRun 
dart:async/zone.dart 1001         _CustomZone.run 
dart:async/zone.dart 901         _CustomZone.runGuarded 
dart:async/zone.dart 926         _CustomZone.bindCallback.<fn> 
dart:async-patch/timer_patch.dart 21      Timer._createTimer.<fn> 
dart:isolate-patch/timer_impl.dart 366      _Timer._runTimers 
dart:isolate-patch/timer_impl.dart 394      _Timer._handleMessage 
dart:isolate-patch/isolate_patch.dart 151     _RawReceivePortImpl._handleMessage 
===== asynchronous gap =========================== 
dart:async/zone.dart 1034         _CustomZone.registerCallback 
dart:async/zone.dart 924         _CustomZone.bindCallback 
dart:async/timer.dart 52         new Timer 
dart:async/timer.dart 90         Timer.run 
dart:io-patch/process_patch.dart 392      _ProcessImpl._start 
dart:io-patch/process_patch.dart 34      Process.start 
package:test/src/runner/browser/dartium.dart 66   new Dartium.<fn>.<fn> 
===== asynchronous gap =========================== 
dart:async/zone.dart 1034         _CustomZone.registerCallback 
dart:async/zone.dart 924         _CustomZone.bindCallback 
dart:async/schedule_microtask.dart 148      scheduleMicrotask 
dart:async/future.dart 182         new Future.microtask 
package:test/src/runner/browser/dartium.dart 40   new Dartium.<fn>.<fn> 
package:test/src/runner/browser/dartium.dart 119   new Dartium.<fn> 
===== asynchronous gap =========================== 

.... 

[test] GET all_test.dart.browser_test.dart => angular_tour_of_heroes|test/all_test.dart.browser_test.dart 
00:00 +0 ~1 -1: Some tests failed. 
Shutting down... 
`pub serve` w 

?

답변

0

내 문제의 해결책을 찾았습니다. 테스트는 dartium.exe를 시작할 수 없습니다. 문제를 해결하려면

  1. PATH에 c : \ tools \ dartium을 추가하십시오.
  2. chrome.exe의 lounche하는 기호 링크 dartium.exe 만들기

    mklink dartium.exe C : \ 도구 \ dartium \ chrome.exe의

내가 테스트를 시작하는이 방법을 사용 :

  1. 실행 다른 콘솔에서 두 개의 명령

    술집

    봉사 에서와 마찬가지로 = 8081 -p dartium

  2. 실행 테스트 --pub이-역할을

    술집 (example) :

    술집 실행 angular_test --test, 인수 = - 태그 = AOT --test, 인수 = - 플랫폼 = dartium - 테스트 arg = - 리포터 = 확장 - 상세 표시