Home » Tag Archives: Testing (page 5)

Tag Archives: Testing

Property-based testing with Spock

groovy-logo

Property based testing is an alternative approach to testing, complementing example based testing. The latter is what we’ve been doing all our lives: exercising production code against “examples” – inputs we think are representative. Picking these examples is an art on its own: “ordinary” inputs, edge cases, malformed inputs, etc. But why are we limiting ourselves to just few examples? ...

Read More »

Load-Testing Guidelines

software-development-2-logo

Load-testing is not trivial. It’s often not just about downloading JMeter or Gatling, recording some scenarios and then running them. Well, it might be just that, but you are lucky if it is. And what may sound like “Captain Obvious speaking”, it’s good to be reminded of some things that can potentially waste time. So, when you run the tests, ...

Read More »

Some more unit test tips

junit-logo

In my previous post I showed some tips on unit testing JavaBeans. In this blog entry I will give two more tips on unit testing some fairly common Java code, namely utility classes and Log4J logging statements. Testing Utility classes If your utility classes follow the same basic design as the ones I tend to write, they consist of a ...

Read More »

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 »
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