mahmuts / lab-junitlambda

Toying around with the JUnit Lambda Prototype

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lab: JUnit-Lambda

Toying around with the JUnit Lambda Prototype


On November 18th JUnit Lambda 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. 📣

Version

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️⃣

Compiling & Running

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.

Further Reading

A list of things you could read if you're interested in the topic:

Caveat Lector

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.

About

Toying around with the JUnit Lambda Prototype

License:Creative Commons Zero v1.0 Universal


Languages

Language:Java 100.0%