Questions tagged [testing]
Software testing is any activity aimed at evaluating an attribute or capability of a program or system and determining that it meets its required results.
49,837
questions
0
votes
0
answers
7
views
Troubleshooting Vitest setup in vite.config.js with react-ts template
Adding 'jsdom' to vite.config.ts brings the following error:
No overload matches this call.
The last overload gave the following error.
Argument of type '{ plugins: PluginOption[][]; test: { ...
0
votes
1
answer
33
views
How do I return the function name of a class method being passed in as an argument?
I have a class called bio_seq with a class method called transcribe() and I am doing an exercise to create my own unit tests. I have created a function called unitTest() such as below so I have a ...
-1
votes
0
answers
24
views
Small test data (ML) [closed]
I have a small test dataset, ~2% of the train data. It is important to note that I cannot transfer my train data to the test (specific of my task*). As far as I know, it is incorrect to test the model ...
0
votes
0
answers
11
views
Cannot create POST in Postman
I was creating an API and testing it with post man when i started to make new products in it.
module.exports.create = function(req, res){
const newProduct = new Product({
name: req.body....
1
vote
1
answer
11
views
Writing Tests for a CLI that Creates Files and Directories
I am designing a Command Line Interface program, but I am unsure of how to test it
The program is fairly straightforward:
>>> my_cmd <name_of_file> <file_contents>
The program ...
-1
votes
0
answers
25
views
How to test method like this in proper way?
I refactored recently my project from using those two method directly.. and I wanted to test it somehow but I don't have idea how to do it:
public class TimeProviderService {
public long ...
0
votes
0
answers
21
views
Unit testing private methods
Several questions, such as Should I test private methods or only public ones? seem to encourage testing private methods through the public interfaces because:
You test the private methods, by writing ...
-1
votes
1
answer
22
views
How to perform AssertJ recursive comparison with strict type checking only on collection elements?
I would like to compare two collections using AssertJ with strict type checking. However, I only care about the strict types of collection elements not the collection itself.
For instace in the case ...
0
votes
0
answers
4
views
Call to odyx what id parameter
Does anybody use odyx and test automation together. While we have setup everything from projects and added testcases we don't find the correct testcaseid for in the call: tr/auto?tc=TESTCASEID&u=...
0
votes
0
answers
7
views
ng test in angular throws errors from the node_modules folder?
We have an application that has been in production for years using Angular. When we first started using Angular about 6 or so years ago we did not use any of the karma/jasmine testing tools. In fact ...
-1
votes
0
answers
30
views
How to test and play 350 to 9000 wav files stored in SQL server database through GUI of software written in C# dot net? [closed]
I have tested few wav files by playing it on software manually. But some components or wav files are huge in number with more occurrences in the software after selecting in the GUI. So it is difficult ...
-4
votes
0
answers
16
views
How to check the results of the automatic test [closed]
What plugin is better to use to check automation test results with python and playwright tool and what do you suggest?
How to check the results of the automatic test
Simultaneous review of several ...
-1
votes
0
answers
7
views
APIErrorException: (InvalidImageSize)
I am working on face recognition using azure face Api. I have two sets of data.
students data(contain one images of per student I have 100 students total)
cctv frames data(contains photos of cctv ...
0
votes
0
answers
21
views
How to catch exception with WidgetTester if 'EXCEPTION CAUGHT BY WIDGETS LIBRARY' in Flutter?
I want to verify that the widget can throw an exception.
I tried this code:
testWidgets('it fails other widgets if', (WidgetTester tester) async {
// expect(() async {
// await tester....
0
votes
0
answers
15
views
How to Test Scroll Behavior When Scrollbar Doesn't Exist with Playwright?
I'm currently working on automated tests with the page object using Playwright, and I have a function scrollDownAndUpOnboarding that's designed to scroll down and then up on a web page. However, I've ...
0
votes
0
answers
38
views
Android Studio: "Test events were not received"
While testing the test code, I got the following error: Test events were not received.
Android Studio version 2023.2.1.
Emulator API version is 33 and 34.
Based on what I have read, this error does ...
0
votes
0
answers
8
views
How to use Awaitility to repeatedly call a condition check with variable execution time?
I would like to use Awaitility to assert that a condition returns true within 30 seconds. However, the condition check itself takes a different amount of time (sometimes instantly, sometimes 5 seconds,...
0
votes
1
answer
15
views
How to use GDB to check where a function calls return?
I have a function called test_linked_list() that tests a data structure using a series of if statements. If a test fails it calls return 0.
// ie.
test_linked_list() {
if(!insert_end(l,10))
...
0
votes
0
answers
24
views
No tests discovered using cucumber runner
I'm getting an error message while running cucumber tests using gradle:
org.junit.platform.suite.engine.NoTestsDiscoveredException: Suite [features.selenium.runner.RunCucumberTest] did not discover ...
-1
votes
1
answer
29
views
How to assert two different expectations in playwright?
I'm testing for two different Text contents in playwright.
Once a user selects a particular option, I have to go back to the main page and check the text content.
I already have an if statement for ...
0
votes
0
answers
5
views
Anova and Dunn Posthoc test
This is a scenario of samples from 3 groups namely A,B,C. Each has 8,8 and 7 replicates respectively. I have grouped the data as follows:
group<-as.factor(c(rep("A",8),rep("B",8)...
0
votes
1
answer
62
views
Haskell interpreter, dont know how to run and test it
I am working on an interpreter as a project task, in order to understand what I have to do, I decided to download the interpreter from the Internet and run it. I started the specified folder in ...
-1
votes
1
answer
24
views
Not able to test subscribe method in angular
My ts file has a subscribe method in ngAfterViewInit() which is added below. So while writing test case and doing debugging its not coming inside subscribe method and setting that mock data. So for ...
0
votes
0
answers
34
views
.NET MAUI on jetbrains Rider: different statements in MauiProgram.cs when different launch configurations
I want to test my .NET Maui app, and for that, I use the Shiny.xunit.runners.maui library (github project).
This library requires some particular statements in the MauiProgram class, which replace the ...
0
votes
0
answers
9
views
Should I provide two "Then" in Cucumber in this scenario?
I am writing test cases in Cucumber and I have been wondering is this type of scenario ok to provide two then's.
I have a situation where after user does something in the app, let's say makes an order,...
0
votes
0
answers
20
views
Is it possible to duplicate pytest tests per provider of a fixture?
I have tests that are run on multiple platforms, each represented by a plugin (Python module included in conftest.py via pytest_plugins = [...]).
Multiple plugins can provide the same fixtures, and I ...
0
votes
0
answers
11
views
store.getActions() not returning actions
I am trying to test if actions are being dispatched correctly. I am using store.getActions(). It is working on one test but not in another.
store.getActions() is not returning any results in the ...
-1
votes
1
answer
23
views
UnnecessaryStubbingException: Unnecessary stubbings detected
I tried to test this:
package pp.spring_bootstrap.service;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pp.spring_bootstrap....
0
votes
1
answer
11
views
Storing aria-labels in seperate variable or enum for react components [closed]
I am wondering if it is good practice to store aria-labels for my react-components in a separate file and import them in my react-components and tests. This would guarantee that both react-component ...
0
votes
0
answers
22
views
Who creates instances I inject mocks into: Mockito or Spring? [duplicate]
I tried to test this:
package pp.spring_bootstrap.service;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import pp.spring_bootstrap....
0
votes
0
answers
14
views
Why I'm getting "Session ID is null. Using WebDriver after calling quit()?" exception in SeleniumWebdriver?
I'm getting "org.openqa.selenium.NoSuchSessionException: Session ID is null. Using WebDriver after calling quit()?" exception while I'm running my test cases.
My test class is like this;
...
-1
votes
0
answers
28
views
How can I understand that my processor, which I wrote with Verilog, is working correctly? [closed]
How can I understand that my processor, which I wrote with Verilog, is working correctly? Can I test this in any environment? I heard something like riscof. When I looked at it, I thought as if they ...
0
votes
0
answers
15
views
Mock a function in a streamlit app during e2e testing
I have a e2e testing framework for running my streamlit app but am having trouble mocking some functions that make SOAP requests. Where in my framework should I be adding the mocked function?
import ...
0
votes
1
answer
14
views
Getting the error - TypeError: (0 , _reactRedux.connect) is not a function
I am writing the test cases for a react file. Here is the react file.
import React, { useEffect } from 'react';
import Layout from 'components/Layout';
import Section from 'components/Section/section';...
-1
votes
0
answers
18
views
How automate ul and li with javascript? [closed]
I got a list which links on every items. I want to automate with javascript following actions :
-Get every items (li) of the list (ul)
-On each items, click on the link (li)
-On each pages where we ...
0
votes
0
answers
11
views
Pyautogui can not interate with "User-Consent" dialog
i encountered a Windows automation problem.
Background: I need to automated the vPro remote desktop E2E flow,the target PC will pops up a "User-Consent" dialog to choose if connect. I try to ...
0
votes
0
answers
13
views
Saved object to db doesn't persist across multiple fixtures in pytest
I everyone, I'm testing my django APIs with pytest and I want to test the login endpoint of my apis.
Hence, I need first to create a test user object and save it to db and then try to login with that ...
0
votes
3
answers
44
views
Importing a module from a higher directory in Python
I'm working on a Python project and I have a folder called Api structure that includes various modules and a folder specifically for tests. I want to include a Python file from api of the project ...
0
votes
0
answers
23
views
How to make gradle build fail when test case fails by changing build.gradle file?
I have written test code and build.gradle as the following.
The below test code fails when run but when I type ./gradlew build command, the build is still
successful. I would like to change the ...
0
votes
0
answers
12
views
Playwright Python Iframe not able able to locate and fill elements
THE DOM ModelPlaywright using python - I am trying to identify an iframe whose name and id are appended with text that is changing dynamically. I am trying to get the iframe and then locate and fill ...
-1
votes
1
answer
25
views
We are loading data from few APIs to s3 and then to datawarehouse using airflow [closed]
We are loading data from few APIs to s3 and then to datawarehouse using airflow, I was asked to prepare test cases. I am new completely new to testing. Can anyone suggest concepts I should be ...
0
votes
0
answers
33
views
JSON images not saving to file directory path from a mobile device but works from my computer [closed]
Im using a mac to work on a PHP web app where users can upload a profile picture, header photo or make posts with multiple photos. The profile picture and header photos successfully store as ...
0
votes
2
answers
38
views
Resetting the H2 incrementer
How do I reset the id incrementer in H2? Call it an XY problem, if you want, but my test fail just because the ids (GenerationType.IDENTITY) don't match. I clear the rows in @BeforeEach, but the ...
0
votes
1
answer
49
views
Can't inject into a static field in a test class
I tried to test this. Notice it's an interface so I was going to test the class Spring writes for me (as an exercise, I'm learning testing)
package pp.spring_bootstrap.dao;
import org.springframework....
0
votes
0
answers
14
views
Webdriver IO browser object function doesn't work in certain instances
I am trying to use the Webdriver IO browser.pause() function within my code. It works in certain parts of my code and not other parts and I have no idea why that is. FYI I am using Webdriver IO with ...
-1
votes
0
answers
20
views
How do install the playwright in the pycharm?
I use Playwright in the leather pycharm for test automation. When I try to install the Playwright package in the tool terminal, it gives an error message that it does not exist, but a previous layer ...
0
votes
1
answer
31
views
How to Make Mockito Verification of Varargs Match Actual Invocation?
I recently upgraded from mockito-core version 1.10.19 to the latest version(5.5.0). I've noticed a change in behavior when verifying a method call with a varargs parameter.
In the older version, I ...
-1
votes
2
answers
51
views
Do we need to perform the Accessibility testing on each browsers or just need to test on one browser is sufficient? [closed]
Do we need to perform the Accessibility testing on each browsers or just need to test on one browser is sufficient?
Do we need of browser compatibility testing in A11y? Please suggest.
Let me know ...
-2
votes
0
answers
9
views
Are there any good easy to use Testing Libraries for SIP Servers like FreeSwitch in python or JS? [closed]
I have written some custom functionalities in FreeSwitch and want to build an automated testing pipeline with a proper SIP phone. For manual testing I am using apps like Zoiper, but to write automated ...
0
votes
1
answer
34
views
Rust mocking `std::process::Child` for test?
I have an application that spawns a long running Child process. I want to test the logic of the application and the child struct is not really needed for this, I've looked at several mocking ...