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

Test Explorer #99838

Closed
Kradirhamik opened this issue Jun 11, 2020 · 6 comments
Closed

Test Explorer #99838

Kradirhamik opened this issue Jun 11, 2020 · 6 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@Kradirhamik
Copy link

VS Code should have an official extension for a test explorer, that supports Jest, Jest-Cucumber and automation tests of PlayWright out of the box.

@gjsjohnmurray
Copy link
Contributor

I disagree. Doing that would add bloat for people who don't need it.

@axetroy
Copy link
Contributor

axetroy commented Jun 11, 2020

I agree. But not for a specific testing framework

It is abstracted into a general purpose, similar to view

Such different test framework extensions can create test legends

interface TestCase {
  label: string
  location: {
    file: Uri
    start: number
    end: number
  }
}

export async function activate(
  context: vscode.ExtensionContext
): Promise<void> {
	vscode.test.add({
      label: 'testxxx',
      location: {xxxxx}
    })

    // defined how to run this test case
    vscode.test.registry(function (test: TestCase) {
	  
    })

    // defined how to run all test case
    vscode.test.registryRunAll(function (test: TestCase) {
	  // defined how to run this test case
    })
}

Then add a test case in the sidebar

Each test case added by the extension has a different tree view in sidebar

@Kradirhamik
Copy link
Author

I disagree. Doing that would add bloat for people who don't need it.

The idea is not to have it in VS Code by default, but rather just having such extension exist for people who need it - so there would be not bloating

@Kradirhamik
Copy link
Author

I agree. But not for a specific testing framework

It is abstracted into a general purpose, similar to view

Such different test framework extensions can create test legends

interface TestCase {
  label: string
  location: {
    file: Uri
    start: number
    end: number
  }
}

export async function activate(
  context: vscode.ExtensionContext
): Promise<void> {
	vscode.test.add({
      label: 'testxxx',
      location: {xxxxx}
    })

    // defined how to run this test case
    vscode.test.registry(function (test: TestCase) {
	  
    })

    // defined how to run all test case
    vscode.test.registryRunAll(function (test: TestCase) {
	  // defined how to run this test case
    })
}

Then add a test case in the sidebar

Each test case added by the extension has a different tree view in sidebar

Yes, I just meant to give an example. It should support popular test automation frameworks out of the box ideally.

@gjsjohnmurray
Copy link
Contributor

gjsjohnmurray commented Jun 12, 2020

The idea is not to have it in VS Code by default, but rather just having such extension exist for people who need it - so there would be not bloating

Then I'm not clear why you asked for an official one.

This one seems popular and well rated.

https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-test-explorer

But it seems you already tried it and had a problem - hbenl/vscode-test-explorer#108

Maybe try this Test Adapter extension, which seems to be actively developed, and allows issues to be raised:

https://marketplace.visualstudio.com/items?itemName=kavod-io.vscode-jest-test-adapter

@egamma
Copy link
Member

egamma commented Jun 17, 2020

/duplicate #9505

@egamma egamma closed this as completed Jun 17, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Aug 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

5 participants
@egamma @Kradirhamik @gjsjohnmurray @axetroy and others