Blog post summary: What test coverage means by John Gluck
In this What QA Wolf means by “test coverage” post, the author John Gluck starts with a simple definition of test coverage, discusses what tests to write and how, and ultimately cautions against using...
View ArticleShift Left
Defining the term shift left to mean testing earlier in the development cycle feels antiquated since waiting until development is “complete” before testing is a plain ol’ anti-pattern at this point. A...
View ArticleBlog post summary: We need to talk about testing
I liked this “We need to talk about testing” post from Dan North. It’s about what testing actually means and how programmers and testers can work together. A summary (or copy & paste of the parts...
View ArticleModern Software Testing
As a follow on from my last post about Martin Fowlers article on Testing Shapes e.g. Pyramid and Trophy), Tim Bray‘s post on modern software testing (or, “Testing in the Twenties” as he titled it)...
View ArticleBlog post summary: Test Shapes by Martin Fowler
In his post, “On the Diverse And Fantastical Shapes of Testing“, Martin Fowler talks about the Test Pyramid and Test Trophy, but concludes that the proportions suggested by each are much less important...
View ArticleRunning an individual unit test with maven
mvn -Dtest=com.your.package.YourTest test Run from within the folder that contains the src (as in src/test/java) folder, which will likely be either be the root of your maven project, or in one of your...
View ArticleUnit Testing – the Hard Parts @ NYC Code Camp
Thanks to everyone who came to my “Unit Testing – the Hard Parts” presentation @ New York Code Camp. I really enjoyed it! Great crowd, lots of follow up questions. And cool Microsoft office space in...
View ArticleTest Doubles: mocks, dummies and stubs
Most classes have collaborators. When unit testing, you usually want to avoid using real implementations of those collaborators to avoid test brittleness and binding/coupling, and instead use Test...
View ArticleTesting private methods in .Net
Feeling the need to test private methods is usually a sign that your code needs refactoring. The recommended approach is that you test your code via it’s public interface. Since your private methods...
View ArticleTesting for expected exceptions in JUnit
Unit tests are used to verify that a piece of code operates as the developer expects it to. Sometimes, that means checking that the code throws expected exceptions too. JUnit is the standard for unit...
View ArticleBuilder Pattern: Good for code, great for tests
I’ve found the builder design pattern occasionally useful in code, but frequently useful in tests. This article is a quick summary of the pattern in general, followed by look at a working example of...
View ArticleSoftware Quality via Unit Testing
The following post is based on a talk I gave at Desert Code Camp 2013. See also the associated slide deck. Software quality is critical to consistently and continually delivering new features to our...
View ArticleSpring MVC Hello World with Continuous Deployment
Oh dear, yet another ‘Hello World!’. But although the functionality is trivial, this little SpringMVC project is complete enough for me to use as a template to bootstrap more complex projects. It...
View ArticleAdd log4j logging for a unit test in IntelliJ
In IntelliJ Click: Run -> Edit Configuration Select your test configuration (or add a new one) In VM parameters, add -Dlog4j.configuration=file:/C:/dev/config/log4j.xml (Or wherever your log4j...
View ArticleEasyMock
EasyMock is an open source library for creating, and defining the behavior of, mock objects as part of your unit tests. This article describes how to use EasyMock (v3.0), including its record/playback...
View ArticleHamcrest Matcher
As a follow up to the Hamcrest post I made yesterday, I wanted to post an example of my own Hamcrest matcher implementation. This matcher tests if a string contains a specified number of substrings. An...
View ArticleSelenium talk at SF JUG
I attended another great San Francisco JUG meeting tonight, this time on How to use Selenium with Maven/Ant to automate testing of web apps. The talk was given by Chris Bedford, from Build Lackey Labs...
View Article