Test view information is not accurate
已回答
I have a set of test cases to run, but running the results view makes me confused.
The test results show 1failed, 9 passed, 1 ignored.
But my test case collection does not have a test marked as ignore, and I determined that the test case testCreateUser failed, but it appears to be ignored.
At the same time, the test case marked as failed is not seen in the view on the left.
BTW, I am using junit.
请先登录再写评论。
What testCreateUser shows? Is it ignored or stopped?
What IntelliJ IDEA shows in case you choose to hide "completed" and "ignored" tests:
@Konstantin Annikov
testCreateUser is ignored, not failed. That makes me confused.
And, I don't know if you noticed that I have only 10 test cases, but the final test results: 1 failed, 9 passed, 1 ignored, with 11 results. It seems that the failed test case and the ignored test case are the same one?
Untick "competed" and "ignored" buttons (as it is shown on my previous screenshot). What remains?
@ Konstantin Annikov
nothing left...
Do you see anything in Run console? Results of the failed test should exist there:
@ Konstantin Annikov
All blank. Nothing there.
Please try to update IntelliJ IDEA to 2019.2.1 and in case it does not help, please share a test example where the issue could be reproduced.
@ Konstantin Annikov I am using 2019.2.1. This is the simplest code to reproduce this problem:
The problem should be an exception thrown by the parent class's @BeforClass, causing the subclass's test case to be ignored, but the view does not display the relevant information.
Hello,
I have modified before() function by adding division by zero, so it fails:
And run test1 and test2. In both cases, tests were skipped due to the error in before() function. And that is being displayed correctly (1 test failed and one skipped in both cases). See the gif as a reference:
https://gifyu.com/image/hnf7
Maybe you can share an entire project with the reproduced issue? You can upload it to https://uploads.services.jetbrains.com/
@ Konstantin Annikov
It should be that I did not say complete, here is the complete scene restoration.
https://gifyu.com/image/hnYb
Need to run the entire test package to restore this problem.
Hello,
Thank you for all the details provided. I have created a bug based on your case:
https://youtrack.jetbrains.com/issue/IDEA-221588
Feel free to watch it in order to be notified once it has updates. See this article if you are not familiar with YouTrack.