Audience
DevOps teams looking for a Unit Testing solution
About MockK
Mocking is a technique to make testing code readable and maintainable. In three consequent articles, I would like to show the basics, features, and quirks of the MockK library. It is a new open-source library (github repository) focused on making mocking in Kotlin great. Injection first tries to match properties by name, then by class or superclass. Check the lookupType parameter for customization. Properties are injected even if private is applied. Constructors for injection are selected from the biggest number of arguments to lowest.
Other Popular Alternatives & Related Software
        Karate
                
                Karate is the only open-source tool to combine API test automation, mocks, performance-testing and even UI automation into a single, unified framework. The BDD syntax popularized by Cucumber is language-neutral and easy for even non-programmers. Assertions and HTML reports are built-in, and you can run tests in parallel for speed. There’s also a cross-platform stand-alone executable for teams not comfortable with Java. You don’t have to compile code. Just write tests in a simple, readable syntax - carefully designed for HTTP, JSON, GraphQL and XML. And you can mix API and UI test automation within the same test script. It is worth pointing out that JSON is a ‘first-class citizen’ of the syntax such that you can express payload and expected data without having to use double-quotes and without having to enclose JSON field names in quotes. There is no need to ‘escape’ characters like you would have had to in Java or other programming languages.
                Learn more
            Cypress
                
                Fast, easy and reliable end-to-end testing for anything that runs in a browser. Cypress has been made specifically for developers and QA engineers, to help them get more done. Cypress benefits from our amazing open-source community - and our tools are evolving better and faster than if we worked on them alone. Cypress is based on a completely new architecture. No more Selenium. Lots more power. Cypress takes snapshots as your tests run. Simply hover over commands in the Command Log to see exactly what happened at each step. Stop guessing why your tests are failing. Debug directly from familiar tools like Chrome DevTools. Our readable errors and stack traces make debugging lightning fast. Cypress automatically reloads whenever you make changes to your tests. See commands execute in real-time in your app. Never add waits or sleeps to your tests. Cypress automatically waits for commands and assertions before moving on. No more async hell.
                Learn more
            PowerMock
                
                Writing unit tests can be hard and sometimes good design has to be sacrificed for the sole purpose of testability. Often testability corresponds to good design, but this is not always the case. For example final classes and methods cannot be used, private methods sometimes need to be protected or unnecessarily moved to a collaborator, static methods should be avoided completely and so on simply because of the limitations of existing frameworks. PowerMock is a framework that extends other mock libraries such as EasyMock with more powerful capabilities. PowerMock uses a custom classloader and bytecode manipulation to enable mocking of static methods, constructors, final classes and methods, private methods, removal of static initializers and more. By using a custom classloader no changes need to be done to the IDE or continuous integration servers which simplifies adoption.
                Learn more
            Mockito
                
                Mockito is a mocking framework that tastes really good. It lets you write beautiful tests with a clean & simple API. Mockito doesn’t give you hangover because the tests are very readable and they produce clean verification errors. Read more about features & motivations. Top 10 Java library across all libraries, not only the testing tools. In late 2013 there was an analysis made of 30.000 GitHub projects. Although Mockito reached number 9 in the main report, mockito-core and mockito-all are the same tool and therefore the factual position of Mockito is number 4, surpassing famous tools like Guava or Spring. Treat this study as an indicator of a big impact that Mockito makes every day on unit tests written in Java. 
                Learn more
            Pricing
Starting Price:
            Free
        Free Version:
            Free Version available.
        Company Information
MockK
mockk.io
    
Other Useful Business Software
    
                    
                    MongoDB Atlas runs apps anywhere
                    
                    
                
            
                            MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
                        
                    Product Details
Platforms Supported
            
                            
 Windows
                        
                    
                        
                            
 Mac
                        
                    
                        
                            
 Linux
                        
                    
                
            Training
            
 Documentation 
                
            Support
            
 Online