50,481 questions
1
vote
1
answer
29
views
No qualifying bean of type 'org.springframework.boot.web.server.test.client.TestRestTemplate' available
I'm trying to test my @RestController, but it doesn't work, giving me the error
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'studio.abos.springcalc....
0
votes
1
answer
49
views
Flutter Test with fixed time without `withClock` closure
I have a test structure that doesn't allow for the use of a context manager withClock(..., () {}) to set a fixed date time for the unit tests.
I am looking for a way to do it in a setUp and tear down ...
0
votes
2
answers
67
views
How to disable network access for Cargo tests?
I'm writing integration tests for my libp2p project. These are pretty powerful, essentially instantiating the full app and seeing how it interacts with other instances.
While libp2p has utilities to ...
0
votes
0
answers
28
views
VS Code extension Test Runner: How to assert values copied to the clipboard?
Summary/Intent
I'm writing tests for a VS Code extension that uses vscode.env.clipboard.writeText() to copy a generated string to the system clipboard.
I want to assert that the clipboard contains the ...
1
vote
1
answer
43
views
How to simulate a weakly order memory environment on a host with strong memory order?
I want to test if there are any bugs in my program where the memory sequence has not been properly used, but I do not have a weakly order memory environment for testing.
For example, on x86, all loads ...
0
votes
0
answers
128
views
+500
Running each target on all compatible frameworks using `dotnet test`
I have a library with TargetFrameworks set to netstandard2.0;net462;net6.0;net8.0.
I want to run tests:
netstandard2.0 version on net462, net481, net6.0, net7.0, net8.0, net9.0
net462 version on ...
1
vote
0
answers
71
views
How to check order of enum with fields?
Let's say there is an enum with fields with a specific order. e.g.,
pub enum MyValues {
U8(u8),
U64(u64),
U128(u128),
Str(Vec<U8>),
U16(u16),
}
How to add a test to make ...
0
votes
1
answer
49
views
How to handle E2E API Request in Backend correctly?
I have set up an api backend using FastAPI. Backend testing has been done already. But I don't know how to test the frontend correctly which is usign the api. Because I want at least one test that is ...
0
votes
1
answer
40
views
Cookies are missing from request when feature testing in Laravel
My project is using a modified implementation of Laravel Passport for authentication.
I have a route, /auth/login, which I use for authentication. POST is for logging in, PUT is for refreshing tokens, ...
2
votes
1
answer
60
views
Angular testing - Do you have to import tested component upon calling configureTestingModule
See examples here: https://angular.dev/guide/testing/components-scenarios, they all have imports: [BannerComponent]. Is it necessary? Tests seem to run fine without it. I am assuming that the ...
-1
votes
1
answer
73
views
How can I modify a git branch merged from multiple other branches, then propagate the changes back to the correct origin branches? [closed]
I have a dozen feature branches that I would like to manually test at the same time by merging them into a single test branch, to avoid repeating the overhead of setting up the test environment for ...
-1
votes
1
answer
35
views
One Test is not Rebuilding when trying run
When running my Tests one Test-Project where skipped (most of the time)
I tried Test Explorer (and the Resharper Unit Test Session)
I found out that the Test-Project where also not building when Run ...
1
vote
2
answers
40
views
Does GLib's "GTest" testing framework have any filesystem mocking functionality?
I'm writing tests for some code that interacts with the filesystem, and I want to assert that it writes the expected data to disk. My problem is that some of the code I want to test includes hardcoded ...
0
votes
0
answers
51
views
E2E test failed with RuntimeException [Error]: at TestingInjector.loadInstance (...\node_modules\@nestjs\core\injector\injector.js:56:19)
I wanted to write some backend E2E tests and I tried to first run the default test from test/app.e2e-spec.ts file:
import { Test, TestingModule } from '@nestjs/testing';
import { INestApplication } ...
0
votes
1
answer
58
views
How to wait for Angular lazy-loaded chunks before interacting with elements in Playwright? [closed]
I'm testing an Angular web application with Playwright where buttons are loaded via lazy-loaded chunks (chunk-XXXXXXXX.js). When Playwright tries to click a button too quickly, the click doesn't work ...