-
Notifications
You must be signed in to change notification settings - Fork 54
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
Allow test suites to report errors like tests #130
Comments
For that I'm creating a dummy TestInfo. It works just fine for me, but if there will be a nicer solution I would like to know about it. subscribed. |
I'm thinking about adding an |
How about the message property as well? Then if the suite is errored, we can display a stack trace or other lengthy message. |
Currently, Test Explorer only keeps logs for tests but not for suites (and that's where the value of the |
If we are going toward on this route we might should consider deprecating the |
If adding the message field will make this task significantly more difficult, you could split the task in two. I like the message field because if you have something large to display, like a stacktrace, then the tooltip is the only thing that would be reasonable to use. And then you can't copy and paste any of the text to Google and because the font is small, its hard to read.
I like them separate for a few reasons. Firstly, I think that it provides a nice symmetry:
Secondly, they may have the same properties today, but if there was a reason to diverge in the future, it might become messy. |
The 2 are getting more similar, but there's still some differences: Tests don't have children and suites generally don't have a state (the
What you describe is a good workaround, but there shouldn't be a need for adapter authors to come up with workarounds. And since the ability to mark a suite as "errored" keeps coming up, I guess it's time to support it.
Absolutely, in fact the main reason why I keep a separate log for each test is that I hate having to scroll through endless messy logs to find the error message I'm interested in. So I'd only show the errors from the suite in the suite's log, but not all the errors from the tests in the suite. |
Yes, I thought about it and I see no problem with test having children and suite having state. On the other hand suite having "special" flag sounds meh. :) First but should be last: Either both could be decorated with the other's properties as optional (for backward compatibility) or a new api version should be released. Let's call the "merged" interface as MergedInfo and MergedEvent. It is easier to talk about it. Let's imagine what would we get and how could we handle the merge of the two types.
This solution is a generalization of TestSuiteInfo and TestInfo.
Same for MergedEvent... Shouldn't we looking for "general" solutions instead of "special" and "custom" one? Well I think you see my point already. |
Sorry, I did not mean that doing nothing is the way. It would be amazing if tests and suites can be conveniently marked as However, I believe that suites should not be in |
I have just published the new API and Test Explorer, you can now set both tests and states as errored when loading or running. |
Currently addressing an issue with the Jest extension that I've been working on. Sometimes there are issues parsing the test files - so I know what suites and tests are present. I'd like to be able to show errors for suites as well as tests so I can advise the user of what went wrong.
The *Info types are as follows:
In both cases I can display the label, description and tooltip for both suites and tests. So there is no way to indicate that there is a problem to the user (apart from using
TestLoadFinishedEvent.errorMessage
). It would be cool to have some way to show tests and suites that have issues at this stage.The *Event types are as follows:
Here I can display the label, description and tooltips as before for both. However I can for tests, display a message and indicate an error state. It would be cool if we could show error state and a message for suites as well.
I realise that there might be issues with making suites errored when there are passing tests within them as well as many other issues. Feel free to discuss, or point me to previous discussion or advise me on alternatives to solve my original problem. I'm not sure if I can convert a suite to a test and vice versa as errors come and go...
The text was updated successfully, but these errors were encountered: