alexkrechik / VSCucumberAutoComplete

Cucumber (Gherkin) Full Support Extension for VSCode
https://marketplace.visualstudio.com/items?itemName=alexkrechik.cucumberautocomplete
MIT License
331 stars 80 forks source link

Feature: Introduce Code Lens for Run Test to appear above Scenario/Scenario Outline/Feature in a feature file #376

Open baksale opened 3 years ago

baksale commented 3 years ago

Feature This is a feature: need to run a particular scenario from within VSCode itself.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'src/test/resources/test.feature file with a Scenario'
  2. Click on 'Run Test|Debug Test button above Scenario'

Expected behavior It will find(or use pre-configured) Runner for the feature file and pass src/test/resources/test.feature:5 into CucumberOptions(features = "src/test/resources/test.feature:5")

pmthexton commented 2 years ago

@baksale I'm currently using a self-written extension to do exactly this and I would love to see this extension render my home-brew implementation obsolete!

I've not published my extension to the marketplace as I don't feel it's sufficiently generic for all the different Cucumber runtime environments out there (the project I use it in uses cucumber-ruby, without bundler or rails), but if anybody's interested I'd be happy to share the code.

pmthexton commented 2 years ago

@baksale I've uploaded a refactored version of what I've been using to https://github.com/pmthexton/VSCodeCucumberRunner

I have not published this to the vscode marketplace, I'm still umm'ing and aah'ing about whether I want to do that. But you can download a vsix to install manually from the 0.0.1 release tag. Hopefully it would be useful to you if you're still looking for a solution to this.

@alexkrechik the implementation of this is pretty simple so it would be really nice if your extension provided this functionality, making my own one redundant.