我最近移到了最新版的守夜人。
现在,当我运行测试时-如果遇到错误,将报告写入控制台时,我会一遍又一遍地得到一长串相同错误的报告。
有人知道为什么这样做而不是只报告一次错误吗?
这里是一个例子:
TEST FAILURE: 11 errors during execution 1 assertions failed, 417 passed. 2m 58s
× smokeTests\registration\newRegistration_ChangePassword
– Register a new user and then Change His Password (1m 14s)
Waiting for the enterManual element to appear - expected "visible" but got: "not found"
at fillRegistrationStep4 (C:\dev\gitlab\betfred-mobile\tests\smokeTests\registration\newRegistration_ChangePassword.js:113:10)
at Object.Register a new user and then Change His Password (C:\dev\gitlab\betfred-mobile\tests\smokeTests\registration\newRegistration_ChangePassword.js:219:9)
An error occurred while running .setValue() command on <Section [name=step2],Element [name=@firstName]>: Error: First argument passed to .elementIdValue() should be a web element ID string. Received object.
at Function.validateElementId (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:36:19)
at ProtocolActions.elementIdValue (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:958:25)
at transport.locateElement.then.result (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api-loader\element-command.js:106:54)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
An error occurred while running .setValue() command on <Section [name=step2],Element [name=@lastName]>: Error: First argument passed to .elementIdValue() should be a web element ID string. Received object.
at Function.validateElementId (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:36:19)
at ProtocolActions.elementIdValue (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:958:25)
at transport.locateElement.then.result (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api-loader\element-command.js:106:54)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
An error occurred while running .setValue() command on <Section [name=step2],Element [name=@dobDay]>: Error: First argument passed to .elementIdValue() should be a web element ID string. Received object.
at Function.validateElementId (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:36:19)
at ProtocolActions.elementIdValue (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:958:25)
at transport.locateElement.then.result (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api-loader\element-command.js:106:54)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
An error occurred while running .setValue() command on <Section [name=step2],Element [name=@dobMonth]>: Error: First argument passed to .elementIdValue() should be a web element ID string. Received object.
at Function.validateElementId (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:36:19)
at ProtocolActions.elementIdValue (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:958:25)
at transport.locateElement.then.result (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api-loader\element-command.js:106:54)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
An error occurred while running .setValue() command on <Section [name=step2],Element [name=@dobYear]>: Error: First argument passed to .elementIdValue() should be a web element ID string. Received object.
at Function.validateElementId (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:36:19)
at ProtocolActions.elementIdValue (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:958:25)
at transport.locateElement.then.result (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api-loader\element-command.js:106:54)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
An error occurred while running .click() command on <Section [name=step3],Element [name=@securityQuestion]>: Error: First argument passed to .elementIdClick() should be a web element ID string. Received object.
at Function.validateElementId (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:36:19)
at ProtocolActions.elementIdClick (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:943:25)
at transport.locateElement.then.result (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api-loader\element-command.js:106:54)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
An error occurred while running .setValue() command on <Section [name=step3],Element [name=@answer]>: Error: First argument passed to .elementIdValue() should be a web element ID string. Received object.
at Function.validateElementId (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:36:19)
at ProtocolActions.elementIdValue (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:958:25)
at transport.locateElement.then.result (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api-loader\element-command.js:106:54)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
An error occurred while running .setValue() command on <Section [name=step4],Element [name=@postcode]>: Error: First argument passed to .elementIdValue() should be a web element ID string. Received object.
at Function.validateElementId (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:36:19)
at ProtocolActions.elementIdValue (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:958:25)
at transport.locateElement.then.result (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api-loader\element-command.js:106:54)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
An error occurred while running .click() command on <Section [name=step4],Element [name=@find]>: Error: First argument passed to .elementIdClick() should be a web element ID string. Received object.
at Function.validateElementId (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:36:19)
at ProtocolActions.elementIdClick (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api\protocol.js:943:25)
at transport.locateElement.then.result (C:\dev\gitlab\betfred-mobile\node_modules\nightwatch\lib\api-loader\element-command.js:106:54)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
at process._tickCallback (internal/process/next_tick.js:68:7)
HTML Report Generated at: reports\Test_Report_1554277164935.html
npm ERR! code ELIFECYCLE
npm ERR! errno 5