Category "testing"

MockMVC - Service method does not appeared to be called, works in postman, responding with null for test

I am trying to test the controller for creating a new league method, but it just returns null, and when I put a system.out.println in the service impl method, i

How to test a component that has a conditional to be displayed?

I am trying to test a component with jest and react-testing-library that contains a conditional to be displayed. export default function CloseCollaborator

Kotlin Coroutines Unit Testing

Im trying to test this suspend function: suspend fun <T> getResult(call: suspend () -> Response<T>): Resource<T> { val response = call()

Is there a way make tests Flask and Firebase?

I have a Flask app. Authentication is provided by Google Firebase. I want to make url tests with any Python/Flask libraries? Is there a way? For example: /api/g

Is there any way to mock API responses using snapshots?

I'm currently trying to find a good way to mock API responses for a subset of end-to-end tests, and was thinking it would be swell if there was a way to take sn

Run assertions directly in browser context in Playwright

I would like to test some apis which are tied directly into browser and not necessary have UI representation. Simpliest test beeing something like: import { tes

check if text is bold

I am testing the output of a search and I want to be sure that I will get the text and that it would be bold. For example I want the name to include "ar". As an

extracting html element Id or xpath using computer vision

I am working on automating an inhouse automation testing software for my firm, I need to extract the X-path, or id of an HTML element when the tester clicks the

Library functions in Inspec Test

Team -- I have a ruby library helper in which I have defined multiple functions/methods. How do I reference those in Chef Inspec tests? def interface_name # s

How to test a DatePicker component using Jest?

Here is the component to test, its a DatePicker component: import { useState } from 'react'; import { useFormContext } from '../Form'; import Textbox from '../T

How to test a function inside useEffect with Jest and Enzyme?

I am testing my components using jest and enzyme. I want to load my component when the whole page is loaded so I am using load event inside useEffect, here is m

Gatling EL not getting replaced in ElFileBody

I'm very new to gatling performance test and i'm trying to write one simulation for our service. I'm using gatling 3.7.6 version. I have below request json for

How to test webflow website without publishing

My client built the website using webflow but there is a bug in there. I tried to find a way to test the code (console.log etc) but seems like the only way of d

Select subset of test cases from all possible combinations

Let's say I'm writing a lifespan prediction calculator that takes in ~40 inputs: sex = ['Male', 'Female'] smoking_status = [True, False] ... Eventually, there

Test react custom hook with mocking blob response

I have a created a hook as following: import { AxiosResponse } from 'axios'; import { DEFAULT_EXPORT_FILE_NAME } from 'constants'; import { useRef, useState } f

provideMockStore with MockBuilder in ng-mocks

How to overrider the selector value in MockBuilder provided with provideMockStore In general with Testbed beforeEach(() => { TestBed.configureTestingModul

Mockito+Kotlin+SpringBoot, `when` section doesn't mock, but invoke method meant to be mocked

I'm trying to modify existing test of kotlin+springboot project. Mockito.`when`(serviceA.getData(anyString())).thenReturn(data)// existing mocking Mockito.`when

Running a single test in WebStorm using Jest

I'm trying to run single test in my project. However every time I use triangle run icon WebStorm creates new configuration for me. I'm adding screenshots to cla

Test verifications on embedded Spring LDAP server

we are using the default embedded ldap server in spring for our integration tests and configured it as follows: spring: ldap: embedded: base-dn: dc=

Cannot get React testing Jest-DOM to select a date from a date picker or time from a time picker

I cannot, for the life of me, figure out how to get Jest-dom in react testing to select a date picker and the same for the time picker. All my other fields are