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

Log test starting #2583

Open
3 tasks done
davidmatson opened this issue Dec 6, 2024 · 2 comments
Open
3 tasks done

Log test starting #2583

davidmatson opened this issue Dec 6, 2024 · 2 comments
Labels

Comments

@davidmatson
Copy link

Checklist

Summary of the feature request

I'd like to be able to see when a test starts, so that if it hangs or crashes, I can know what test is the problem.

How should it work?

Perhaps only shown in higher-verbosity output modes, such as Diagnostic. something like a "[>] name" output line could work, such as:

Running tests from 'C:\My.Tests.ps1'
Describing some describe string
  [>] sleeps before passing
  [+] sleeps before passing 1.03s (1.02s|6ms)

for this test:

Describe "some describe string" {
It "sleeps before passing" {
Sleep 1
"a" | Should -Be "a"
}
}
@nohwnd
Copy link
Member

nohwnd commented Dec 12, 2024

we could use ansi to rewrite the line. so we show when the test started and then when it finished. It would be harder in CI where the test start would most often be kept on screen and probably pollute the execution.

Interesting feature but I would like to see this thought out for the CI and see if there are some other better ways to do this, we had feature like this before where we used the progress reporter to show the test that is running right now.

My ideal situation would be if we could show progress bar only for tests that take 1s or more, to avoid overwhelming the user with ton of changes on tests that are short.

@fflaten
Copy link
Collaborator

fflaten commented Dec 13, 2024

Also related to #2021 so you could add or replace with custom output.

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

No branches or pull requests

3 participants