50,461 questions
Best practices
2
votes
0
replies
25
views
Testing with corroutines
Let's say I have Worker class and I want to do long running tasks in the background until user stops it or it is cancelled. It changes state of the class while doing the work and I want to write tests ...
Best practices
0
votes
0
replies
44
views
Testing in MVVM architecture. What to test and how to approach TDD?
I’m currently working on a personal Android project using Kotlin and Android Studio, following a basic MVVM architecture:
─main
│ ├───java
│ │ └───com
│ │ └───example
│ │ └───...
-3
votes
0
answers
72
views
Entering text with no dependency on current keyboard layout
If a GUI test must involve entering text in a text field, a convenient shortcut is robot.enterText(..) (available in both FEST and its fork, AssertJ Swing).
I was under the impression the utility is ...
Advice
0
votes
0
replies
25
views
Designing a props-driven test framework for data quality validation - best patterns?
Question: I'm building a testing system for a data quality SaaS app where tests are entirely props-driven (similar to React component testing philosophy).
Goal: Create reusable, composable test ...
1
vote
0
answers
38
views
Locust POST Request with .xlsx File to Flask Endpoint Returns a 503 Error
I am testing my Python Flask app using Locust to load-test a POST request with an .xlsx file attachment. However, I consistently encounter a 503 Service Unavailable error.
This issue ONLY occurs when ...
Best practices
0
votes
0
replies
16
views
Is there a way to reference contracts deployed on anvil in a typescript test?
Right now, I am deployed contracts on anvil with a script, logging the addresses, and hardcoding it into my viem typescript test. Is there a more seamless way to do ts tests in conjunction with smart ...
Best practices
0
votes
6
replies
54
views
Need a Opinion on the workflow from Feature dev to staging test to prod run
the title is somewhat difficult i try to explain what i want the input from you all.
My current practice from a feature/bug development towards the codes journey to the production is following
I get ...
Best practices
0
votes
0
replies
40
views
How to run tests with CDK pipelines
We are building and deploying a few system using the AWS CDK Pipeline, mostly with dotnet
Most cases we are building the deployed apps using dockerfile assets referenced in the CDK
Should we run the ...
Best practices
0
votes
0
replies
21
views
"Test only" endpoints purely for e2e tests?
Context: Fullstack program which implements reconnection logic that utilizes TTL session expiries that are managed on the backend to determine whether or not a session is "still open to rejoin&...
-2
votes
0
answers
50
views
SCIP make test do not give me .err file
I am trying to compare two algorithms in SCIP. To do this, I am following the steps in https://www.scipopt.org/scip/doc/html/TEST.php, but it says that SCIP automatically creates the scip/check/...
0
votes
1
answer
130
views
AWSSDK.S3 causes x-amz-content-sha256 error against minio
I'm using the AWSSDK.S3 for .NET (v4.0.9.1) in my app. For my tests I run minio in a docker container. I know this worked in the past but with an update to the current versions of the SDK and the ...
1
vote
1
answer
79
views
Zustand persist doesn't execute in testing
I am doing unit testing for my project.
This is the code I want to test:
import { create } from "zustand";
import { persist } from "zustand/middleware";
interface LanguageState {
...
0
votes
0
answers
39
views
Unable to move Test Case work items between projects in ADO “Work item type Test Case cannot be moved because it is disabled, hidden or not supported”
I'm trying to move Test Case work items from one Azure DevOps project to another within the same organization.
However, when I try to move them, I get the following error:
Work item type Test Case ...
0
votes
1
answer
51
views
I can only run my backend tests locally because all the instances of the mocked environment are created and into the actual db because of celery
I want to create tests but every time I run a test it triggers celery and celery creates instances into my local db. that means that if I run those tests in the prod or dev servers, then it will ...
2
votes
0
answers
57
views
How to properly handle native JavaScript confirm() in Laravel Dusk without triggering UnexpectedAlertOpenException
I’m writing a Laravel Dusk browser test for a “Delete Contact” button that shows a native JavaScript confirm() dialog before deleting a record.
However, every time the test runs, I get this error:
...
0
votes
2
answers
94
views
How to remove setTimeout in Vitest?
I have a function that allows users to register. After successful registration, the user is redirected to the home page (after 5 seconds). Before being redirected, the user receives a toast ...
1
vote
1
answer
70
views
How to directly test ActionController::RoutingError for an invalid path in Ruby-on-Rails-7.1?
In Rails Controller tests of an invalid route, this used to work before Rails-7.1 (in Minitest):
assert_raises(ActionController::RoutingError){ get "/non_existent" }
In Rails-7.1 (or later),...
0
votes
2
answers
52
views
Apache JMeter testing multiple HTTP requests concurrently with only one query parameter different in requests
I have a question related to Apache JMeter testing. I want to send multiple HTTP requests to a single GET endpoint simultanesously (concurrently), that has multiple query parameters, one of them is ...
-3
votes
1
answer
126
views
Make assumption based on verify in Mockito
Can you make assumptions with Mockito?
If the method's not invoked, this would throw AssertionError and make the test fail.
then(mock).should().doSomething();
Instead, I want the test to be skipped, ...
0
votes
1
answer
32
views
NestJs e2e Testing issue overriding provider
I tried following the documentation here as best i could, but im getting an error where the DI seems broken. What am i missing
Here is the error, with some logs:
stdout | src/resources/cats/cat.spec....
0
votes
0
answers
67
views
RobolectricTestRunner and suspend functions. Test function not found
@RunWith(RobolectricTestRunner::class)
class ServerUnitTest {
@Test
fun localAccessTest() {
runTest {
val res = LocalAccess.pingServer()
assertEquals(res, 0)
...
0
votes
1
answer
51
views
Laravel 9 RefreshDatabase trait connects to wrong DB / user in GitHub Actions CI
I'm running Laravel 9 feature tests with the RefreshDatabase trait in GitHub Actions. Locally, everything works fine, but on CI, it seems that RefreshDatabase tries to connect with the wrong database ...
0
votes
0
answers
71
views
Weird Results in Robot Pathfinding Algorithm Testing Using MATLAB
Recently, I developed a MATLAB-based simulation to evaluate my robot pathfinding algorithm. The robots operate on a network of unidirectional tracks, where each robot computes a single path from its ...
0
votes
0
answers
121
views
Storekit 2 Local Testing Transaction Manager Not Working Properly With Auto-renewable Subscriptions
I am encountering a strange behaviour when testing locally an app with auto renewable subscriptions. I have three subscriptions, with three price levels (simplified for clarity): Base ($10), Premium ($...
1
vote
1
answer
120
views
How to mock SQL DB in Go unit tests?
I have a unit test testing service layer of my REST APIs. What I want to test is RegisterAccount in the service layer, which has dependencies on Repository (Database access layer). How do I mock in ...