Tag: testing

Jasmine test on AngularJS promise-returning function keeps on timing out

Being the test-driven developer that you are, you are writing a Jasmine test for your AngularJS factory function, which returns a promise generated by our beloved $q. You know how to test an asynchronous response with Jasmine. You confidently run the test and... bam, you get an error message "Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL"

Read more

Better developers’ collaboration through automated specifications

It's an accepted trend nowadays: according to many TDD and BDD are useful tools with many advantages, and to others they are not. In this post I will not start that old debate again. I will however expose to you one great, possibly overlooked advantage in having extensive test/behavior/specifications coverage: a better team collaboration.

Read more

Validating Spring REST controllers’ beans using the Bean Validation API… and writing the tests for it!

So you want to validate the data sent to your application's REST services? Nowadays you can quite easily do that using Spring and the Bean Validation API. And to help you test that validation process, how about bringing in Spring Boot to programmatically start your application and run your tests against it?

Read more