Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Before(Test)] hooks don't report useful errors in VS (Code) or Rider #3374

Copy link
Copy link

Description

@JohnGalt1717
Issue body actions

Is there a way to get more than this:

BeforeTest hook failed
at TUnit.Engine.Services.HookExecutor.ExecuteBeforeTestHooksAsync(AbstractExecutableTest test, CancellationToken cancellationToken)
at TUnit.Engine.TestExecutor.ExecuteAsync(AbstractExecutableTest executableTest, CancellationToken cancellationToken)
at TUnit.Engine.TestExecutor.ExecuteAsync(AbstractExecutableTest executableTest, CancellationToken cancellationToken)
at TUnit.Engine.TestExecutor.ExecuteAsync(AbstractExecutableTest executableTest, CancellationToken cancellationToken)
at TUnit.Engine.Services.TestExecution.TestCoordinator.<>c__DisplayClass10_0.<<ExecuteTestInternalAsync>b__0>d.MoveNext()
at TUnit.Engine.Services.TestExecution.TestCoordinator.<>c__DisplayClass10_0.<<ExecuteTestInternalAsync>b__0>d.MoveNext()
at TUnit.Engine.Services.TestExecution.RetryHelper.ExecuteWithRetry(TestContext testContext, Func`1 action)
at TUnit.Engine.Services.TestExecution.RetryHelper.ExecuteWithRetry(TestContext testContext, Func`1 action)
at TUnit.Engine.Services.TestExecution.TestCoordinator.ExecuteTestInternalAsync(AbstractExecutableTest test, CancellationToken cancellationToken)

Obviously just calling the method at the start of every test works in this case but [Before(class)] has the same issue and that's less straight forward.

It would be nice if the errors actually directly reported like they do in the tests themselves.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.