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

Run scenarios #69

Open
aslakhellesoy opened this issue May 5, 2022 · 6 comments
Open

Run scenarios #69

aslakhellesoy opened this issue May 5, 2022 · 6 comments
Labels
⚑ enhancement Request for new functionality

Comments

@aslakhellesoy
Copy link
Contributor

aslakhellesoy commented May 5, 2022

πŸ€” What's the problem you're trying to solve?

I don't want to leave my editor to run scenarios

✨ What's your proposed solution?

A keyboard shortcut for running the scenario on the current line, or all the scenarios, or all the scenarios in a directory, or filtered by tags etc etc.

This would run Cucumber with the message formatter, send the messages to a temporary file, parse the contents of that file (using this class) and decorate lines in the code with a background indicating the status. Errors can be expanded straight in the editor. Stack trace elements would be links.

How to execute Cucumber depends on the Cucumber implementation, so the editor would have to know how to deal with each implementation. We should provide a setting to allow users to override how Cucumber is run.

@aslakhellesoy aslakhellesoy changed the title Run focused scenario Run scenarios May 18, 2022
@gasparnagy
Copy link
Member

I have just payed with the https://marketplace.visualstudio.com/items?itemName=robocorp.robotframework-lsp extension for Robot Framework. They integrate with the tests tab of vscode... pretty nice.

image

@sijakret
Copy link

sijakret commented Feb 3, 2023

I was just wondering about a feature like this as well.
It would increase ergonomics quite a bit!

Could be implemented very similarly to how npm scripts are made runnable from the code
image

So when you hover over one of

  • feature
  • scenario
  • tag

It could show a direct way to execute the corresponding test(s).
For instance via a configurable commandline or vscode command.
Is something like this on the roadmap?

@yaffol
Copy link

yaffol commented Feb 28, 2023

This feature would be huge for me. I really want to write my tests as executable specifications, and we are doing that on the backend, but I'm not yet happy with the tooling for the frontend.
I am using VSCode and playwright for most of the frontend e2e tests, and I don't yet find a combination of toolchains that works ergonomically enough to honestly recommend it to other members of the team, so I don't yet adopt BDD on the frontend.

Something really nice about Cypress was the DX of the cy:open Watcher - and the VSCode test explorer is close to that. If this (test explorer integration) were working with the cucumber-vscode extension, I would feel I could hand the integration over to the rest of the team as it gives clear visibility of the tests.

I realise you can always see test output by dropping to the terminal, but there is strong ergonomics behind not having to leave you IDE, especially for frontend development, in my experience.

@Artalus
Copy link

Artalus commented Apr 25, 2024

+1 for a better integration of Feature files with VS Code Test Explorer capabilities. Would love to see the list of scenarios in the side tab, as well as to have a neat Run Test | Debug Test lens-button above the scenario name...

@nextlevelbeard
Copy link

+1 Would also love to see being able to define a custom command in the extension settings
Useful for using Cucumber with other frameworks like webdriverIO

@kieran-ryan
Copy link
Sponsor Member

@Artalus and @nextlevelbeard, appreciate the bump on this - improves insight into the desire for this feature - would be a significant enhancement. @nextlevelbeard if you could also pop a thumbs up (πŸ‘) on the top-level comment that would be great.

We are quite reliant on community contributions at present, which can be a challenge with larger features such as this. Ways to help can include signposting relevant implementation details, linking other extensions matching elements of your desired functionality; or of course, opening a pull request (even if only contains small or partial implementation details) - which can greatly increase the chances of this work being picked up, and that we could support on.

Thanks for your interest and engagement in the project - hope you can continue to raise these points, it is very much valued.

@kieran-ryan kieran-ryan pinned this issue May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚑ enhancement Request for new functionality
Projects
None yet
Development

No branches or pull requests

7 participants