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 UI] Support Update #139224

Open
JustinGrote opened this issue Dec 15, 2021 · 0 comments
Open

[Test UI] Support Update #139224

JustinGrote opened this issue Dec 15, 2021 · 0 comments
Assignees
Labels
feature-request Request for new features or functionality testing Built-in testing support
Milestone

Comments

@JustinGrote
Copy link
Contributor

@connor4312

Issue Description

With a tool like Pester, there are "BeforeAll" and "AfterAll" statements that run before a test suite. I suppose these are known as fixtures in some other tools.

If one of these fails when running a test, I want to report the status at the suite level (e.g. "Describe") in the tree. However, if someone click run on the individual test, the RunRequest doesn't allow updating the parent suite because it's not in the test list.

If I try to create a new testrunrequest that includes the parents, I end up with a duplicate run and it still doesn't report correctly (I can't peek the error). Example:

		const include = request.include ?? getTestItems(this.testController.items)

		// add the parent test suites of the included tests so that their status can be updated. This is needed for BeforeAll/AfterAll test updates
		const includeWithParents = include.flatMap(getParents).concat(include)

		const RequestWithParents = new TestRunRequest(
			includeWithParents,
			request.exclude,
			request.profile
		)

		const run = this.testController.createTestRun(RequestWithParents)

image

Implementation

I recommend either adding a switch to createRunProfile to include the parents of invoked tests in the runRequest, or make it so that you can createTestRun with a new TestRunRequest.

@connor4312 connor4312 added feature-request Request for new features or functionality testing Built-in testing support labels Dec 15, 2021
@connor4312 connor4312 added this to the Backlog milestone Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality testing Built-in testing support
Projects
None yet
Development

No branches or pull requests

2 participants