Current behavior:
- when run a cypress script on terminal with command:
./node_modules/.bin/cypress run --port 3019 --browser chrome --config testFiles=myCypressPath/cypress/test/20200426172648.js
I can get stack trace printed in terminal like:

We can see that the log indicates the failed line number is in line 24, which is not correct
- in the meanwhile when I run it with
cypress open, it indicates that the failed line number is 31 which is correct:

Desired behavior:
how can I get correct stack trace on ternimal? I am using some automation framework to automate cypress scripts and parse the stack trace log to get failed line number
Test code to reproduce
var test1 = "http://argo-ui.oss-cn-beijing.aliyuncs.com/test.js";
var test2 = "http://argo-ui.oss-cn-beijing.aliyuncs.com/test (2).js";
var test4 = 111111;
describe('test_name', function() {
it('what_it_does', function() {
cy.viewport(1024, 768)
cy.setCookie('currentRegionId', 'test')
cy.wait(4000)
cy.visit('https://test.com')
cy.clickText('尊敬的用户');
cy.wait(3000)
cy.wait(1000)
cy.visit('https://test.com')
cy.wait(1000)
cy.get('li.J_submenu_edasAppManage > div.el-submenu__title > div:nth-child(1) > div').click()
cy.wait(2000)
cy.xpath('//div[text()="配置管理"]').click()
cy.wait(4000)
cy.visit('https://test.com/?regionNo=test')
cy.wait(2000)
cy.getIFrameBody('.J_iframe_Contianer').xpath('//span[text()="创建"]').click()
cy.wait(2000)
cy.getIFrameBody('.J_iframe_Contianer').find('#dataId').click()
cy.wait(1000)
cy.getIFrameBody('.J_iframe_Contianer').find('#dataId').clear().type('dfdfdfdfdfdfiiii')
cy.wait(1000)
cy.getIFrameBody('.J_iframe_Contianer').find('div.view-lines').click()
cy.wait(2000)
cy.getIFrameBody('.J_iframe_Contianer').find('textarea.inputarea').clear().type('fdfdfdfdf')
cy.wait(1000)
cy.getIFrameBody('.J_iframe_Contianer').find('button.next-btn-primary').click()
cy.wait(1000)
cy.getIFrameBody('.J_iframe_Contianer').find('div.next-dialog-footer > div > button[type="button"].next-btn-medium').click()
cy.wait(1000)
cy.getIFrameBody('.J_iframe_Contianer').find('button.next-btn-normal').click()
})
})
Versions
Cypress: 4.7.0
operating system: MacOS Catalina 10.15.5
browser: chrome 83.0.4103.97
Current behavior:
./node_modules/.bin/cypress run --port 3019 --browser chrome --config testFiles=myCypressPath/cypress/test/20200426172648.jsI can get stack trace printed in terminal like:
We can see that the log indicates the failed line number is in line 24, which is not correct
cypress open, it indicates that the failed line number is 31 which is correct:Desired behavior:
how can I get correct stack trace on ternimal? I am using some automation framework to automate cypress scripts and parse the stack trace log to get failed line number
Test code to reproduce
Versions
Cypress: 4.7.0
operating system: MacOS Catalina 10.15.5
browser: chrome 83.0.4103.97