-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manual testing of Release 2022.12.1 Part 2 #1862
Comments
Reproducing bug on mock/provider/ProviderImpl: |
New bugs found on mock/provider/ProviderImpl with Mock outside package settings found: |
Verified with Yuri - this is by design. The first call of constructor is the special case for algorithms/errors/Taxi class. ///region Test suites for executable org.utbot.examples.algorithms.errors.Taxi.runTest
///region SYMBOLIC EXECUTION: SUCCESSFUL EXECUTIONS for method runTest(int, int[])
/**
* @utbot.classUnderTest {@link Taxi}
* @utbot.methodUnderTest {@link Taxi#runTest(int, int[])}
* @utbot.iterates iterate the loop {@code for(int i = 0; i < length; i++)} once
* @utbot.returnsFrom {@code return findAnswer(length, groups);}
*/
@Test
@DisplayName("runTest: -> return findAnswer(length, groups)")
public void testRunTest_IterateForLoop() {
org.mockito.MockedConstruction mockedConstruction = null;
try {
int[] intArray = {};
java.util.concurrent.atomic.AtomicInteger mockClassCounter = new java.util.concurrent.atomic.AtomicInteger();
mockedConstruction = mockConstruction(org.utbot.examples.algorithms.Sort.class, (org.utbot.examples.algorithms.Sort SortMock, org.mockito.MockedConstruction.Context context) -> {
switch (mockClassCounter.get()) {
case 0:
(when(SortMock.mergeSort(any()))).thenReturn(intArray);
break;
}
mockClassCounter.getAndIncrement();
});
/* WARNING!!! Automatically used "Mockito static mocking" framework for mocking statics
because execution encountered flaky methods
To change this behaviour edit [Settings -> UtBot -> Force static mocking] */
Taxi taxi = new Taxi();
int[] groups = {1};
int actual = taxi.runTest(1, groups);
assertEquals(1, actual);
} finally {
mockedConstruction.close();
}
}
/**
* @utbot.classUnderTest {@link Taxi}
* @utbot.methodUnderTest {@link Taxi#runTest(int, int[])}
* @utbot.iterates iterate the loop {@code for(int i = 0; i < length; i++)} once
* @utbot.returnsFrom {@code return findAnswer(length, groups);}
*/
@Test
@DisplayName("runTest: -> return findAnswer(length, groups)")
public void testRunTest_IterateForLoop_1() {
org.mockito.MockedConstruction mockedConstruction = null;
try {
int[] intArray = {1};
java.util.concurrent.atomic.AtomicInteger mockClassCounter = new java.util.concurrent.atomic.AtomicInteger();
mockedConstruction = mockConstruction(org.utbot.examples.algorithms.Sort.class, (org.utbot.examples.algorithms.Sort SortMock, org.mockito.MockedConstruction.Context context) -> {
switch (mockClassCounter.get()) {
case 0:
(when(SortMock.mergeSort(any()))).thenReturn(intArray);
break;
}
mockClassCounter.getAndIncrement();
});
/* WARNING!!! Automatically used "Mockito static mocking" framework for mocking statics
because execution encountered flaky methods
To change this behaviour edit [Settings -> UtBot -> Force static mocking] */
Taxi taxi = new Taxi();
int actual = taxi.runTest(1, intArray);
assertEquals(1, actual);
} finally {
mockedConstruction.close();
}
}
///endregion
///endregion |
Retestwith the latest build from unit-test-bot/rc3102023 branch Open IntelliJ IDE 2022.2 JDK <-> Framework Pair:All possible combinations of JDK and Framework are selected. Scenario:
Settings to check in pairs Retest with the following bug fixes: #1877, #1878 using (this build for ideType=IU](https://github.com/UnitTestBot/UTBotJava/actions/runs/4373176419)) Mocks/Mode pairs
Mocks/Project pairs
|
Initial set-up
Check that the IntelliJ Idea UTBot plugin can be successfully installed
01/03 New build taken
It is 101 MB
JDK <-> Framework Pair:
All possible combinations of JDK and Framework are selected.
Project type is iterated independently.
Parametrization is OFF.
Scenario:
Settings to check in pairs
add sample name
Retest with the following bug fixes: #1877, #1878 using (this build for ideType=IU](https://github.com/UnitTestBot/UTBotJava/actions/runs/4373176419))
Mocks/Mode pairs
tested with Project, JDK, Framework
Mocks/Project pairs
tested with Project, JDK, Framework
The text was updated successfully, but these errors were encountered: