Category "testing"

How to test a singleton generic template to be thread safe?

How do I make Singleton generic template, and how can I test it? Right now I am interested in seeing with my own eyes that 2 threads that invoke get_instance()

FastApi settings / dependency

I have a FastAPI app with pydantic settings instance reading and validation env variables: ### config.py from pydantic import BaseSettings class Settings(BaseSe

Cypress web sockets error: 'Sec-WebSocket-Accept' header is missing

I am trying to test a VueJs application with Cypress. Everything works well except the websocket connection that fails with the message: Error during WebSocket

Angular: Component is not resolved when using Speedy Web Compiler (SWC) for TestBed tests

The tests in my Nx Angular 10 repo have been running very slow so I decided to switch from using jest-ts to @swc/jest. jest.presets.ts const nxPreset = require(

How to set MySQL time?

I want to do some testing without changing records' timestamps nor queries. My queries have NOW() in them, and I don't want to wait. So is there a way to tempor

How to run @QuarkusIntegrationTest in a Gradle project?

I want to run a Quarkus integration test in order to verify OpenAPI yaml generated from the source code. According to the documentation, it should be possible t

Use unit-testing framework in matlab to test data

I would like to test datasets with a variable number of values. Each value should be tested and I would like to have a standardized output that I can read in af

Add attachments with ActionMailbox TestHelper

I want to test attachments with the Action Mailbox TestHelper. I see the options for the test helper get passed to the mail object but I can't seem to add attac

Flutter Widget test cannot emulate different screen size properly

Before deploying my Flutter app, I wanted to test it on multiple screen sizes to check if there is any Renderflex overflow for smaller screens. But I when first

ReactSelector can not access all components

i am new to React and Testcafe and have to write some end-to-end tests. I thougt, it was a good idea to mainly use the ReactSelector from 'testcafe-react-select

Testing UX with random IO?

So I've found a error in my UX that wasn't cought by test if I press besides a popup it goes into deadstate # they press ok btn = self.browser_adam.find_element

Jest test for a copy to clipboard method using react with typescript

I am trying to ensure that the right value is copied to the users clipboard when they click a button. This is my copy method. I am using a ref on the input to a

How to get React Testing Library's userEvent to type into an input

I can successfully implement a test with React Testing Library's fireEvent method, but when I try equivalent tests with userEvent I can't get it to trigger anyt

JMETER Performance Testing - Dynamic Payload

While doing performance testing via JMETER, I encountered one usecase where the POST request call is taking the dynamic data from the website. So in that case w

What is the best practice to Mock the whole API

Input: We have API-A and API-B. API-A sends some requests to API-B and do some work with received data. We have unit tests that verify work of methods that doin

How to unit test typeorm getRepository with Jest?

I am using typescript with typeorm and i have an repository like this: import { EntityRepository, getRepository, createQueryBuilder } from 'typeorm'; @EntityR

import the current package export by the package.json name

I'm interested to know if there's a convention that allows a person to test the expected usage of a package from within the package. Consider the following pack

Why is caplog.text empty, even though the function I'm testing is logging?

I'm trying to use pytest to test if my function is logging the expected text, such as addressed this question (the pyunit equivalent would be assertLogs). Foll

How should I do QA automation for the demo application on the Samsung Tizen Smart TV using Appium?

I have a Samsung T4 Tizen Series real smart device. I want to write a sample application for automation testing on it, so how to do that using Appium or any sim

Behavior-Driven Development(BDD) Testing with Fast API python web framework

I want to write BDD test cases for the Fast API framework where I have written some REST API. Though for normal test cases Fast API mentioned pytest package. Ba