Home » Tag Archives: Testing (page 6)

Tag Archives: Testing

Mockito 101

mockito-logo

Mockito is a mocking framework that lets you write beatiful tests with clean and simple API. It biases toward minimal specifications, makes different behaviors look different, and displays clear error messages. Creating Mocks To create a mock using Mockito, simply annotate mocks with @Mock and call MockitoAnnotations.initMocks(this).       import org.mockito.Mock; import org.mockito.MockitoAnnotations; public class FooClassTest { @Mock mockFoo; ...

Read More »

Unit Testing – Why not?

software-development-2-logo

For JUnit implementation in our project, we see a great challenge in having them implemented as we are already running behind for Sprint 2 and Sprint 3. Team was provided with all the knowledge walkthrough of the JUnit implementation and example test case. I do not see the team would be able to meet the JUnit coverage as expected. We ...

Read More »

jUnit: Rules

junit-logo

Rules add special handling around tests, test cases or test suites. They can do additional validations common for all tests in the class, concurrently run multiple test instances, set up resources before each test or test case and tear them down afterwards. The rule gets complete control over what will done with the test method, test case or test suite ...

Read More »

JUnit in a Nutshell: Test Isolation

junit-logo

Working as a consultant I still meet quite often programmers, who have at most a vague understanding of JUnit and its proper usage. This gave me the idea to write a multi-part tutorial to explain the essentials from my point of view. Despite the existence of some good books and articles about testing with the tool, maybe the hands-on approach ...

Read More »

Writing Tests for Data Access Code – Data Matters

software-development-2-logo

When we write tests for our data access code, we use datasets for two different purposes:                   We initialize our database into a known state before our data access tests are run. We verify that the correct changes are found from the database. These seem like easy tasks. However, it is very ...

Read More »

Why Testers Are Losing The ISO 29119 Battle

software-development-2-logo

The ISO 29119 is making waves in the testing communities, regarding its content and necessity. Its focus on test planning and documentation gets modern testers to ask why. I’ve worked in an ISO certified company, so maybe I can shed light from my past experience.           ISO standards are written by committees, which are made of ...

Read More »

Unit Testing – Cost vs. Benefit

software-development-2-logo

I have been a big fan of unit testing for a very long time; my blog is ridden with posts about it. If I look at how automated unit testing has progressed in my projects over the last decade I am noticing that the inclination to do unit testing is just not there. Recently, I came across this Podcast series between Martin Fowler, Kent ...

Read More »

Test Attribute #10 – Isolation

software-development-2-logo

This is last, final, and 10th entry in the ten commandments of test attributes that started here. And you should read all of them. We usually talk about isolation in terms of mocking. Meaning, when we want to test our code, and the code has dependencies, we use mocking to fake those dependencies, and allow us to test the code ...

Read More »

JUnit in a Nutshell: Hello World

junit-logo

JUnit seems to be the most popular testing tool for developers within the Java world. So it is no wonder that there have been written some good books about this topic. But by earning a living as consultant I still meet quite often programmers, who at most have a vague understanding of the tool and its proper usage. Hence I ...

Read More »

Understanding JUnit’s Runner architecture

junit-logo

Some weeks ago I started creating a small JUnit Runner (Oleaster) that allows you to use the Jasmine way of writing unit tests in JUnit. I learned that creating custom JUnit Runners is actually quite simple. In this post I want to show you how JUnit Runners work internally and how you can use custom Runners to modify the test ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close