Mockito
Pact JVM
Our great sponsors
Mockito | Pact JVM | |
---|---|---|
11 | 25 | |
14,515 | 1,050 | |
0.8% | 1.0% | |
9.0 | 9.0 | |
8 days ago | 2 days ago | |
Java | Kotlin | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Mockito
-
Wednesday Links - Edition 2023-01-18
Mockito 5 Released (1 min)🎉 https://github.com/mockito/mockito/releases/tag/v5.0.0
- Mockito 5.0.0 released, requires Java 11
- 5 easy paths to become a recognized Java expert. Really. For free.
-
Mockito and non-debuggable testBuildTypes
For those using a "release" testBuildType for integration tests, what does your mocking setup look like? My app is stuck on Mockito 2.23.4, because higher (> 1.8.12) versions of Byte Buddy required beyond that point [do not play nicely with non-debuggable APKs](https://github.com/mockito/mockito/issues/2302). Solutions I've considered so far:
-
20+ Trending and Popular Java Open Source Project
Mockito
-
Writing Apache Parquet Files
Hi, I've been trying to write parquet files on android for the past couple of days, and have really been struggling to find a solution. My original hypothesis was to just use the java parquet implementation (https://github.com/apache/parquet-mr), but I've since realized that not all java libraries play well with Android. I've gone through essentially dependency hell trying to franken-fit the library into my project, and imported as much as i could before hitting walls such as this one (https://github.com/mockito/mockito/issues/841).
-
Can we please stop downvoting people who dislike Rust?
A lot of that magic on the JVM (Mockito / Spring Boot) relies on proxy objects that intercept method calls, and operate on them in a non-typesafe manner (working on Object[] args, and returning Object). When you use them, it looks type-safe, but under the hood it's all dynamic. Here is an example in Mockito: https://github.com/mockito/mockito/blob/ea000f72444ed4c7e409441aedc3021951b89660/src/main/java/org/mockito/internal/creation/bytebuddy/MockMethodInterceptor.java#L59.
Pact JVM
-
API testing for new project (new to APIs)
We use Pact for contract testing https://docs.pact.io/
-
Why I will stop mocking for most of my Unit Tests in a Spring-Boot Application
The introduction here is quite good: https://docs.pact.io/
-
Does anyone know how to do an integration test on microservices build with asp core?
Pact.Net documentation: https://docs.pact.io/ Mountebank documentation: http://www.mbtest.org/ The Microsoft.AspNetCore.TestHost package on GitHub: https://github.com/aspnet/AspNetCore/tree/main/src/Testing/Microsoft.AspNetCore.TestHost
-
Integration testing best practices for API servers...
There's also https://docs.pact.io/ but I haven't had time yet to really look into it but probably someone else can tell something about it.
-
🤝 Contract Testing with Pact
This PoC shows a step by step implementation of contract testing using Pact.
-
Operation Pact or: How I Learned to Stop Worrying and Love Contract Testing
Contract tests assert that inter-application messages conform to a shared understanding documented in a contract. Without contract testing, the only way to ensure that applications will work correctly together is by using expensive and brittle integration tests.
-
Book notes: Turn the Ship Around!
Pact.
-
I have difficulties in unit testing
I have contract tests (https://docs.pact.io/) to ensure the integration works.
-
90% of software engineering done today is integrating poorly documented APIs
Well-defined and well-documented are usually orthogonal properties.
You hit the nail on the head with mention of contracts.
We need wider adoption of tooling like Pact. (Ironic link to Pact docs follows.)
-
How to use Protobuf with Go?
Protobuf is one of the ways to implement Messaging Contracts there are more options like Pact, AsyncApi
What are some alternatives?
WireMock - A tool for mocking HTTP services
REST Assured - Java DSL for easy testing of REST services
MockServer - MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding).
Testcontainers - Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
Cucumber - Cucumber for the JVM
Selenium
AssertJ - AssertJ is a library providing easy to use rich typed assertions
Spock - The Enterprise-ready testing and specification framework.
Awaitility - Awaitility is a small Java DSL for synchronizing asynchronous operations
PowerMock - PowerMock is a Java framework that allows you to unit test code normally regarded as untestable.