SaaSHub helps you find the best software and product alternatives Learn more →
Top 22 Mockito Open-Source Projects
-
-
Project mention: Best practices for Unit Testing Android Apps with Mockk, Kotest and others | dev.to | 2023-05-10
As you can see, I create mockUsersRepository object using mock( function. Then, in setup() method, I set up this repository in such a way so that it would return a list of hardcoded values. After this, on top of everything else, I check if, for mockUsersRepository object, getUsers method was called with verify function, in the test method. It’s important to note that Mockito is a very old framework and was originally written for Java. When Kotlin appeared, it turned out that out of the box this framework can work with some limitations, which is why an extension, mockito-kotlin, was released. The example above was written with it. Another Mockito’s limitation was that it was impossible to mock final classes and static methods, and all classes are final by default in Kotlin. Currently, this is solved through mockito-inline but, before, it was a serious limitation. In respect to Java development, there was and is an alternative for Android developers, PowerMock.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
Swift testing this simple Hello World with XCTest and Cuckoo
-
-
Project mention: Unit Testing in Node.js and TypeScript: A Comprehensive Guide with Jest Integration | dev.to | 2024-03-03
If you are using a mocking library, such as sinon, jest-mock, or ts-mockito, make sure that it is compatible with Jest. You may need to install additional packages or configure them in your configuration file. For example, to use sinon with Jest, you can install the sinon-jest package and add the following to your configuration file:
-
-
testing-spring-boot-applications-masterclass
🍃 Build Better Spring Boot Applications: A Comprehensive Testing Course to Boost Your Confidence and Productivity.
If you want to improve your testing skills, maybe I can fill that gap with my course: https://rieckpil.de/testing-spring-boot-applications-masterclass/
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
Project mention: Show HN: Unlogged (YC S22) – open-source record and replay for Java | news.ycombinator.com | 2023-10-30
Hello HN! Parth, and Shardul here. We have been building unlogged.io for the last 21 months. We started as a time travel debugger and pivoted to record and replay with assertions, mocking, and code coverage. You can save the replays in the form of a JSON and commit them to your git.
Both Parth and I come from an e-commerce/payments background where production bugs meant heavy financial losses. Big billion days/Black Friday sales meant months of code freezes with low productivity. Before committing the code, we wanted to replay production traffic and know the breaking changes right away, like in sub-second. Kind of like unit+integration tests on steroids.
So, we built an SDK that adds probes to the code in compile time. The SDK logs code execution, in detail.
Git: https://github.com/unloggedio/unlogged-sdk
We also built an IDE plugin that keeps monitoring code changes, hot reloads these changes, replays the relevant methods, and alerts on failing replays. It also lets developers call Java methods directly, mock downstream methods in run time, highlight code coverage in real-time, and show performance numbers for methods with inlay hints. (right above each method)
Git: https://github.com/unloggedio/intellij-java-plugin
We are excited to launch the first version of our product that replays with assertions + mocking + code coverage reports right inside the IDE.
Link to our IntelliJ plugin: https://plugins.jetbrains.com/plugin/18529-unlogged/
Record and Replay Demo: https://www.youtube.com/watch?v=muCyE-doEB0
Define Assertions on Replay: https://www.youtube.com/watch?v=YKsi1p634-M
Track Code Coverage: https://www.youtube.com/watch?v=NMmp954kfaU
Generate JUnit Test Cases: https://www.youtube.com/watch?v=rTUmg5b1Z_Q
Mocking when replaying: https://www.youtube.com/watch?v=O_aqU1u-Kmw
Documentation: http://read.unlogged.io/
Roadmap:
1. Create a production logger
-
-
-
-
Movies
Movies demonstrates modern Android development with Hilt, RxJava3, Jetpack (Room, ViewModel,LiveData etc.), and Material Design based on MVVM clean architecture. (by shamim-emon)
Hello guys.I'm relatively new to building open source projects. I've built a simple Android application using TMDB apis having latest technologies and would love to have feedback from you guys. Here is the project : https://github.com/shamim-emon/Movies
-
-
-
Rental-Car-Agency
This is a REST API service built with the Spring Boot framework, designed to demonstrate how to build a simple Spring Boot application that interacts with a MySQL database.
-
-
mockito-object-injection
Mockito Object Injection for JUnit5. Inject Strings and other Objects directly into Mocks without needing setters or constructor injection.
Project mention: JEP 457: Class-File API for Parsing, generating, transforming | news.ycombinator.com | 2023-09-26This is pretty exciting... I've used them all libraries at this point in my career: CGLib, ASM, BCEL, ByteBuddy, Javassist, etc... each has its pluses and minuses. I've designed everything from profiling agents, to systems that pack decimals into EBCDIC and invoke COBOL programs on big IBM iron, to lightweight JIT compilers, all using these libraries.
> In 2002, the visitor approach used by ASM seemed clever
I couldn't agree more. The visitor pattern was very hard to explain/justify back then, and still difficult to explain to newbie programmers just entering the profession.
Looking at the examples, I think this is going to be an official replacement for ASM, meaning it's going to be pretty low level. The use of streams pretty straightforward.
If anyone from the JEP is reading this: I have two pieces of feedback!
First, take some inspiration from the way CDI Portable Extensions work. This is probably the most delightful extension API I've ever used. The @Observe callbacks are super simple to explain to people and it's really easy to write extensions for the framework.
Next, I wouldn't ignore the need for a higher-level API akin to ByteBuddy or Javassist. Sometimes I just want to write an interpreter or intercept a method call and thats it.
For example in my Junit/Mockito extension https://github.com/exabrial/mockito-object-injection I need to intercept a call to the class under test in order to lazily inject dependencies at the last possible moment. While I certainly could do this with ASM, Javassist makes this fairly simple with it's MethodHandler api.
Side note, it's a damn shame we don't have a mobile operating system that is JVM native :/ All this cool APIs simply never reach a huge number of devices.
-
-
spring-boot-freemarker-java-mail-api
POC that sends emails to user on account creation event occurrence: made using java spring boot, apache freemarker, java-mail-API, bootstrap email editor and spring events.
-
Project mention: Show HN: A learning productivity tracker for new programmers | news.ycombinator.com | 2024-01-02
-
Swift testing this simple Hello World with XCTest and Cuckoo
-
test-double-guide
This guide clarifies the differences between dummies, stubs, fakes, spies, and mocks. It includes practical examples and attempts to clarify the optimal use cases for each type.
Project mention: Differences between various test doubles in software testing | /r/web_programming | 2023-06-16So I’ve created a guide on the differences between mocks, spies, stubs, fakes, and dummies. Could you have a look at it and tell me what you think? If you also filled out the questionnaire at the end, I’d greatly appreciate it!
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Mockito related posts
- Tests Everywhere - Swift
- JEP 457: Class-File API for Parsing, generating, transforming
- Looking for a killer online course
- Ts-mockito developer experience (advantages/migration/inconvenient)
- Wednesday Links - Edition 2023-01-18
- Mockito 5.0.0 released, requires Java 11
- Mockito 5: prepare for future JDK versions
-
A note from our sponsor - SaaSHub
www.saashub.com | 28 Mar 2024
Index
What are some of the best open-source Mockito projects? This list will help you:
Project | Stars | |
---|---|---|
1 | Mockito | 14,515 |
2 | mockito-kotlin | 3,072 |
3 | Cuckoo | 1,631 |
4 | OCMockito | 992 |
5 | ts-mockito | 946 |
6 | Mockito Scala | 341 |
7 | testing-spring-boot-applications-masterclass | 270 |
8 | unlogged-sdk | 128 |
9 | http-mock-adapter | 60 |
10 | java-testing-toolbox | 60 |
11 | TestIt | 42 |
12 | Movies | 39 |
13 | Sub-Track | 37 |
14 | java-tutorials | 32 |
15 | Rental-Car-Agency | 11 |
16 | spring-boot-examples | 11 |
17 | mockito-object-injection | 8 |
18 | MoreShortcuts | 7 |
19 | spring-boot-freemarker-java-mail-api | 5 |
20 | GrowthDiary | 3 |
21 | tests-everywhere | 1 |
22 | test-double-guide | 0 |