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

Add support for ScalaTest AnyFeatureSpec #398

Open
collers opened this issue Sep 5, 2024 · 1 comment
Open

Add support for ScalaTest AnyFeatureSpec #398

collers opened this issue Sep 5, 2024 · 1 comment

Comments

@collers
Copy link

collers commented Sep 5, 2024

Is your feature request related to a problem? Please describe.

The ScalaTest pages suggest using "FeatureSpec style for acceptance testing". We are migrating to using Metals but this is the one testing style not supported by the ScalaTest integration. Whole Spec's can be run/debugged but there is no breakdown of Scenario's.

Describe the solution you'd like

Support for AnyFeatureSpec in the ScalaTest integration. This would list specific Scenarios in the TESTING tab and allow a specific Scenario to be run/debugged. Understand that this might be because Scenarios are/can be held in Features so aren't necessarily a flat list. IntelliJ plugin resolves this by flattening them so each Scenario name is prefixed with it's Feature name.

Describe alternatives you've considered

Currently using a script which runs the test using sub-text filtering. e.g.
mvn test -Dsuites="some.package.MySpec filter-sub-text"
but this doesn't support debugging.

Additional context

No response

Search terms

scalatest FeatureSpec AnyFeatureSpec

@tgodzik
Copy link
Contributor

tgodzik commented Sep 5, 2024

Thanks for reporting! If anyone wants to take a look the code responsible is here:

https://github.com/scalameta/metals/blob/main/metals/src/main/scala/scala/meta/internal/metals/testProvider/frameworks/ScalatestTestFinder.scala

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants