JUnit 4.6 ist raus
Seit längerem gibt es mal wieder in Update in JUnit. Das Projekt ist relativ fehlerfrei und daher ist das neue Release kein Bug-Fix-Release, sondern JUnit 4.6 integriert einige interessante Neuigkeiten.
MaxCore:
JUnit now includes a new experimental Core, `MaxCore`. `MaxCore`remembers the results of previous test runs in order to run newtests out of order. `MaxCore` prefers new tests to old tests, fasttests to slow tests, and recently failing tests to tests that lastfailed long ago. There's currently not a standard UI for running`MaxCore` included in JUnit, but there is a UI included in the JUnitMax Eclipse plug-in.
Scheduling-Strategien für parallele Abarbeitung von Tests:
`JUnitCore` now includes an experimental method that allows you tospecify a model of the `Computer` that runs your tests. Currently,the only built-in Computers are the default, serial runner, and tworunners provided in the `ParallelRunner` class:`ParallelRunner.classes()`, which runs classes in parallel, and`ParallelRunner.methods()`, which runs classes and methods in parallel.This feature is currently less stable than MaxCore, and may bemerged with MaxCore in some way in the future.
Dann lassen sich Arrays mit Fließkommazahlen auch mit einem Delta vergleichen:
assertArrayEquals(new double[] {1.0, 2.0}, new double[] {1.0, 2.0}, 0.01);
Das tutego-JUnit-Seminar berücksichtigt diese Änderungen.