Category "testing"

How can I connect twice to db in Cypress tests?

I need to connect to my db (Postgres) twice during autotest - at the beginning to truncate and at the end to select a new note from the table. I tried to do it

Click with waitForEvents cause Timeout error when using Gauge and Taiko

I'm using Gauge and Taiko (v1.3.2). Gauge version: 1.4.3 Commit Hash: f98dd40 Plugins: html-report (4.1.4) js (2.4.0) screenshot (0.1.0) I have a form that ha

When running Swing application with the Spring Framework, Unit tests do not work

I am developing a project through the spring framework. I am using JUnit to run unit tests, swing for the GUI. When I run the system, the GUI opens and I can ac

VSCode: how to interrupt a running Python test?

I'm using VSCode Test Explorer to run my Python unit tests. There was a bug in my code and my tested method never finishes. How do I interrupt my test? I can't

How to use mocks in tests with Adonis 5 (adonisjs/fold package)?

I have an API built with Adonis 5 (core version 5.4.0). The tests are made with Adonis' own runner, japa (version 3.1.1). As per the Adonis documentation, I bui

How to test specific hSpec property using `--match` and cabal

I have a bunch of test modules and I can run a specific one using cabal test. cabal test Module.Name.Here The module contains many tests and one of them fails

How to assign new value to a ModelForm field which form edits user data, to test if the data will be edited Django test TestCase

I'm testing Django forms handling and trying to test a ModelForm, which form edits the user's data. I tried to write the test in several ways, but each one thro

Browser is crashing in CI after updating chrome to 100. I see error ERR_INSUFFICIENT_RESOURCES in the browser log. We are using webdriverIO v6

Browser is crashing while running tests in CI after updating chrome to 100. I see error ERR_INSUFFICIENT_RESOURCES in the browser wdio log. We are using webdriv

Testing Reactive Forms in Angular with Karma

I am testing a function that has a reference to a form in it (this.form), so when I try to test it I am wondering how I can mock that form so the function has a

How can we monitor the data for test execution on different nodes in a distributed execution on Selenium grid setup on local VMs?

I need some help on the below query: Currently we are using local VMs for Selenium grid execution. (Migration is happening from Selenium 3 to 4 but currently Do

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