❗❗❗ With the release of JUnit 5, the JUnit Lambda became obsolete and so did this repo - see my JUnit 5 demo project instead.
On November 18th 2015, the JUnit Lambda ptoject presented their first prototype. I'm using this project to get to know the features and to demonstrate them.
📣 For the demonstration have a look at the test classes. 📣
Because the prototype is still changing a lot, this project depends on a specific build at any point in time.
This build number is hardocded in the pom.xml
.
Current Version: 9️⃣5️⃣
The prototype is only available in Sonatype's snapshots repository and by default Maven will not access it.
Adding the following profile to your settings.xml
will allow you to instruct Maven to do just that:
<profile>
<id>snapshots</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
This project should then compile with mvn -P snapshots compile
.
The prototype must be executed with a bare-bones console runner and it is straight-forward to have Maven do that. This way the surefire plugin is not used but that's no problem. The runner will print a lot of colorful messages to the console.
The tests can simply be run with mvn -P snapshots test
.
A list of things you could read if you're interested in the topic:
- first and foremost, there is of course the official documentation
- there will be a JUnit tag on my blog collecting my posts about this
Note that JUnit Lambda is actively developed and very much a moving target. Anything presented here must be carefully reexamined before basing any opinions or even decisions on it.