Home » Archives

Content tagged with: mocking

[16 Apr 2012 | One Comment | ]

This video presents Google Code convictions about creating tests for test-unfriendly code and the larger topic of testing. Project Hosting at Google Code is a large, well-established system written mostly in Python. When launched, Project Hosting’s testing consisted of the stock Subversion test suite and a handful of ad hoc smoke test scripts that required starting the entire system and manually inspecting the test’s output.

[14 Mar 2012 | No Comment | ]

Mockito is an open source mock framework for Java that letsyou write beautiful tests with clean and simple API. This video shows how to verify mock objects using Mockito.

[17 Jan 2012 | No Comment | ]

The testing strategy to adopt when you you run your code inside a Java EE container is the topic discussed in this blog post by Antonio Goncalves. To solve this issue, he presents a detailed step by step process to unit test an EJB with Mockito and how to do integration test with and without Arquillian with code samples. His conclusion is that since Java EE 6 it is now easy to use container and services in an embedded mode. Unit testing is good to test business code or code …

[15 Dec 2011 | No Comment | ]

The Unit Testing and Mocking Tools Directory presents a list of unit testing and mocking tools, both open source and commercial, for the main programming languages (Java, .NET, ruby, etc). It contains also a list of resources associated to this topic. Visit http://www.unittestingtools.com/

[27 Oct 2011 | 2 Comments | ]

Dealing with dependencies is the most challenging aspect of test-driven development (TDD). Mocks and stubs are created to isolate the behavior we would like to test. The article “The Art of Mocking” is a good introduction on this topic. Creating all these testing classes by hand can lead to troubles: sometimes developers duplicate these classes and other times the mocks and stubs become more complicated than the code.

[3 Oct 2011 | No Comment | ]

Mockito is an open source mocking framework for Java. In this series of blog posts, Holger Staudacher shares his experiences with Mockito. He defines “effective” as arriving at clean test and production code as fast as possible. The first post of Effective Mockito explains how to setup Mockito in the Eclipse IDE for the daily work. The second post focuses on Mockito’s @Mock Annotation.

[18 Aug 2011 | No Comment | ]

This blog post explains how to use Specflow, Moq and Microsoft Unit Testing framework to implement Behavior Driven Development in a .NET context. The author used AAA (Arrange-Act-Assert) and GWT (Given-When-Then) patterns in his code. They are clearly and easily to understand and become standard when you write unit testing and mocking.

[8 Jun 2011 | No Comment | ]

This blog post presents the results of a survey about the software testing tools used in ruby software development projects.

[24 Mar 2011 | No Comment | ]

In this blog post, Karl Seguin explains why we should stop using mocks to reduce coupling and brittleness in our code.

[18 Jan 2011 | No Comment | ]

Mocking frameworks allow you to stub out behavior to perform tests of individual pieces of functionality. However, there are times when performing certain actions and assert a result is not sufficient. This video drills deep into unit testing and explains the differences between state and interaction–based testing. We will examine the role of stubs versus mocks and how to correctly write unit tests that are not fragile or counter–productive.
Watch this streaming video from the Norwegian Developer Conference 2010