Category "testing"

Laravel 8 http testing error Failed asserting that two strings are equal

I want to test the endpoint Sign Up (you can consider signup as registration), and at the same time I want to return the response object and redirect the user t

How to reset a method mock in Spock?

I had a mocked bean in a configuration: @Profile('test') @Configuration class TestSecurityConfig { private final mockFactory = new DetachedMockFactory() @Pr

Custom data type wtih Mockaroo

I am trying to generate mock data with Mockaroo and need a simple data type that is unfortunately not inside Mockaroo's built in available data. It is very simp

Parse Content Disposition header in GO

I am trying to retrieve the filename from this http writer for testing purposes. On the server I have: func servefile(w http.ResponseWriter, r *http.Request ) {

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