{"id":436,"date":"2009-12-02T18:53:00","date_gmt":"2009-12-02T18:53:00","guid":{"rendered":"http:\/\/www.tutego.de\/blog\/javainsel\/?p=436"},"modified":"2009-12-02T18:53:00","modified_gmt":"2009-12-02T18:53:00","slug":"junit-4-8-freigegeben","status":"publish","type":"post","link":"https:\/\/www.tutego.de\/blog\/javainsel\/2009\/12\/junit-4-8-freigegeben\/","title":{"rendered":"JUnit 4.8 freigegeben"},"content":{"rendered":"<p>Die Infos gibt es unter <a title=\"http:\/\/kentbeck.github.com\/junit\/doc\/ReleaseNotes4.8.html\" href=\"http:\/\/kentbeck.github.com\/junit\/doc\/ReleaseNotes4.8.html\">http:\/\/kentbeck.github.com\/junit\/doc\/ReleaseNotes4.8.html<\/a>. Die \u00c4nderungen halten sich in Grenzen:<\/p>\n<blockquote>\n<h4>Summary of Changes in version 4.8<\/h4>\n<h5>Categories<\/h5>\n<p>From a given set of test classes, the <code>Categories<\/code> runner runs only the classes and methods that are annotated with either the category given with the <code>@IncludeCategory<\/code> annotation, or a subtype of that category. Either classes or interfaces can be used as categories. Subtyping works, so if you say <code>@IncludeCategory(SuperClass.class)<\/code>, a test marked <code>@Category({SubClass.class})<\/code> will be run. <\/p>\n<p>You can also exclude categories by using the <code>@ExcludeCategory<\/code> annotation <\/p>\n<p>Example:<\/p>\n<pre><code>public interface FastTests { \/* category marker *\/ }<br \/>public interface SlowTests { \/* category marker *\/ }<br \/><br \/>public static class A {<br \/>    @Test<br \/>    public void a() {<br \/>        fail();<br \/>    }<br \/><br \/>    @Category(SlowTests.class)<br \/>    @Test<br \/>    public void b() {<br \/>    }<br \/>}<br \/><br \/>@Category({SlowTests.class, FastTests.class})<br \/>public static class B {<br \/>    @Test<br \/>    public void c() {<br \/><br \/>    }<br \/>}<br \/><br \/>@RunWith(Categories.class)<br \/>@IncludeCategory(SlowTests.class)<br \/>@SuiteClasses( { A.class, B.class }) \/\/ Note that Categories is a kind of Suite<br \/>public static class SlowTestSuite {<br \/>  \/\/ Will run A.b and B.c, but not A.a<br \/>}<br \/><br \/>@RunWith(Categories.class)<br \/>@IncludeCategory(SlowTests.class)<br \/>@ExcludeCategory(FastTests.class)<br \/>@SuiteClasses( { A.class, B.class }) \/\/ Note that Categories is a kind of Suite<br \/>public static class SlowTestSuite {<br \/>  \/\/ Will run A.b, but not A.a or B.c<br \/>}<br \/><\/code><\/pre>\n<p><\/p>\n<h5>Bug fixes<\/h5>\n<p><\/p>\n<ul><\/p>\n<li>github#16: thread safety of Result counting <\/li>\n<\/ul>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Die Infos gibt es unter http:\/\/kentbeck.github.com\/junit\/doc\/ReleaseNotes4.8.html. Die \u00c4nderungen halten sich in Grenzen: Summary of Changes in version 4.8 Categories From a given set of test classes, the Categories runner runs only the classes and methods that are annotated with either the category given with the @IncludeCategory annotation, or a subtype of that category. Either classes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[4],"tags":[],"class_list":["post-436","post","type-post","status-publish","format-standard","hentry","category-open-source"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/436","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/comments?post=436"}],"version-history":[{"count":0,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/posts\/436\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/media?parent=436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/categories?post=436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tutego.de\/blog\/javainsel\/wp-json\/wp\/v2\/tags?post=436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}