Most voted "testing" questions
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. There are more specific tags for types of tests, prefer them.
Learn more…228 questions
Sort by count of
-
0
votes1
answer31
viewsApply filter to a list returned by a mock
Good night! I have the following scenario: A concrete class called Usersservice, which receives by injection of dependencies the repository through an interface and a notifier. She gets like this…
-
0
votes1
answer80
viewsTesting a cron-job with JEST
I have a javascript class that contains a function which initializes a cron job. To perform cron-job I used the Node-Cron library. But I can’t find a way to test the class and function. The…
-
0
votes1
answer50
viewsHow to create a test for a function with a service inside?
I have the code below and managed to create a test for it, when it enters error 400 and 200. However, I can’t get the test to enter the catch. I’m using Mocha and Chai. myController.approve =…
-
0
votes1
answer80
views -
0
votes0
answers19
viewsHelp Test Controller Angularjs and Jasmine
Good morning guys, I need a help to do the unit test of a controller with Jasmine, my problem is that I need to cover the methods of this controller and I am not able to do the right way to get…
-
0
votes0
answers16
viewsGatling/Scala: Returns error in Jsonpath - Extraction Crashed: end of input expected
Hello! I’m new to Gatling/Scala and the scenario is as follows: I need to make a request in an API and use the Response data in a new call, which is the load itself. However, Gatling returns the…
-
0
votes0
answers38
viewsHow to test a saga function by mocking a generating function?
So far I haven’t found an efficient way to test the sagas of my "start" function with the redux-saga-test-plan along with Jest. I already tried to fuck the function fluxo, but I did not succeed. My…
-
0
votes0
answers18
viewsjest mockImplementation does not work in React navigation (React Nactivate)
I have the following code: jest.mock('@react-navigation/native', () => { return { useNavigation: mockedNavigation, }; }); ... it('should pass the test', async () => {…
-
0
votes0
answers29
viewsLaravel Dusk and Select2
I am working with Laravel 8 and for the screen tests I am using the Dusk (https://laravel.com/docs/8.x/dusk). On one of the screens I have a Select2 with the property "tags" enabled…
-
0
votes0
answers13
viewsProblem accessing multi-select with Selenium webdriver and Java
Hello everyone, I’m trying to access as shown in the image, a multi-select, which is in the yellow list, in ul and li, an option of Languages: Arabic, Bulgarian etc., and when selected, it goes to…
-
0
votes1
answer23
viewsERROR Nullinjectorerror: R3injectorerror(Dynamictestmodule)[Kdsdialogservice -> Matdialog -> Matdialog]: Nullinjectorerror: No Provider for Matdialog
I am doing unit testing in an application of mine. I am beginner regarding testing, so I need your help. In my application I do a service using Matdialog ( Kdsdialogservice). I have tried putting…
-
0
votes1
answer36
viewsWays to directly test an internal function
Suppose we have the following closure function and would like to test the internal function with Jest. First-hand closure function made by me: function ModuleCharacterCounter() { function…
-
-1
votes2
answers160
viewsUnittest Django Views: I can’t log into the system by unittest
I need to give a post in a "request creation" view of mine, but when I try to give the post, I am redirected to my login screen, I am trying to log into the system to then give the post in this…
-
-1
votes1
answer126
viewsandroid - Unit testing and UI testing
Good morning friends, lately I have seen some videos and blogs on the subject, and wanted to know who usually works with tests if it is really worth using tests on Android dev. And if so, which…
-
-1
votes2
answers718
viewsClear() and Sendkeys() in a single method
I have the methods clear and sendKeys and wanted to "colapsar" both in one, WebElement user = webdriver.findElement(By.id("username")); user.clear(); user.sendKeys(username); WebElement passw =…
-
-1
votes1
answer192
viewsTest Automation (Slow down running speed)
How to slow down testing in katalon Studio?
-
-1
votes1
answer221
viewsHow to validate if ternary operator was used in the implementation?
I want to validate through the TDD if in the implementation was applied ternary operators. How can I measure this situation? def par_impar(x): return "impar" if x % 2 else "par" Or this other?…
-
-1
votes1
answer368
viewsExtract a text from a <td> with Selenium + VBA
I am trying to extract the 'PRESI-VALEC' value from this element in Selenium, I thought to use Xpath as follows: .Findelementbyxpath("//a[contains(text(), 'PRESI-VALEC')]/table/tbody/tr[2]/td[3]"),…
-
-1
votes1
answer71
viewsUsing CPF generator in Postman
I am performing several registration tests via Postman and I would like to know if there is any way to automatically generate a CPF in the POST body that I am sending. Who knows via Faker?…
-
-1
votes1
answer530
viewsmvn test giving error 'cannot find Symbol'
I have a spring-boot project and I am programming some tests using Junit, in Eclipse I ran the tests without having problems, however, in the terminal, while trying to execute the command mvn test…
-
-1
votes1
answer540
views -
-1
votes1
answer262
viewsValidation of the data itself entered in the field (character limit)
Suppose I have a field that has a limit of 15 characters. In my test i add 16 characters. How do I validate that they were entered only 15 characters in the field?…
-
-1
votes1
answer49
viewsMock and inject a service class at the same time
I have a spring test class that in some cases I want it to behave in the normal flow, that is, when it is done a findAll() hitting the repository it returns the value it selects from the embedded…
-
-1
votes1
answer66
viewsPython - Pytest Typeerror
I am assembling the pytest of the function calculate from the class Sum of a calculator, but as the function calculate receives an "object" as argument, it is giving error. Follows the codes.…
-
-1
votes1
answer25
viewsValue returns only true in JUNIT4
I’m trying to do a shooting sport procedure, at the time I will test, every time changing "posso_shoot.setIdentificar_target(1);", when the value and 1 returns true, that’s what I want, but when I…
-
-1
votes0
answers8
viewsasynchronous import to jest.mock to keep the simulation file separate and reusable for other tests
I am trying to make an import into my play simulation to use a separate file to play the same simulation in multiple codes. Simulation below: const listCache: Array = []; jest.mock('aws-sdk', ()…
-
-3
votes1
answer745
viewsI’m not getting a unit test
I have a problem to do a test method in this JAVA program. The method I devised was to verify that the wolf is dead. @Test public void verificaSeOLoboMorreAposCompletarAIdade(){ campo = new…
-
-3
votes0
answers26
viewsHow do I run Github Actions in the `deployment_status` event but only for the QAS Branch?
I need github actions to run only on the QAS branch and with deployment_event. At the moment I’m implementing in this way name: Cypress on: [deployment_status] jobs: e2e: if:…