Posts with tag: Unit testing
.NET Core code coverage on Linux with MiniCover
How to run code coverage of your unit tests as part of your build on Linux build agents.
Code coverage of .NET Core unit tests with OpenCover
Examples how to measure code coverage of .NET Core unit tests with OpenCover.
.NET Core integration testing and mock dependencies
How to do integration testing on .NET Core application and stub or mock some inconvenient dependencies.
Convert NUnit 3 to NUnit 2 results XML file
Examples how to convert NUnit 3 result XML file into NUnit 2 result XML file.
PowerMock examples and why better not to use them
In this post, I have summarised all PowerMock examples I've given so far. More important I will try to give some justification why I think necessity to use PowerMock is considered an indicator for a bad code design.
Mock new object creation with PowerMock
How to control what objects are being instantiated when using PowerMock.
Mock private method call with PowerMock
How to mock private method with PowerMock by using spy object.
Call private method with PowerMock
How to invoke a private method with PowerMock.
Verify static method was called with PowerMock
How to verify that static method was called during a unit test with PowerMock.
Data driven testing with JUnit and Gradle
How to do data-driven testing with JUnit and Gradle.
Mutation testing for Java with PITest
Introduction to mutation testing and examples with PITest tool for Java.
Mock static methods in JUnit with PowerMock example
Examples how to mock static methods in JUnit tests with PowerMock.
Data driven testing with JUnit parameterized tests
How to do data-driven testing with JUnit parameterized tests.
Assert Mockito mock method arguments if no equals() method implemented
How to assert mock method is called with the specific object as an argument in case no equals() method is implemented on argument object.
Mock JUnit tests with Mockito example
Why mocking is needed in unit testing and how to do it with Mockito.
JUnit methods execution sequence
Details with code samples on JUnit methods execution sequence.
Retry JUnit failed tests immediately
How to retry failed JUnit tests immediately and if a retry is OK then report test as passed.
Use JUnit rules to debug failed API tests
What are JUnit rules and how to use them to improve debugging of failed API tests.