---
title: 'JUnit 4.8 freigegeben'
url: 'https://tutego.de/blog/javainsel/2009/12/junit-4-8-freigegeben'
markdown: 'https://tutego.de/blog/javainsel/2009/12/junit-4-8-freigegeben.md'
date: '2009-12-02'
description: 'Die Infos gibt es unter http://kentbeck.github.com/junit/doc/ReleaseNotes4.8.html. Die Änderungen 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 catego…'
taxonomy:
  category:
    - 'Open Source'
---

# JUnit 4.8 freigegeben

![Illustration einer tropischen Insel mit Palmen und einem hohen Berg](https://tutego.de/blog/javainsel/user/themes/tutego/images/insel-cover.jpg)# Java Blog für Programmierer

[Java Blog für Programmierer](https://tutego.de/blog/javainsel/)

## JUnit 4.8 freigegeben

02.12.2009 · [Christian Ullenboom](https://tutego.de/blog/javainsel/author/admin/)

Die Infos gibt es unter [http://kentbeck.github.com/junit/doc/ReleaseNotes4.8.html](http://kentbeck.github.com/junit/doc/ReleaseNotes4.8.html "http://kentbeck.github.com/junit/doc/ReleaseNotes4.8.html"). Die Änderungen 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 or interfaces can be used as categories. Subtyping works, so if you say `@IncludeCategory(SuperClass.class)`, a test marked `@Category({SubClass.class})` will be run.
> 
> You can also exclude categories by using the `@ExcludeCategory` annotation
> 
> Example:
> 
> ```java
> ```java
> public interface FastTests { /* category marker */ }public interface SlowTests { /* category marker */ }public static class A {    @Test    public void a() {        fail();    }    @Category(SlowTests.class)    @Test    public void b() {    }}@Category({SlowTests.class, FastTests.class})public static class B {    @Test    public void c() {    }}@RunWith(Categories.class)@IncludeCategory(SlowTests.class)@SuiteClasses( { A.class, B.class }) // Note that Categories is a kind of Suitepublic static class SlowTestSuite {  // Will run A.b and B.c, but not A.a}@RunWith(Categories.class)@IncludeCategory(SlowTests.class)@ExcludeCategory(FastTests.class)@SuiteClasses( { A.class, B.class }) // Note that Categories is a kind of Suitepublic static class SlowTestSuite {  // Will run A.b, but not A.a or B.c}
> ```
> 
> ```
> 
> 
> ##### Bug fixes
> 
> - github#16: thread safety of Result counting
> ```

Kategorien: [Open Source](https://tutego.de/blog/javainsel/category/open-source/)

[← Alle Beiträge](https://tutego.de/blog/javainsel/)

---

## Navigation

- Next: [Neu: Release 5.0](https://tutego.de/blog/javainsel/2009/12/neu-release-5-0.md)
