Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] In the GUI, show the number line of code being run rather than the step number #4858

Closed
ChaseBig opened this issue Jul 29, 2019 · 7 comments
Labels
pkg/reporter This is due to an issue in the packages/reporter directory pkg/server This is due to an issue in the packages/server directory stage: ready for work The issue is reproducible and in scope type: enhancement Requested enhancement of existing feature

Comments

@ChaseBig
Copy link

Current behavior:

When viewing running tests via the GUI or recordings online, there is a number associated with each step. This isn't really helpful for any of my personal use-cases and I'm unsure if it's really that helpful for anyone else.

image

Desired behavior:

What WOULD be incredibly helpful is if the number shown in the GUI for each step was in reference to the specific line of code being run. This would help to easily debug which specific line of the test is failing.

image

Versions

Cypress 3.4.0
OSX 10.14.6
Chrome 75
Electron 61

@pictuner
Copy link

That would be useful indeed. First thing I do is 'what does the step say? Grep it in the test script and revisit.

@ChaseBig
Copy link
Author

That would be useful indeed. First thing I do is 'what does the step say? Grep it in the test script and revisit.

I do the same. It's not a "blocker" at all, per-say. But when I have a few longggg tests that execute similar steps multiple times throughout the test, it makes it a bit difficult to know exactly which step failed when the test is so long. The feature I'm testing is a long user-flow, so segmenting it into smaller tests isn't exactly possible for these instances.

Nonetheless, being able to reference the line of code that the failed step is located at would be much more helpful than somewhat-arbitrary ascending numbers.

@jennifer-shehane
Copy link
Member

We've made some progress in this issue #3762 involving associating the Command Log output to the associated test code.

The first and biggest improvement, we believe, will be displaying the test code on error (with lines of code) and also allowing you to click to view the test file for each test / error.

We haven't thought about this implementation exactly, and I'm not sure that we would display the lines of code to replace the step numbers, but it's definitely a good idea to somehow associate each printed command with the actual written test code.

@cypress-bot cypress-bot bot added the stage: ready for work The issue is reproducible and in scope label Jul 30, 2019
@jennifer-shehane jennifer-shehane added type: enhancement Requested enhancement of existing feature pkg/reporter This is due to an issue in the packages/reporter directory pkg/server This is due to an issue in the packages/server directory labels Jul 30, 2019
@ChaseBig
Copy link
Author

We've made some progress in this issue #3762 involving associating the Command Log output to the associated test code.

The first and biggest improvement, we believe, will be displaying the test code on error (with lines of code) and also allowing you to click to view the test file for each test / error.

We haven't thought about this implementation exactly, and I'm not sure that we would display the lines of code to replace the step numbers, but it's definitely a good idea to somehow associate each printed command with the actual written test code.

Hi @jennifer-shehane, thank you for taking the time to review and respond!

These new improvements sound very exciting and will definitely be helpful. While I would still love to have a way to reference each step to a specific line of code, I understand that may not be viable.

@ChaseBig
Copy link
Author

@jennifer-shehane How is this coming along?

@jennifer-shehane
Copy link
Member

A lot of the code necessary to associate lines of code with tests and errors is being done in this PR #4041

That PR will be merged into this PR about error improvements which will at least show code line information per error: #3930

@jennifer-shehane
Copy link
Member

Closing this issue since it hasn’t had a lot of interest over the years. We do show a preview of the lines of code ok error now.

@jennifer-shehane jennifer-shehane closed this as not planned Won't fix, can't repro, duplicate, stale Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg/reporter This is due to an issue in the packages/reporter directory pkg/server This is due to an issue in the packages/server directory stage: ready for work The issue is reproducible and in scope type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

3 participants