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 ability to run a specific test or test file #69

Open
mgartner opened this issue Jun 7, 2017 · 9 comments
Open

Add ability to run a specific test or test file #69

mgartner opened this issue Jun 7, 2017 · 9 comments

Comments

@mgartner
Copy link

mgartner commented Jun 7, 2017

It would be very convenient to be able to add a keyboard shortcut to run a specific test file or even a test from within VS Code, much like vim-test provides for Vim.

@timmhirsens
Copy link
Owner

This was implemented in #52 by @fahrradflucht. Sadly he didn't have the time & resources to fix this for Windows user.

I will try to get around to do that. Otherwise feel free to pick up from the PR and extend it.

@mat-mcloughlin
Copy link
Collaborator

@fr1zle I'm going to take a peak at this one if you haven't moved on with it?

@bcardarella
Copy link

@mat-mcloughlin I was looking into this last week. I think we can get something more comprehensive if we encapsulate all of the possible mix tasks together. Something similar to TaskMaster: https://marketplace.visualstudio.com/items?itemName=ianhoney.task-master

it could get all of the available mix tasks for the project and make them available via a QuickPick menu. There could be additional tasks for running the test suite on a single file or LOC.

@fahrradflucht
Copy link
Contributor

fahrradflucht commented Jul 7, 2017

Like I already mentioned in my PR I think we should instead of proceeding any further with my solution use the tasks API that vscode added in the meantime. My solution just prints the result to the output pane but with a provided task it would be possible to deliver a mix test problem matcher and inject the test errors with links to the failure points into the error pane.

@bcardarella
Copy link

@fahrradflucht I don't agree with using the Tasks API. From what I've seen, the Tasks API is a static list, it cannot be dynamically populated with the mix tasks available to the project.

@bcardarella
Copy link

@fahrradflucht perhaps I'm wrong, in the latest 1.14 release there is mention of "auto-detected tasks" It references TypeScript, Gulp, npm, as candidates for auto-detection. I'm going to research this and see if this fulfills the need to detect all mix tasks. That would be ideal.

@timmhirsens
Copy link
Owner

@mat-mcloughlin sure, go ahead. I was on vacation for the last 10 days so please forgive my unresponsiveness ;-)

@michalmuskala
Copy link

While detecting tasks from mix would be useful, I still think test task should be special-cased. Otherwise it would be hard to provide things that are specific to the test tasks like running just one file or one line.

@michalmuskala
Copy link

This should be useful for writing the code for detecting project tasks: https://github.com/Microsoft/vscode/tree/master/extensions/gulp - it does the same for gulp, so I imagine the difference for mix would be minimal.

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

No branches or pull requests

6 participants