With JUnit 3, if you forget to add a test to the package, it will not run. How can I find all JUnit test cases that are not part of our top-level package, or any collection that it contains recursively?
Using the UCDetector , you should be able to identify unused public classes (which include unused test cases) from Eclipse.
- ant junit (, match * Test.java).
junit * Test.java . , ant manual.
<junit printsummary="yes" haltonfailure="yes"> <classpath> <pathelement location="${build.tests}"/> <pathelement path="${java.class.path}"/> </classpath> <formatter type="plain"/> <batchtest fork="yes" todir="${reports.tests}"> <fileset dir="${src.tests}"> <include name="**/*Test*.java"/> <exclude name="**/AllTests.java"/> </fileset> </batchtest> </junit>
, , , , TestCase ( , clazz = Class.forName(), Test.isAssignableFrom(clazz) .
( - , , , ).
, . , , , , , , .
, JUnit4, .
, ( , JUnit ) - , ( Test), Ant , .
Code coverage that includes your test suite will pick up any test classes that fail
Source: https://habr.com/ru/post/1705337/More articles:Π¨ΠΈΡΠΈΠ½Π° ContextmenuStrip - dynamicHow to access a third-party component using ASP.NET and a JKS certificate? - securityConstructor chain with "this" - c #Using an enumeration as mapkey results in RAW in the database - javaWhere are asp.net dynamic data limits located? - asp.netHow to display exact time for testing performance numbers in C # - performancehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1705339/any-alternatives-to-ironpython-python-for-net-for-accessing-clr-from-python&usg=ALkJrhgbx2c8b-XgpErwWSrWTkQTMk4vKQ301 Redirects against DNS change: is it ever safe to kill 301 redirects and update DNS for a subdomain? - seoWhy doesn't StringComparison.InvariantCultureIgnoreCase work with this db4o linq query? - c #Abstract Factory Pattern and Properties - c #All Articles