awesome-repositories.com
Blog
awesome-repositories.com

Découvrez les meilleurs dépôts open-source grâce à notre recherche par IA.

ExplorerRecherches sélectionnéesAlternatives open sourceLogiciels auto-hébergésBlogPlan du site
ProjetÀ proposNotre méthodologiePresseServeur MCP
Mentions légalesConfidentialitéConditions d'utilisation
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
mockito avatar

mockito/mockito

0
View on GitHub↗
15,432 stars·2,656 forks·Java·MIT·6 vuesmockito.org↗

Mockito

Mockito is a Java mocking framework and JUnit testing library used to create simulated objects and stub method calls to isolate components during unit tests. It functions as a dynamic proxy generator and bytecode instrumentation tool, allowing for the creation of runtime substitutes that mimic the behavior of real classes.

The framework distinguishes itself by providing the ability to mock final classes and methods, bypassing standard language restrictions through bytecode modification. This capability enables the testing of legacy code that lacks interfaces.

The toolset covers behavioral mocking to define specific method responses and interaction verification to ensure methods were called with the correct arguments. It provides mechanisms for mock object generation and the recording of method interaction history for post-execution verification.

Features

  • Unit Testing Frameworks - Serves as a primary library for creating simulated objects to isolate Java code units during testing.
  • Proxy Objects - Generates runtime proxy objects that intercept and redefine method operations to mimic real classes.
  • Behavioral Configuration - Allows the definition of specific return values and behaviors for mocks based on provided arguments.
  • Method Interception Proxies - Provides a dynamic proxy mechanism to intercept method calls and inject simulated behaviors.
  • Method Call Verification - Records and validates the execution flow and arguments of method calls for interaction verification.
  • Interaction Verification Utilities - Provides tools for recording and asserting method call sequences and arguments to verify component interactions.
  • Mock Interaction Recorders - Captures detailed records of method invocations on mocks for post-execution interaction verification.
  • Mocking Frameworks - Provides a comprehensive framework for creating simulated objects and stubbing method calls in Java.
  • Dynamic Mock Objects - Generates runtime proxy objects to simulate dependencies and track interactions during unit tests.
  • Method Stubbing Utilities - Provides utilities for defining stubbed behaviors and return values for mock objects.
  • Runtime Bytecode Instrumentation - Implements runtime bytecode modification to bypass final modifiers for mocking restricted Java classes.
  • Legacy Code Isolation Tools - Provides isolation tools for legacy Java code by mocking final classes and methods.
  • Final Member Mocks - Bypasses language restrictions to create mock objects for final classes and methods via instrumentation.
  • Test Suite Integrations - Integrates mock lifecycles with JUnit and other Java test suites for project-wide verification.
  • Frameworks de test - Mocking framework for unit tests.

Historique des stars

Graphique de l'historique des stars pour mockito/mockitoGraphique de l'historique des stars pour mockito/mockito

Recherche par IA

Explorez plus de dépôts awesome

Décrivez vos besoins en langage naturel — l'IA classe des milliers de projets open source sélectionnés par pertinence.

Start searching with AI

Alternatives open source à Mockito

Projets open source similaires, classés selon le nombre de fonctionnalités partagées avec Mockito.
  • mockery/mockeryAvatar de mockery

    mockery/mockery

    10,724Voir sur GitHub↗

    Mockery is a PHP framework designed for creating test doubles, stubs, and spies to facilitate isolated unit testing. It serves as a utility for simulating class behavior, intercepting method calls, and validating arguments, allowing developers to replace real dependencies with mock objects to verify that code components interact as intended. The framework distinguishes itself through advanced capabilities for handling complex testing scenarios, such as bypassing constructors, mocking protected methods, and intercepting static calls or internal object instantiations. It provides a fluent inter

    PHPmockmockerymocking
    Voir sur GitHub↗10,724
  • phpspec/prophecyAvatar de phpspec

    phpspec/prophecy

    8,480Voir sur GitHub↗

    Prophecy is a PHP mocking framework and test double library used to simulate object dependencies during unit testing. It serves as a behavioral testing tool for creating mocks, stubs, and dummies to isolate code and ensure predictable test results. The framework enables interaction verification by tracking method call counts and arguments to validate that specific interactions occurred. It supports defining specific return values or custom logic for method calls to simulate various execution scenarios. The library provides capabilities for argument matching based on type or value, interactio

    PHP
    Voir sur GitHub↗8,480
  • sinonjs/sinonAvatar de sinonjs

    sinonjs/sinon

    9,753Voir sur GitHub↗

    Sinon is a JavaScript test double library and mocking framework used to isolate code and verify behavior during unit testing. It provides a collection of spies, stubs, and mocks that replace real function implementations and object methods with controlled substitutes. The project includes a specialized fake timer library for overriding the system clock, allowing the simulation of time progression to trigger timeouts and intervals without waiting for real-time delays. It also features a test sandbox mechanism to group multiple fakes together, ensuring the original state is restored between tes

    JavaScript
    Voir sur GitHub↗9,753
  • powermock/powermockAvatar de powermock

    powermock/powermock

    4,174Voir sur GitHub↗

    Powermock is a Java mocking framework and unit testing tool that uses bytecode manipulation to mock static methods, final classes, and private constructors. It includes a Java agent instrumentation tool and a reflection-based testing utility to bypass encapsulation and modify class behavior at runtime. The project distinguishes itself by providing the ability to intercept the instantiation of objects via the new keyword and simulate the behavior of core Java system classes and native methods. It can override final modifiers on classes and methods and bypass signature restrictions for classes

    Java
    Voir sur GitHub↗4,174
Voir les 30 alternatives à Mockito→

Questions fréquentes

Que fait mockito/mockito ?

Mockito is a Java mocking framework and JUnit testing library used to create simulated objects and stub method calls to isolate components during unit tests. It functions as a dynamic proxy generator and bytecode instrumentation tool, allowing for the creation of runtime substitutes that mimic the behavior of real classes.

Quelles sont les fonctionnalités principales de mockito/mockito ?

Les fonctionnalités principales de mockito/mockito sont : Unit Testing Frameworks, Proxy Objects, Behavioral Configuration, Method Interception Proxies, Method Call Verification, Interaction Verification Utilities, Mock Interaction Recorders, Mocking Frameworks.

Quelles sont les alternatives open-source à mockito/mockito ?

Les alternatives open-source à mockito/mockito incluent : mockery/mockery — Mockery is a PHP framework designed for creating test doubles, stubs, and spies to facilitate isolated unit testing.… phpspec/prophecy — Prophecy is a PHP mocking framework and test double library used to simulate object dependencies during unit testing.… sinonjs/sinon — Sinon is a JavaScript test double library and mocking framework used to isolate code and verify behavior during unit… powermock/powermock — Powermock is a Java mocking framework and unit testing tool that uses bytecode manipulation to mock static methods,… sebastianbergmann/phpunit-mock-objects — This project is a mocking framework and library designed for creating simulated objects to isolate code and verify… thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source…