Java – pass some JUnit tests

Is there a simple way to tell JUnit that you only need to pass a certain percentage or a certain number of tests? I mainly look for something at the method level, but the class level is also good

I understand that this is unconventional for unit testing, but I am mainly engaged in machine learning. I don't want to pass every test

Solution

I suggest writing a custom @ rule You can start with the errorcollector implementation and modify it to not report errors at a specific percentage

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>