Home » Tag Archives: Testing

Tag Archives: Testing

@ParameterizedTest with null values in @CvsSource

Writing parameterized tests in JUnit 4 was pretty cumbersome. JUnit 5 introduced several useful improvements to the framework and running the same test with different arguments is much simpler than in the previous version. However, there is one small issue with passing null values in such arguments. In this post, I’m going to show you how to pass null in ...

Read More »

Blow up Your JUnit5 Tests with Permutations

Writing JUnit tests can be a tedious and boring process. Learn how you can improve your tests classes using permutations in combination with TestFactory methods and DynamicTest objects with a minimum of coding effort. In this article, I will use the Java stream ORM Speedment because it includes a ready-madePermutation class and thereby helps me save development time. Speedment otherwise allows database tables ...

Read More »

Testing Kotlin with Spock Part 3 – Interface default method

Kotlin allows you to put method implementation in an interface. The same mechanism can be found in Java interfaces as default methods (and also Groovy or Scala traits). Let’s see the difference between the Kotlin and Java default methods in interface by testing it with Groovy and Spock. What do we want to test? We often have an interface for ...

Read More »

The Truth About AI and Test Automation

Software testing has gradually evolved in the past few decades. In the past, teams were accustomed to the waterfall methodology: Everything was sequential, from requirements to product deployment. Only after the development phase was completed did the testers got their hands on the product. Historically, testers would find a number of bugs in this phase, and it would take a ...

Read More »

ActiveMQ Performance Testing

java-interview-questions-answers

We use ActiveMQ as our messaging layer – sending large volumes of messages with a need for low-latency. Generally it works fine, however in some situations we’ve seen performance problems. After spending too much time testing our infrastructure I think I’ve learned something interesting about ActiveMQ: it can be really quite slow. Although in general messages travel over ActiveMQ without ...

Read More »

Java: Mocking a ResultSet using Mockito

This post shows how you can mock a java.sql.ResultSet using Mockito. It can be used to help unit test code which performs operations on ResultSets (such as a ResultSetExtractor) without relying on an external datasource. You can create a MockResultSet by providing a list of column names and a 2D array of data. For example: var rs = MockResultSet.create( new ...

Read More »

Spock 1.2 – hassle-free Spring beans mocking in integration tests

spring-interview-questions-answers

Discover how to automatically inject Spock’s mocks and spies into the Spring context using Spock 1.2. Stubs/mocks/spies in Spock (and their life cycle) have been always tightly coupled with the Spock Specification class. It was only possible to create them in a test class. Therefore, using shared, predefined mocks (in both unit and integration tests) was problematic. The situation was ...

Read More »

7 Bad Habits to Avoid as a QA Engineer

Most people would agree that software quality is important. We have seen the results of buggy software in all kinds of situations: from Mars probes malfunctioning and chemotherapy machines administering lethal doses of radiation, to telecommunications systems experiencing a cascade failure. It would seem logical to assume that software testers would be much-valued members of a development team. Yet sadly, ...

Read More »

The Importance of Application Decomposition in App Performance Testing

Discover faster, more efficient performance monitoring with an enterprise APM product learning from your apps. Take the AppDynamics APM Guided Tour! Summary Learn how to maximize the quality of your metric data by breaking down your app and applying proper instrumentation. DevOps is changing the way companies develop and maintain software. By embedding operations engineers into software development teams, companies ...

Read More »