Quantcast
Channel: security news – Cyber Parse – Cyber Security and Information Security
Viewing all articles
Browse latest Browse all 4495

What’s new in JUnit 5 for Java testing

$
0
0
The JUnit testing framework for Java has just moved to version 5. Unlike previous releases, JUnit 5 features modules from several subprojects, including:Platform, for launching testing frameworks on the JVM and defining the TestEngine API via a command line. Jupiter, for programming and extension models for writing tests and extensions and then (via plugins) building them within JUnit, Gradle, or Maven. Vintage, for running JUnit 3 and 4 tests on the JUnit 5 platform. [ Keep track of whatrsquo;s changed in Java 9 in InfoWorldrsquo;s live changelog, “Whatrsquo;s new in Java 9.” | Keep up with hot topics in programming with InfoWorldrsquo;s App Dev Report newsletter. ]In Jupiter, a developer can use annotations as meta-annotations, in which you define an annotation that automatically inherits the semantics of meta-annotationsmdash;a new programming model in JUnit.

Also, Jupiter lets test constructors and methods to have parameters, allowing for more flexibility and enabling dependency injection for constructors and methods.To read this article in full or to leave a comment, please click here

Viewing all articles
Browse latest Browse all 4495

Trending Articles