Skip to main content

All Questions

Tagged with
0 votes
0 answers
92 views

How to implement threshold for JUnit tests

I have Junit tests which is invoked by a test class which is called TestRunner and look like this: @TestInstance(Lifecycle.PER_CLASS) class TestRunner { @ParameterizedTest(name = "{index} {0}...
Antonia Banderas's user avatar
1 vote
1 answer
49 views

Increasing test coverage for files I didn't write

I have written a python program that calculates various statistical values of a given list of integers and the range of values. Now, I am trying to write a test file for the program that can achieve &...
Austin's user avatar
  • 51
-1 votes
1 answer
181 views

Testing Pinia store with setup syntax - how to mock computed fields?

Anyone have idea how can I test Pinia store with @pinia/testing and vitest if I made store with setup syntax. When I use createTestingPinia, I am able to mock computed fields, but actions calls could ...
Ika's user avatar
  • 9
0 votes
0 answers
20 views

Testing flow of multiple Camunda workflows in a single test case

There are 5 camunda workflows all perform the same operations and have excatly the same behaviour except the names of the workflow. workflow 1 workflow 2 workflow 3 workflow 4 workflow 5 what i want ...
DIVYANSH SIDDHARTH's user avatar
0 votes
0 answers
34 views

My Coverage Tool in Intellij is giving me weird results

I have been trying to do a Coverage Test on my Scala code and it doesn't seem to want to work correctly My Code: case class Play( customerId: String, forename: String,...
Hayden McKenzie's user avatar
0 votes
1 answer
26 views

i trying to make a test on my flutter project

i trying to make a test on flutter with my tdd project but i got these error Bad state: No method stub was called from within `when()`. Was a real method called, or perhaps an extension method? here ...
Anas Sa's user avatar
0 votes
1 answer
161 views

Isolates & Testing in Dart/Flutter : how to verify a call inside an Isolate?

Situation: I have a class Repository that is responsible for retrieving raw data from the DB and mapping it. The mapping happens in an isolate because, being a synchronous operation but, because of ...
salim.elkh's user avatar
-4 votes
1 answer
67 views

Is there any way to use Cypress for unit testing functions? (React Framework) [closed]

I am trying to test helper functions of my application using cypress, but I am not sure if it is possible, or how I could make it work. I know cypress it meant to be used for e2e and component testing,...
Sam's user avatar
  • 3
-1 votes
2 answers
192 views

Are both integration test and unit test needed in all cases in Spring Boot? [closed]

I have a Spring Boot backend where i run integration tests for my controllers (endpoints) and unit tests for my service methods. For some endpoints there are just simple service calls that are ...
Cyrill22's user avatar
2 votes
1 answer
161 views

Testing .ts file with jest

I'm using jest to test my TypeScript code, but jest cannot recoginze the dependency ('lodash-es') that is imported from my code. Here is the error message: ● Test suite failed to run Jest ...
許勝翔's user avatar
0 votes
0 answers
32 views

uiState not updating in Tests

Does anyone have any idea why my uiState is not updated in the tests? The strange thing is that in the app running if it is updated, but when testing the viewmodel and send events does not update the ...
Marco Portacio's user avatar
1 vote
1 answer
107 views

Incorrect implementation of calloc() introduces division by zero and how to detect it via testing?

I had an assignment in which I had to write my own calloc function (as well as a few other Libc functions), the only built-in functions allowed were malloc() and free(). For context: the grading for ...
ismbks's user avatar
  • 25
0 votes
1 answer
57 views

type 'Null' is not a subtype of type 'Future<List<Job>> when unit testing a throw

i'm trying to unit test a method in my BLoC but i'm encountering a strange error: No matching calls. All calls: MockAlertBloc.add(AlertError(type 'Null' is not a subtype of type 'Future<List>', ...
Kevin Trancoso's user avatar
0 votes
3 answers
55 views

Pytest: When writing many assert statements in the same test function, some of it fails, but how to know which assert statement/s is causing failure?

Test file : from RansomNote import Solution def test_canConstruct(): sol = Solution() assert sol.canConstruct('aa', 'aab') == True assert sol.canConstruct('xx','aaabc') == True assert ...
PG23's user avatar
  • 1
0 votes
1 answer
15 views

Should I add the nupkg dependencies of the Assembly of the SUT to the Test Project as well?

I'm relatively new to writing unit tests. I ran into this scenario while writing unit test cases in .NET 8,for azure functions. Project 1 - ABC.Functions Project 2 - ABC.Functions.Test I have added ...
nandu's user avatar
  • 9

15 30 50 per page