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.

0
votes
0answers
4 views

Testing a fs library function with Jest/Typescript

I am trying to test a library function that I have written (it works in my code) but cannot get the testing with the mock of the fs to work. I have a series of functions for working with the OS ...
-1
votes
1answer
5 views

Performance testing in neoload

I am new to performance testing and I have a scenario in which there is an interviewer login in into the application and conducting an interview with the client.the candidate has to login at the same ...
0
votes
0answers
9 views

GoogleTest tests declare in separate library

I have a lot of auto-generated tests using the GoogleTest framework. Currently each test is in a .cpp file which is included in a larger "Tests.cpp" file, which is then included in the main file. When ...
0
votes
1answer
8 views

Kerning issues with headless chrome

Running some selenium tests that involve screenshot based assertions and running to the following issue: For some reason headless chrome (v69 on ubuntu 16.04) screws up kerning and as a result the ...
0
votes
0answers
7 views

Groovy/Grails Proliferation of “\” escape character in a string

This is a rather odd issue. I'm integration testing a Grails service and the associated domain class. One property of that domain class is a String that holds a JSON. The database field is json too ...
-1
votes
0answers
13 views

How can I perform unit test on my ES service?

I would like to perform unit tests on my service, that basically searches data in ES cluster using ES client. How to do this? Could anyone provide any example? I found that I should use ESTestCase ...
1
vote
3answers
40 views

What use is @TestInstance annotation in JUnit5?

Could you give a simple explanation of @TestInstance annotation and how it could be useful in JUnit 5? I think we can achieve the same effect probably by making our fields static.
0
votes
0answers
3 views

How to send A/B testing fields in click stream events

I have a lot of production clickstream events and would like to do A/B testing on some of the features. Right now I sent each feature value in a separate column in my click stream events which I think ...
0
votes
0answers
7 views

Is there any way to find the elements in xcode UI testing, similar to that of appium?

I am new to xcode UI testing. I need to check whether an element appears on the screen and remains there for 5 secs. How can I do that?
0
votes
0answers
12 views

Setting default url on Safari Launcher

When I run automation on appium on ios12 then browser default navigate to url (appium.io). And next navigate to URL that I had assigned. At this step, driver error appearance. How I can fix them. Have ...
0
votes
1answer
15 views

How to use docker-compose to restore fresh databases quickly for integration tests?

I would like to run integration and end-to-end tests with a database in a known state for each run, to make the tests independent and repeatable. An easy way of doing this is to use docker-compose to ...
0
votes
1answer
9 views

Android, Espresso - Activity stops before whole test is finished when run as part of :app:connectedAndroidTest (runs fine in isolation)

I apologise if this is a bit too vague here, but I'm not allowed to post my whole actual code. All I can say is I have a problem running this test as a part of ./gradlew connectedAndroidTest @RunWith(...
1
vote
1answer
13 views

Validate array within an array case with BDD karate

Using the karate bdd plugin for automated testing cases along with cucumber. Facing a trouble validating an api structure having an array list within an array. How to validate the valuesets array in ...
1
vote
0answers
13 views

Can't see .Net Core bitbucket pipelines test results

I finally managed to make reports of my tests in bitbucket pipeline by this command: - dotnet test MyTests --logger "trx;LogFileName=test-reports/results.xml" Build Teardown says: Found matching ...
0
votes
0answers
5 views

Wildcard parameter when using “expects(x).with” in Mocha testing

I am using Mocha testing in a rails application and am attempting to test a method that takes 3 parameters. I want to verify that two of those parameters are what I expect however I don't care about ...
0
votes
0answers
10 views

@Import vs @ContextConfiguration in SpringBoot application tests

Just find out that @Import annotation could be used in unit test of spring boot application to load configurations which are needed for the test. My question is about how correct this approach is. Is ...
0
votes
0answers
4 views

Can we create a “Problematic Tests” tab for a Teamcity build that execute functional tests?

I'm trying to add a new tab "Problematic Tests" (like Report Tab) on the Build menu (with Overview, change Log, Statistics,...) The build run tests on a remote machine then it display results on a ...
0
votes
0answers
16 views

Puppeteer horizontal scrolling not working

I am not able to scroll horizontally using puppeteer, neither left to right nor right to left. Here is my code: horizontal scroll code view of scroller
1
vote
0answers
9 views

Unrelated warnings when testing Drupal 8

I have a simple module written for Drupal 8. It contains a dummy test, that I use to understand the basics of the framework. <?php namespace Drupal\loremipsum\Tests; use Drupal\simpletest\...
0
votes
0answers
17 views

selenium unit testing is not working with simple usecase

I am a devloper who is trying to do some automation testing I have choosen selenium-webdriver with mocha to achive it I got sample as shown below var webdriver = require('selenium-webdriver') // ...
0
votes
1answer
19 views

Integration test React+Redux

I am trying to test my simple component (previous toggle, today named Switch in material-ui library). I have this wrapped into: class AutoRefreshSwitch extends React.Component { constructor(...
0
votes
1answer
16 views

How to test websockets (gateways) containing exception filters in e2e testing

Problem Exception filters does not seem to be used at all when doing E2E testing on a gateway Code some-gateway.e2e-spec.ts import { INestApplication } from '@nestjs/common'; import { Test } from '...
3
votes
1answer
23 views

Using jest-each for dynamic data testing

I working on React credit card input component. I need to test credit card numbers by brand type using jest-each. Existing code works but need to replace it with jest-each for dynamic data testing. ...
0
votes
0answers
34 views

Do I need Mocha if looks like pure JS is enough for me?

I am developing a WebExtension for browsers, and I want to start TDD. Usually, folks without experience in testing of client-side JS just google for a popular framework and stick with it - even ...
0
votes
1answer
24 views

Spring Boot 2.0 Integration Test for JmsTemplate

I have a very simple MessageHandler class that thanks to Spring Boot works at runtime with just the following lines of code and config: msg handler @Component public class MessageHandler { @...
0
votes
0answers
17 views

Separate tests in groovy

I want separate some maven tests in groovy and i have this syntax: stash includes: 'Tests/**', name: "tests" stash includes: 'p2/blabla/site/**', name: "extensions_p2" stash includes: 'Maven/...
1
vote
0answers
9 views

Testing API with Swagger/OAS

I've spent some time documenting an API with Swagger/OAS 3. I want to validate our current API conforms with the OAS 3 document. How can I do this?
0
votes
0answers
3 views

No tests found in long file path name VSTest

I run a CI pipeline on jenkins with VSTest running our Unit Tests and Integ Tests, the machine is Winodws Server 2016 and we have enabled the long filepath option in the registry.. My question is has ...
0
votes
0answers
17 views

Creating a generic UI in React that wraps UI library

I will give a real-life example to give an idea of the problem I am trying to solve. My team was responsible for a React app that was built with Semantic UI as its UI library. Here is a list of tests ...
1
vote
3answers
84 views

How to create a race condition in C++

I want to test some Object's function for thread safety in a race condition. In order to test this I would like to call a function simultaneously from two (or more) different threads. How can I write ...
0
votes
1answer
18 views

CMake: target “test” doesn't build tests, target “all” does

I created a command-line portable script-based industrialized agnostic build system useful to quickly build several dependent projects while not having to rely on a particular IDE or a build factory. ...
1
vote
2answers
20 views

What does this statement mean “Cypress commands do not return their subjects, they yield them”?

I'm learning about Cypress.io and came across this statement in their official site Cypress.io "Cypress commands do not return their subjects, they yield them." What is the difference between "...
1
vote
0answers
13 views

JavaScript Jasmine Framework how to write a Test to Fail case

I have done testing of software with 'Test to pass' cases and 'Test to fail'. Test to fail cases are very important for developing good software as that is where most of the bugs come from. I am ...
1
vote
0answers
44 views

How to know the current url when using MemoryRouter

I'm trying to figure out how to use a test to assert what the current location pathname is. As an experiment and based on some docs I wrote the following test test(`Can navigate MemoryRouter`, (...
0
votes
0answers
25 views

Forcing input of an element through Java Script and Robot Framework

I'm trying to test a checkout page that contains credit card details. I'm using Robot FrameWork in pycharm to write automation scripts. A simple ; Input text Xpath doesn't really work The ...
0
votes
1answer
22 views

toHaveBeenCalled() returns undefined

As far as I understand, the .toHaveBeenCalled() Matcher of jasmine returns a Promise which is resolved when the function has been called. Actually for me, it returns undefined: it('should show the ...
0
votes
1answer
25 views

Uncaught Error: Uncaught (in promise): Error: Cannot match any routes

First, sorry for my bad english :) I started the code for just 6 month on React and now on Angular. I'm going to build a SPA with Angular 6 in front and NodeJS in back. It's not already done, but ...
0
votes
1answer
22 views

PACT.io: Getting Missing requests error, when running npm run pactTest

Test Repo created: https://github.com/leongaban/pact-io-js-test Expected Run npm run pactTest which will create a Pact file for my TotalPayout.test.pact.ts file. Results D, [#38238] DEBUG -- : { ...
0
votes
1answer
30 views

Testing an isolated function of a component in React Jest

I am fairly new to Jest and Enzyme and I stumbled a cross a problem: I have a Component which renders Children and also calls a method of those children. I achieve that by using refs. I call these ...
0
votes
0answers
22 views

PyTest Matplotlib Figure Appears on Show

I have a complicated method called plotter() which processes some data and produces a matplotlib plot with several components. Due to its complexity I simply want to test that the plot appears. This ...
-1
votes
0answers
6 views

pintos 'alarm-multiple' test stops suddenly

i'm doing pintos project 1 alarm clock. To test it, make in pintos/src/threads/bulid and run pintos -v -- run alarm-multiple I got my result however, proper result is: proper result In my case, ...
0
votes
0answers
18 views

Java Eclipse Android testing - Tap doesn't work, imports are not recognized

I am trying to use TouchAction for testing Android Java Eclipse. However, for some reason, Eclipse doesn't recognize tap and tapOptions. In the following code: package tests; import java.net....
0
votes
1answer
29 views

Laravel | Testing

I'm writing a http test for laravel 5.6. After test I've got a warnig "Test code or tested code did not (only) close its own output buffers". In a tested method I have a Mail send method. I've ...
1
vote
0answers
26 views

Pytest Tkinter Messagebox

My program generates an Alert / Message Box using the code below. import tkinter as tk from tkinter import messagebox root = tk.Tk() root.withdraw() messagebox.showwarning('End of Data', "You have ...
0
votes
0answers
18 views

Soft assertions in javascript

I have two backend projects P1 & P2. Data from P1 has to flow into P2 after some processing via a middleware. I am writing this middleware and I have to create an E2E testing module. I will have ...
0
votes
1answer
21 views

Routing Error in feature testing with RSpec

I'm working on a Project and trying to write some tests for it. At the Moment i'm doing the feature tests. The Problem: I just can't use visit. Doesn't matter where i am using it. I receive the error: ...
1
vote
1answer
14 views

Jest unresolved promise do not fail

Jest docs says: Unresolved Promises If a promise doesn't resolve at all, this error might be thrown: (and so on) In my case this not happen. I have this test: test('detect infinite loop', ()...
0
votes
0answers
27 views

CakePHP 3 + Codeception

I try to use codeception testing framework with cakePHP. I installed this plugin via composer: https://github.com/cakephp/codeception I was able to run "vendor/bin/codecept bootstrap" and it created ...
0
votes
0answers
16 views

How to verify Image in Coded Ui test?

I am new to coded UI test, Here my Problem is i want to validate Image, Is it possible to validate Images in coded UI or Not ? here i want to Validate tick mark. i attached Snapshot also. Could any ...
0
votes
0answers
9 views

listenglobal renderer event trigger in angular 6 testing script

I want to test my RolesComponent listenGlobal Renderer method. RolesComponent code below. import { Component, OnInit, Renderer, AfterViewInit } from '@angular/core'; import { Router } from '@angular/...