[keycloak-dev] Keycloak - unit tests

Bill Burke bburke at redhat.com
Tue Oct 27 17:17:02 EDT 2015


On 10/27/2015 4:41 PM, Andrzej Goławski wrote:
> Thanks for your response and an interesting article!
>
> @Stan
> Generally I agree with your opinion about Mockacks (people definitely
> tend to overuse them and confuse them with Stubs) though I wouldn't
> "scratch them off menu" completely because of that.
> I find equalization between unit and integration tests rather
> controvertial. E.g. It's hard to imagine TDD with tests demanding full
> context, new condition of system and hitting the database each time.
>
> In my opinion a well done unit test is characterized by the following:
> 1. has only one reason to fail;
> 2. is independent of other tests - so that it may be launched in
> parallel with them;
> 3. last but not least - it's fast - which is critical for TDD!
>

As for point #3 its irrelevant how fast the unit tests are.  We would 
not accept PRs that didn't pass our integration tests.  Our main build 
would run the main integration testsuite.

We're always happy to accept additional tests from the community.  But 
as for the full time dev team, integration tests provide much bigger 
bang for the buck so we'll be focusing on them.

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com


More information about the keycloak-dev mailing list