unit-testing Questions

2

When I run single test with go test -run TestNewProbeServiceIsSingleton it passes as expected. Problem occurs whenever I am trying to test the whole package/app using go test ./... from my project'...
Marta asked 2/8, 2020 at 11:34

4

Solved

The python unittest runner handles all exceptions. I would like to catch them with my debugger. Is there a way to make my unittest runner re-raise tests exceptions to terminate the process? I want...
Monoplane asked 29/12, 2012 at 11:48

3

Solved

I'm setting up the tests for my web application, which works with the Vue framework with TypeScript, using the Jest framework. Everything seems to work alright, except with the @ symbol in my impor...
Helvellyn asked 2/7, 2020 at 8:18

6

Solved

So I am getting this error in my Spring boot Gradle project: 'java.lang.AutoCloseable org.mockito.MockitoAnnotations.openMocks(java.lang.Object)' java.lang.NoSuchMethodError: 'java.lang.AutoClosea...
Kaveri asked 7/5, 2021 at 9:13

4

Solved

I have a component A that use a component B,c,D in its template: ###template-compA.html <comp-b></comp-b> <comp-c [myinput]="obj.myinput"></comp-c> <comp-d ></...
Bes asked 22/3, 2017 at 11:35

6

Solved

I have an angular 8, that uses karma/jasmine to run some unit tests. I can run tests by executing the following command ng test but I'm getting the following error: ERROR in ./src/polyfills.ts M...
Morita asked 12/7, 2019 at 9:0

3

Solved

I follow the MVP pattern + UseCases to interact with a Model layer. This is a method in a Presenter I want to test: fun loadPreviews() { launch(UI) { val items = previewsUseCase.getPreviews() //...
Tantrum asked 16/4, 2018 at 19:42

4

Solved

I have the below http interceptor in my angular application and I would like to unit test the same using Jasmine. I googled some of them and tried but its not working as expected. Please find the b...
Distant asked 8/9, 2021 at 9:51

10

Solved

I'm just starting with TDD and could solve most of the problems I've faced on my own. But now I'm lost: How can I check if events are fired? I was looking for something like Assert.Raise or Assert....
Tetralogy asked 2/8, 2010 at 11:9

2

I'm trying to write a basic test for an Angular 2 web app which is attempting to check if my submit() function is being called when the submit button is clicked. When I do this it works fine both ...
Gorgias asked 3/10, 2016 at 18:22

9

Solved

"Run All" from "Test Explorer" does not complete (VS2017 Enterprise) anymore. It stalls with Passed (411), Not Run (309). The counts vary a little, usually roughly half and half. The output window...
Bill asked 4/6, 2018 at 18:23

7

The problem Hi everybody! First time asking question here, hoping for some help. I'm currently developing a Electron+Angular application and I'm finally preparing for testing all the services and c...
Brawn asked 15/7, 2020 at 12:39

2

I wrote some 'unittest' code, and it's great. I can see it on the CLI when I run it manually. Now I want to hook it up to run automatically as part of a merge to master hook on my repository. I hav...
Affra asked 20/7, 2018 at 21:51

11

Solved

When I try to run my Unit Test project, I get the following error: Could not load file or assembly 'ASSEMBLY_NAME, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies...

7

Solved

I have already visited Preferred Python unit-testing framework. I am not just looking at Python Unit Testing Framework, but also code coverage with respect to unit tests. So far I have only come ac...
Pagas asked 7/11, 2008 at 14:19

4

Solved

I want to verify that a mocked API is called with an object which does not contain a specific field. expect(api.method).toBeCalledWith(expectedObject); Since the actual parameters of the api.met...
Brush asked 14/3, 2019 at 10:16

3

Solved

I have different test folders(packages). I want to setup and teardown some data for a specific package(folder). The problem is set_up() is executed before running the test cases of that folder but...
Bohr asked 2/4, 2014 at 10:16

3

Solved

I'm trying to write a unit test for the logic within Vue's mounted() lifecycle hook, but not having much luck. The problem seems to be that mounted() never gets called when the component is mounted...
Custodian asked 10/5, 2018 at 17:49

3

Solved

I am writing unit tests for an MCU that communicates commands through the USB port and checks their response. If one unit test fails it makes sense for me to do some debugging in the MCU. Therefore...
Catalano asked 8/5, 2015 at 10:3

4

Solved

In a Unit Test (in Visual Studio 2008) I want to compare the content of a large object (a list of custom types, to be precise) with a stored reference of this object. The goal is to make sure, that...
Canton asked 13/8, 2010 at 10:0

3

Solved

I'm currently trying to create a Logger so I can inject it in Unit Tests. I'm following https://mcmap.net/q/109170/-how-to-unit-test-with-ilogger-in-asp-net-core, and it used to work! I then moved ...
Heartburn asked 22/1, 2019 at 21:0

3

Solved

In my Quarkus-Application an Observer of StartupEvent inserts default data into my database if a specific config-property is true. For one particular UnitTest I want my database to be empty. I wou...
Patriarchate asked 15/11, 2019 at 20:33

17

Solved

I have a test file that contains tests taking quite a lot of time (they send calculations to a cluster and wait for the result). All of these are in specific TestCase class. Since they take time an...
Syracuse asked 1/7, 2009 at 9:40

8

Solved

Python's NOSE testing framework has the concept of running multiple tests in parallel. The purpose of this is not to test concurrency in the code, but to make tests for code that has "no side-eff...
Misstate asked 17/1, 2011 at 4:57

3

Solved

I’m using Google Test to test my C++ project. Some cases, however, require access to argc and argv to load the required data. In the main() method, when initializing, argc and argv are passed to t...
Floatation asked 10/3, 2011 at 14:18

© 2022 - 2024 — McMap. All rights reserved.