50,626
questions
0
votes
0
answers
3
views
Spring @KafkaListener testcontainers
I ran into a problem when creating a test for a script with @KafkaListener. We need to test that we receive a message from Kafka to this particular Listener.
Unfortunately, I did not fully understand ...
0
votes
0
answers
10
views
Is it possible to achieve setup/teardown with b.RunParallel() as is with b.Run()?
For benchmarks that need setup, I use b.Run() func to achieve setup teardown, as per docs
A benchmark that calls Run at least once will not be measured itself and will be called once with N=1.
So ...
-4
votes
0
answers
14
views
Need a AI model to generate the testcases for Automation..Input is testcase scenario. Whats the best AI model to achieve this without openAI [closed]
I am looking to develop or integrate an AI/ML model within a Node.js or npm environment that can automatically generate detailed test cases. The model should take in both test data and predefined ...
0
votes
1
answer
20
views
Using thiserror with [transparent], how do I assert an Error using its original type?
The problem
I'm using thiserror crate to produce a library.
Say I have some code in module A that can generate a range of errors:
#[derive(thiserror::Error, Debug)]
pub enum InvalidGeometryError {
...
1
vote
0
answers
15
views
My jest test keeps failing and I can't understand why
This test is keeps failing with a zero call result from jest. I have no idea why this keeps happening
like:
Number of calls: 0Jest " "
it("should log game data on console", async ...
0
votes
1
answer
18
views
Mock being ignored, jest node
I'm trying mock a database with this test but the mock seems to be ignored. I can't think of a reason this could be?
import { jest } from '@jest/globals';
jest.mock('../database', () => ({
...
1
vote
1
answer
19
views
Select mock file to use based on the running Karate Scenario
I'm using Karate 1.4.0
I have some Karate Scenarios to test my application and I'm using a Karate MockServer as mocked downstream service.
To simulate edge case scenarios (e.g. empty results from ...
0
votes
0
answers
12
views
Why is my checkout transaction on Moneris Gateway Merchant Resource Center missing transaction details?
I was "testing a solution" in Moneris checkout preload page (test mode) to make sure all situations (fail/error/success) were handled. However, I tried so many times, the transactions were ...
-4
votes
0
answers
12
views
Full MC/DC Coverage [closed]
Given the following decision: IF X < 5 OR Y > 10 THEN
Which of the following sets of test inputs will achieve full MC/DC coverage?
A. X=4 and Y=7
X=6 and Y=12
X=5 and Y=10
B. X=4 and Y=11
X=7 ...
-1
votes
0
answers
10
views
Multiple condition coverage?
Given the following decision: IF X < 5 OR Y > 10 THEN
and the following test inputs: X=6 and Y=12, X=5 and Y=10
, which of the following additional sets of test inputs will ensure that full ...
0
votes
0
answers
24
views
Dependency (upstream) services are undefined with no useful error when doing e2e testing using Jest
This is in NestJs, using Jest. I am trying to test my controller, which relies on my "main" service. I wish to perform e2e testing on the controller. (To clarify, my smaller unit tests of ...
0
votes
0
answers
29
views
HikariCP Connection Pool Exhaustion with Testcontainers and Spring Boot when Building with Gradle
I am using Testcontainers with Spring Boot for integration testing in my project, but I'm facing an issue where the HikariCP connection pool becomes exhausted, leading to Connection is not available, ...
0
votes
0
answers
21
views
Cypress Test for Mocking User Login [closed]
I created a URL Shortening application using TypeScript, Next.js, Supabase for the backend, that allows users to login and shorten a url. for my database, i used supabase to store my users and i used ...
0
votes
1
answer
39
views
Share DbContext in Integration Testing
For making my integration tests I am using TestContainer package (SQL Server). I also have a BaseWebApplicationTest class to share some properties like HttpClient and AppDbContext.
This is my ...
0
votes
0
answers
9
views
Accelq - How to write a loop to click on next button if a element is not in page
I have to click on an element which is located in 15th page by clicking on next page button from page 1 in a web table.
How can I write a loop on to find the element in each page , if not found in ...
2
votes
3
answers
4k
views
Chrome Version 128.0.6613.85 Web driver issue
I have chrome browser of Version 128.0.6613.85 and i want to download the correct webdriver for it.
I checked the official webdriver website but i can't find the correct version for it. i want the ...
0
votes
0
answers
13
views
Getting "Unhandled endpoint" error while trying test scenarios on appium for iOS and Timeout error for Android
I am trying to run my test scenarios on iOS as well as on Android but all the tests are failing on the login step. I will share screenshots of my error as well -
iOS
Android
I am running the appium ...
0
votes
0
answers
20
views
DataGrid MUI and React Testing Libray - Test failed
I've created a react component on my app using DataGrid MUI component. I would like to test this component using React Testing Library. After executing my test, I've the following error :
MUI: ...
0
votes
0
answers
22
views
Assertion Error while writing tests for SQLAlchemy code in Python
I'm trying to write some tests for a function, but I'm hitting some roadblocks.
The function that I'm trying to test has the following code:
async def delete_client_from_group(group_id: int, client_id:...
0
votes
0
answers
31
views
android studio api 34 update google play app
There is a mobile application developed with Flutter. I changed the sdk targets in the build.gradle file and the application version code in the pubspec.yaml file without updating the Flutter version.
...
-1
votes
0
answers
41
views
Cucumber features are no longer detected by the CLI following an upgrade
I have a Java project which I test using a Cucumber CLI. I recently upgraded my Cucumber to 7.3.0 from 6.8.0:
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>...
0
votes
0
answers
16
views
failed to copy: unexpected status from PUT request to (url): 400 Bad request
I am trying to push a simple image to the docker hub but i am getting this error
Can any one help me to fix this error, i didn't understand it.
i tryed to restart the docker desktop, changing the WIFI ...
-1
votes
0
answers
21
views
TypeError: Cannot destructure property 'setUserId' [closed]
The Login Component logs in successfully and sets userId in context
Now, the problem is
Cannot destructure property 'setUserId'
after I use npx jest path..
TypeError: Cannot destructure property '...
2
votes
0
answers
31
views
How to run pytest.playwright tests on a dash app wtith multiple simulated users as load test
I'd like to test my minimal dash app:
from dash import Dash, html, callback
from dash.dependencies import Input, Output
import dash_bootstrap_components as dbc
from time import sleep
app = Dash(...
1
vote
0
answers
69
views
How to test that my app invokes proper handler for various HTTP requests
I have an app that invokes different handlers for different URL paths. Say, something like that:
mux := http.NewServeMux()
mux.Handle("/someURLpath", someHandler)
mux.Handle("/...
-1
votes
0
answers
27
views
How to test if type is correct with Vitest?
Using Vitest, I want to assert that my value satisfies a type. To do this, reading Vitest doc, I wrote expectTypeOf(value).toEqualTypeOf<myType>(). However, this test always passes even if the ...
1
vote
1
answer
19
views
global variable returns NULL value after upgrading the karate version from 1.4.0.RC3 to 1.5.0.RC4
We have a feature file in which we declared a global variable to use across different scenarios within the same feature file. It was working well until I upgraded my Karate version from 1.4.0.RC3 to 1....
0
votes
0
answers
23
views
How to setup test resources correctly to read them in a Scala-Cli project
I use munit and scala-cli in a small Scala 3 project
In a test I want to read a resource. Under the project root the resource is at the path:
src/test/resources/testResource.txt
The Scala file of the ...
0
votes
0
answers
71
views
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure in windows10
I am using jdk-22 with the same web driver & chrome driver v128.0.6613.84 with CFT with last selenium v4.23.1 but still have this problem
Exception in thread "main" org.openqa.selenium....
1
vote
1
answer
23
views
Angular's httpClient.get hangs if called from Mocha unit testing with async / await pattern
I have a simple API call inside a service:
async validate(videoId: string): Promise<YoutubeValidationResult> {
try {
const response = await lastValueFrom(this.httpClient.get<{ ...
0
votes
0
answers
32
views
django.urls.exceptions.NoReverseMatch error while trying to use reverse [duplicate]
I have a problem with reverse function in Django. In my project I have an app called posts and I am trying to test it.
class PostListViewTest(TestCase):
def test_future_post_list(self):
...
0
votes
0
answers
17
views
Can I use CppUTest with QT Creator's libraries?
I want to use CppUTest in my project which I developed in QT Creator. but there are some problems like:
I can't test signal and slot because of meta-object compiler (moc) file.
Some functions (exp: ...
0
votes
0
answers
38
views
useState not updating on test using vitest for react
As I was setting up my tests for the code, I got stuck that I can't fully understand.
My vitest log asks me to put my button click inside an act(), but it breaks by doing so. I don't fully understand ...
1
vote
0
answers
38
views
Hide or disable .net runtime for testing purposes
Can you please give some advice on the next question: recently we moved our .net application to self-contained deployment. Before it was framework-dependent. Now we are thinking about testing this ...
0
votes
2
answers
361
views
Facing issue while migrating Jest@26 to Jest@27
I'm trying to migrate Jest from version 26 to 27 in my Next.js 13 project but facing the following error while running test after updating to Jest 27 version -
FAIL src/__tests__/app.test.tsx
● ...
0
votes
0
answers
10
views
Drizzle sql operator doesn't match expect.anything() in vitest
This test
expect(dbMock.where).toHaveBeenCalledWith(
gte(messageFeed.timestamp, expect.anything())
);
fails for this:
.where(
gte(messageFeed.timestamp, sql`now() - interval '1 day'`)
)
but ...
0
votes
0
answers
21
views
How can write a test for server side data fetching in react Ag-grid?
I am using react ag-grid library and looking to write a unit test for server side data fetching.
As it is clear in the following code, the getRowData is defined at userOption(gridOption) and then ...
0
votes
0
answers
25
views
Puppeteer- why did my dropdown locator not working?
I have this dropdown on my page
<select class="form-select">
<option disabled="" value="none">Choose Option</option>
<option value="value-1&...
1
vote
0
answers
48
views
Playwright best practises
I'm using Sveltekit in combination with sortablejs to make a chrome extension that manages browser windows/tabs, similar to tab manager plus. To display the windows/tabs I use sortables which are ...
0
votes
2
answers
45
views
Java Maven test/java - the same class names in different packages
What is the root answer of a question when I'm trying to create two different classes with the same na,es but in two different packages in test/java branch for Maven project.
src/test/java/home/...
-1
votes
0
answers
30
views
Testing Data Transfer Objects (DTOs)
I'm writing unit tests for a NestJS app using Jest and am wondering whether it's necessary or beneficial to create unit tests for DTOs (Data Transfer Objects). Are there any pros and cons to testing ...
0
votes
1
answer
41
views
CAPL Test Case for Monitoring CAN Signal Over Time
I'm trying to write a CAPL test case where I need to monitor a CAN signal BM_State under specific conditions for a duration of 7 seconds. The scenario is as follows:
I want to start monitoring when ...
0
votes
1
answer
37
views
How to run a testcase always at first in playwright [closed]
In my playwright framework, I am currently using storagestate which stores the login details of my application in a json file and after that all other testcases make use of this stored info.
I want to ...
-1
votes
0
answers
23
views
Spring Boot Application fails tests in Gradle because of exception in PropertyPlaceholder
My application is on SpringBoot of 2.5.9 and Gradle of 7.4 version. I have a very simple test:
@SpringBootTest
@ExtendWith(SpringExtension.class)
@TestPropertySource(locations="classpath:...
-1
votes
0
answers
26
views
How to add validation messages from API responses when testing in Mocha, Java
How do I add the api response in the below tests. So I am trying to validate 4 columns. I got the test to pass and it validates that we should get a 422 Reponses as those columns are missing that is ...
-2
votes
1
answer
41
views
How to mock the behavior of FileReader while doing Unit testing in Junit5
I have a service class which tries to read the content of CSV file and saves it to Database.
I am trying to mock this behavior in Junit 5 and whatever I pass I am just getting error message as ...
0
votes
1
answer
49
views
How to override PostgreSQL's now() function for testing?
I'm working on a project that heavily relies on timestamp-based operations, and I need to write some tests that involve the now() function in PostgreSQL. For testing purposes, I want to be able to set ...
0
votes
1
answer
19
views
Exporting Test results from Test Explorer Window in Visual Studio 2022
Is there a way to export the test results that appear in the Test Explorer Window? I know a test results file is created for each test run, but the test explorer window gives me a full picture (for ...
0
votes
0
answers
10
views
how to write code for loggers in selenium with java and captured loggers to file in testing
This is Automation Testing(Selenium With Java)
I have written the code for loggers.And i try to generate log folder,but i was not created log folder and log files is not saved it.
This is maven ...
0
votes
1
answer
40
views
Query SQLite Database in Android test with Room
I am writing an app that has a form where the user enters data:
Column {
TextField(
label = { Text(text = stringResource(id = R.string.brand)) },
value = state....