Top "Unit-testing" questions

Unit testing is a method by which individual units of source code are tested to determine if they are fit for use.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0

I've got a gradle FAILURE: ..."Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0." Case description: …

android unit-testing gradle kotlin junit5
Unit tests vs Functional tests

What is the difference between unit tests and functional tests? Can a unit test also test a function?

unit-testing testing functional-testing
How do you unit test private methods?

I'm building a class library that will have some public & private methods. I want to be able to unit …

.net unit-testing tdd private
Assert an object is a specific type

Is it possible in JUnit to assert an object is an instance of a class? For various reasons I have …

java unit-testing junit
PATH issue with pytest 'ImportError: No module named YadaYadaYada'

I used easy_install to install pytest on a mac and started writing tests for a project with a file …

python unit-testing pytest
Mockito: InvalidUseOfMatchersException

I have a command line tool that performs a DNS check. If the DNS check succeeds, the command proceeds with …

java unit-testing mockito
How to properly assert that an exception gets raised in pytest?

Code: # coding=utf-8 import pytest def whatever(): return 9/0 def test_whatever(): try: whatever() except ZeroDivisionError as exc: pytest.fail(exc, …

python unit-testing testing pytest
How to test my servlet using JUnit

I have created a web system using Java Servlets and now want to make JUnit testing. My dataManager is just …

unit-testing testing servlets junit
Using Mockito to test abstract classes

I'd like to test an abstract class. Sure, I can manually write a mock that inherits from the class. Can …

java unit-testing mocking abstract-class mockito
How to specify test directory for mocha?

Mocha tries to find test files under test by default, how do I specify another dir, e.g. server-test?

unit-testing node.js mocha