-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Switch off Stacktrace output #696
Comments
+1 Too much noise. A simple error takes up like 7 screens. 100 consecutive lines of |
Yes, me too. Maybe there can be super-improvement to get something like this: Failures:
1) Components.js Validate Tag Component tutorial on frontend page Element tag
component number 1 has item Text234234
Message:
"Expected 0 to be greater than 0"
at line XX in file/where/expect/found.js
2) Components.js Validate Tag Component tutorial on frontend page Element tag
component number 2 has item Lisa Simpson
Message:
Expected 0 to be greater than 0.
at line XY in file/where/expect2/found.js
Finished in 23.552 seconds
7 tests, 3 assertions, 2 failures |
The command line option for setting something to false is Are you sure changing the config doesn't work though? It's working in Protractor's own tests. |
@juliemr - Here is my protractor config file: exports.config = {
// The address of a running selenium server.
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
capabilities: {
'browserName': 'chrome'
},
// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['test/e2e/**/*.coffee'],
framework: 'mocha',
baseUrl: 'http://databox-admin.dev',
stackTrace: false
}; Could this be because I'm using mocha instead of jasmine? |
Yes, it's because of mocha. The stack traces option is specific to the test framework, because the test framework is what prints out the results. It looks like Mocha always outputs stack traces. See mochajs/mocha#545 and openlayers/openlayers#391 |
Ahh that makes sense. Thx @juliemr |
Thanks, @juliemr. I've realized it works fine without $ protractor conf/protractor-conf.js --no-stackTrace --verbose
------------------------------------
PID: 14884 (capability: chrome #1)
------------------------------------
Using the selenium server at http://localhost:4444/wd/hub
Components.js
Before feature: Validate Breadcrumb Component tutorial on frontend page
Login and open page
Open page
Click on FRONTEND item
Validate Breadcrumb Component tutorial on frontend page
Click on breadcrumb next item
Current url contains /component_library/breadddcrumb
Component tutorial header is Breadcrumb
tutorial subheader Usage is present
tutorial subheader Dependencies is present
Failures:
1) Components.js
Before feature: Validate Breadcrumb Component tutorial on frontend page Logi
n and open page
Message:
Expected false to be true.
Stacktrace:
Error: Failed expectation
at PageObject.login (d:\work\wmg\js-framework-examples\bower_components\fact
ory-testing-framework\pages\login.js:45:109)
at null.<anonymous> (d:\work\wmg\js-framework-examples\tests\dev_portal\step
s\login.js:5:29)
at flow.execute.then.e.stack (c:\Users\dyaroshenko\AppData\Roaming\npm\node_
modules\protractor\jasminewd\index.js:36:14)
at webdriver.promise.ControlFlow.runInNewFrame_ (c:\Users\dyaroshenko\AppDat
a\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdri
ver\promise.js:1598:20)
at webdriver.promise.ControlFlow.runEventLoop_ (c:\Users\dyaroshenko\AppData
\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriv
er\promise.js:1463:8)
2) Components.js
Before feature: Validate Breadcrumb Component tutorial on frontend page Clic
k on FRONTEND item
Message:
TypeError: Cannot read property 'ELEMENT' of undefined
Stacktrace:
Error
at steps.components.itClickOnDocsCategory (d:\work\wmg\js-framework-examples
\tests\dev_portal\steps\components.js:9:13)
at null.<anonymous> (d:\work\wmg\js-framework-examples\bower_components\fact
ory-testing-framework\modules\controller.js:70:32)
...
|
Nope, verbose overrides stacktrace. This is how jasmine-node set up its reporters - I added an issue to minijasminenode to track this. It will probably get taken care of in the update to Jasmine 2.0. juliemr/minijasminenode#15 Closing this issue, please add comments to the one for minijasminenode! |
@juliemr.I am facing the following issue when I'm running my test |
Is there way to switch off the Stacktrace output into console on failures?
e.g.
Current behavior:
Expected behavior:
Failures: 1) Components.js Validate Tag Component tutorial on frontend page Element tag component number 1 has item Text234234 Message: Expected 0 to be greater than 0. 2) Components.js Validate Tag Component tutorial on frontend page Element tag component number 2 has item Lisa Simpson Message: Expected 0 to be greater than 0. Finished in 23.552 seconds 7 tests, 3 assertions, 2 failures
Investigated a bit.
Found that
--stackTrace false
CLI argument seems not to workprotractor-conf.js options don't work too:
Thanks in advance
The text was updated successfully, but these errors were encountered: