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

Only some of first results showing in Test Explorer UI #267

Open
PsychoData opened this issue Aug 15, 2024 · 1 comment
Open

Only some of first results showing in Test Explorer UI #267

PsychoData opened this issue Aug 15, 2024 · 1 comment

Comments

@PsychoData
Copy link

I was trying to use some templates, and was having some issues. I sorted that out by hardcoding out with a HashTable for now, but still only part of my test cases are populating results
image

Partial Workaround:
I was able to get this to re-build the list by clearing all of the test results
image
And then reloading the VSCode Window to re-trigger the discovery on the file.

My only idea is that at one point previously I had Stopped it Early while troubleshooting the templates - which is why it only showed 103 tests in the first Screenshot - but then in the full run there were well over 1800 considered
image

Wondering if it might have gotten to 103/103 tests and said "Well, that's it - I'm done!" even though the Pester scan was still running in the background, it just stopped processing the output from it

@PsychoData
Copy link
Author

In fact, I just thought to check the Output > Pester window, and got some confirmation that it is missing the results here are 3 copies of it in the UI
image

So, essentially - my belief is that since I stopped Test Discovery early, it was throwing away all the extra tests it hadn't finished discovering before I stopped early.

To Replicate, as best I can:

  • Load up a file with many tests, or that will take at least a few seconds to finish discovering
    • No Stop button is displayed in the top of the Test UI bar while the discovery is running
  • Run the Tests from that file manually while discovery is still running
    • This changes the bar to show a Stop Button option
  • Press Stop before discovery finishes

Wherever you were during discovery, the TestRun will be cancelled, and it will stop processing more results from after that point.
This is what it looks like in the logs for me
image

The Workaround above does still seem to work, though sometimes I found I had to rename the Tests.ps1 file to something else, then reload, then rename back again - or it would still keep displaying the partial list after a Clear Test Results and a Reload Window

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

No branches or pull requests

1 participant