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.

How to test Spring Data repositories?

I want a repository (say, UserRepository) created with the help of Spring Data. I am new to spring-data (but not …

unit-testing jpa spring-data-jpa spring-data
Class Not Found: Empty Test Suite in IntelliJ

I'm just starting the computer science program at my college, and I'm having some issues with IntelliJ. When I try …

java unit-testing intellij-idea junit
Setting HttpContext.Current.Session in a unit test

I have a web service I am trying to unit test. In the service it pulls several values from the …

c# web-services unit-testing httpcontext
Why is the Visual Studio 2015/2017/2019 Test Runner not discovering my xUnit v2 tests

UPDATE: Adding a 2019; the discovery/runner integration mechanism is same as per 2017 & 2015, so the key things that can go …

.net visual-studio unit-testing visual-studio-2015 xunit2
Can I write into the console in a unit test? If yes, why doesn't the console window open?

I have a test project in Visual Studio. I use Microsoft.VisualStudio.TestTools.UnitTesting. I add this line in one …

c# .net visual-studio unit-testing console-application
How should I unit test threaded code?

I have thus far avoided the nightmare that is testing multi-threaded code since it just seems like too much of …

multithreading unit-testing
How to use JUnit to test asynchronous processes

How do you test methods that fire asynchronous processes with JUnit? I don't know how to make my test wait …

java unit-testing asynchronous junit
How to test the type of a thrown exception in Jest

I'm working with some code where I need to test the type of an exception thrown by a function (is …

javascript unit-testing jestjs
How to assert two list contain the same elements in Python?

When writing test cases, I often need to assert that two list contain the same elements without regard to their …

python unit-testing
Unit Tests not discovered in Visual Studio 2017

I have been struggling with VS 2017 since I installed it. Now it seems Unit Tests will only run from the …

unit-testing visual-studio-2017