Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Exceptions thrown in test do not print stack traces back to the test file #4975

@dkaplan-pivotal

Description

@dkaplan-pivotal

Bug report

  • Node Version: v10.10.0
  • Protractor Version: Version 5.4.1
  • Angular Version:
Angular CLI: 6.2.4
Node: 10.10.0
OS: darwin x64
Angular: 6.1.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.8.4
@angular-devkit/build-angular     0.8.4
@angular-devkit/build-optimizer   0.8.4
@angular-devkit/build-webpack     0.8.4
@angular-devkit/core              0.8.4
@angular-devkit/schematics        0.8.4
@angular/cli                      6.2.4
@ngtools/webpack                  6.2.4
@schematics/angular               0.8.4
@schematics/update                0.8.4
rxjs                              6.2.2
typescript                        2.9.2
webpack                           4.20.2
  • Browser(s): Chrome
  • Operating System and Version Mac OS
  • Your protractor configuration file:
exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  specs: ['todo-spec.js']
};
  • A relevant example test:
describe('angularjs homepage todo list', function() {
  it('should add a todo', function() {
	throw new Error();
  });
});
  • Output from running the test
Failures:
1) angularjs homepage todo list should add a todo
  Message:
    Failed: Error
  Stack:
    Error: Failed: Error
        at /Users/foo/workspace/protractor-test/node_modules/jasminewd2/index.js:64:48
        at ControlFlow.emit (/Users/foo/workspace/protractor-test/node_modules/selenium-webdriver/lib/events.js:62:21)
        at ControlFlow.shutdown_ (/Users/foo/workspace/protractor-test/node_modules/selenium-webdriver/lib/promise.js:2674:10)
        at shutdownTask_.MicroTask (/Users/foo/workspace/protractor-test/node_modules/selenium-webdriver/lib/promise.js:2599:53)

1 spec, 1 failure
Finished in 0.007 seconds

[14:56:41] I/launcher - 0 instance(s) of WebDriver still running
[14:56:41] I/launcher - chrome #01 failed 1 test(s)
[14:56:41] I/launcher - overall: 1 failed spec(s)
[14:56:41] E/launcher - Process exited with error code 1

As you can see from that output, the stack trace does not mention the todo-spec.js file anywhere. This makes any sort of exception (e.g., a timeout) very difficult to troubleshoot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions