All Questions
Tagged with testing unit-testing
6,645
questions
1
vote
1
answer
58
views
Angular unit test component's @Input. Change value detection
I have a simple scenario where (angular 17.3) I'm trying to test is the component reacts when the input property is changed.
I have a property passed from a parent component where it comes as @Input ...
1
vote
1
answer
92
views
speedup Nestjs + jest test performance
I wrote about 2,000 testcase in nestjs application with jest.
but it takes around 3 minutes to take overall test.
I want to reduce the time executing these tests.
when i examine the situation, jest ...
0
votes
1
answer
113
views
Can I run Pitest on only 2 test files (no mutations found issue)?
So I'm having issues with the following error when running Pitest "Skipping coverage and analysis as no mutations found". The advice I've seen so far seems to be editing the maven or gradle ...
0
votes
0
answers
43
views
Unit testing of Dao and Websocket. Dependency injection
I have quite developed my application, made in Flutter. The app is a real time which consumes a WebSocket API. The problem came when i tried to generate testing to this App.
The general schema of my ...
3
votes
0
answers
61
views
Problems discovering tests automatically using the TestPlatform in .NET
I am developing a unit testing framework with C#. I am using the official Microsoft.TestPlatform library and I have already implemented ITestDiscoverer and ITestExecutor.
What I am using to determine ...
1
vote
0
answers
87
views
Flutter - Problem mocking supabase with mocktail
I'm trying to mock a query to a table in Supabase with mocktail, and it doesn't work. My problem is mocking the await on the PostgrestTransformBuilder, it doesn't work at all:
import 'package:...
1
vote
0
answers
37
views
Best Practice for Using Fake Objects in Multi-Module Projects for Testing
I recently came across a blog post (https://testing.googleblog.com/) discussing the use of fake objects over mocking for testing purposes. The post detailed creating fake objects for necessary ...
0
votes
0
answers
27
views
Why does livewire test assertReturned fail?
I have a simple function called sumEquation:
/**
* Sums an equation
*
* @param string $equation
* @return float|int
*/
private function sumEquation(string $equation): float|int
{
$...
0
votes
1
answer
124
views
How to mock classes with factory methods in Substitute? (for using ForPartsOf to keep default behaviour while still checking received calls)
I want to mock a Logger using NSubstitute. But instead of using Substitute.For, I want to use Substitute.ForPartsOf to:
both call the real implementation (to continue logging to the console)
and ...
0
votes
0
answers
25
views
VScode testing fails when using the debugger in conjunction with a virtual environment
I have an odd problem, but I can't be the first.
Using VScode, I typically create a virtual environment for my Python projects. When using unit tests, the testing extension discovers and runs these ...
0
votes
0
answers
69
views
Maven Jacoco Code Coverage Report with failed Unit Tests, ignore failed tests
I am currently evaluating an AI-based tool for generating unit tests by tracking code coverage and successful test runs with Maven. However, if a unit test fails, no coverage report is generated.
I've ...
0
votes
1
answer
44
views
Mockito thenReturn not working in RichSourceFunction
In my unit test I am mocking the return of my Fetcher then passing it into the constructor of a nested static class Head.Source. My Fetcher gets items every 5 minutes.
The problem is that in each call ...
0
votes
0
answers
57
views
How To Structure Architecturally Tests
I was looking to some smart ways to architecture tests in typescript using mocha
To give a better understanding I will explain below my current architecture with it's problems that I have not yet been ...
1
vote
0
answers
32
views
getting some issue when I apply npm run test
I'm runnig npm test on my proyect, next js and I'm getting this issue:
> npm test
> [email protected] test
> jest
FAIL __tests__/pages/Home.test.tsx
● Test suite failed to run
Jest ...
1
vote
1
answer
50
views
statically inspect a python test suite
I have a (unittest-based) test suite for my python project.
Here I have my test classes, with my test methods, etc...
In (some of my) tests I call a function to initialize the scenarios of the tests. ...