Skip to content

Hook up existing Tests model data to the Test Explorer view #4274

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

Closed
d3r3kk opened this issue Feb 5, 2019 · 1 comment
Closed

Hook up existing Tests model data to the Test Explorer view #4274

d3r3kk opened this issue Feb 5, 2019 · 1 comment
Assignees
Labels
area-testing feature-request Request for new features or functionality

Comments

@d3r3kk
Copy link

d3r3kk commented Feb 5, 2019

Hook up existing test model data via the Tests data structure.

Implement the API from the prior task using actual tests data. Update the tree view to contain actual test model data, which can be pulled from the ITestCollectionStorageService`.

On the 'Discover Tests', 'Run Tests', or 'Run Specific Unit Test' command, update the Test TreeView and it's underlying data model.

NOTE: Icons for the test view items are specified by a URI. For the initial release, let's try and used whatever icons may be available from VS Code itself (find SVG files in the sources and make use of them).

NOTE: The Tests data structure might still have to be extended, or wrapped, or converted, to support all of the features we have in mind.

NOTE: I've added a task below where we augment direct integration with each of these user-issued commands, and have this just be in response to an update to the ITestCollectionStorageService - this is how it seems to work
today.

Update the current API used by the status bar - move to a publisher-subscriber model instead (we are currently tightly coupled). Don has a solution for this in mind that it quite trivial to implement, (similar to how we subscribe to changes in configSettings.ts).

This exists today in the file src/client/unittests/main.ts

There is already code today that displays results in the status bar. Use the exact API that it works with today.

  • After tests have run
  • After test discovery has run

Test for completion:

  • Visual representation of data should be visible in the tree model view in a workspace at the time the workspace is loaded
  • Issuing the command pallette command(s) and observing when:
    • A test file is added/removed/renamed
    • A test suite is added/removed/renamed
    • A test function is added/removed/renamed
    • A test function was successful but has started to failed
    • A test function was failing but has started to succeed
    • A test function was skipped but is now being run successfully
    • A test function was skipped but is now being run unsuccessfully
    • A test function was running but is now being skipped
    • All the above state changes for functions, applied to suites (can Python suites be skipped?)
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Feb 5, 2019
@d3r3kk d3r3kk added area-testing needs PR feature-request Request for new features or functionality and removed triage-needed Needs assignment to the proper sub-team labels Feb 5, 2019
@d3r3kk d3r3kk added this to the 2019, week 5 - Jan Sprint 3 milestone Feb 5, 2019
@d3r3kk d3r3kk self-assigned this Feb 6, 2019
@d3r3kk
Copy link
Author

d3r3kk commented Feb 6, 2019

Turns out this is trivial to implement alongside #4273, will take this on as well. (The exploratory work is now complete, I need to handle some edge cases and create tests).

d3r3kk added a commit that referenced this issue Feb 7, 2019
* Add workspace test discovery data to the Python Test tree view.

For #4273 & #4274

- Make Python Test View Provider injectable (testable)
- Maps `Tests` object to TreeViewItem hierarchy
- Adds a Event (subscription) model to the TestStorageService

Initial PR, more to follow...
@ghost ghost removed the needs PR label Feb 13, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants