How do I get more details about failed test assertions on the shell?

You can fine tune the test task output via the testLogging block.

I normally use:

test {
	testLogging {
		events "failed"
		exceptionFormat "full"
	}
}