28,063 questions
-1
votes
0
answers
31
views
I'm unable to implement auto focus in Iframe [closed]
I'm designing custom automation report(Playwright with Java using Junit). Encountering issue where I'm unable to implement "auto focus" when I click on the scenario in the table. Focus ...
0
votes
0
answers
30
views
Payara 7.2025.1 + payara-micro-managed + Arquillian + JUnit 5 - tests always pass outside container
I’m using Payara 7.2025.1 with payara-micro-managed, Arquillian, and JUnit 5. When I run my tests, a Payara Micro instance starts and deploys correctly, but it seems that the tests themselves are ...
0
votes
0
answers
55
views
Mockito MockStatic behavior leaking to other junit tests
I am using Mockito 5.20.0 to mock a static method, but the mock is not correctly closing / the mocked behavior is leaking outside of the tests it is intended to apply to. This is only a problem if ...
2
votes
0
answers
38
views
@ParameterizedTest with @DatabaseSetup and @ExpectedDatabase
I have the following integration test which is setting up the database with @DatabaseSetup and checking that after doStuffThatAffectsTheDb() executes, the db has been modified as expected with @...
2
votes
1
answer
118
views
How to control test class execution order in JUnit 5 suites?
I'm organizing my tests using JUnit 5's @Suite and @SelectClasses, but need to control the execution sequence of the test classes. According to the documentation, @SelectClasses doesn't guarantee ...
0
votes
0
answers
62
views
After upgrading mongodb to v5+ getting a "com.mongodb.MongoTimeoutException: Timed out.." in spring boot tests
Disclaimer: There are a couple of questions for this exact exception, sadly none of those match my environment or circumstances (thus i think this question is unique)
In my case i have a:
working ...
1
vote
1
answer
110
views
Does adding opens configuration in maven surefire plugin effect anything outside the test scope?
I'm working on a user-related service that handles personal information. While writing unit tests with Mockito, I ran into dependency issues with Byte Buddy, which prevented me from using the latest ...
1
vote
0
answers
69
views
Is it possible to run spring boot test using junit console launcher?
I am trying to create a fat JAR that includes my application and its tests to run them externally using the JUnit Console Launcher. The build succeeds, and the JAR is created. However, when I execute ...
1
vote
0
answers
94
views
AGP 8.13.0: “6 files found with path 'META-INF/LICENSE.md'” error, can’t define packaging block
I’m using the latest version of Android Studio (Narwhal | 2024.3.1 Patch 3) with Android Gradle Plugin 8.13.0, and I’m getting the following error when building my project:
6 files found with path '...
0
votes
1
answer
93
views
wiremock AutoConfigureWireMock HttpHostConnectException: Connection refused
@ActiveProfiles("it")
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@ContextConfiguration(classes = ServiceApplication.class)
@AutoConfigureWireMock(port = 0)
@...
1
vote
1
answer
76
views
How do I rollback database changes only after all tests are run?
For my JUnit 4 tests, a handful of database inserts have to be performed by code. However, the application framework has some overhead, which makes this step really slow.
To save time, I tried to run ...
0
votes
0
answers
54
views
Its there anyway i can make a Exposed transaction on a separate thread share transaction resource with an outer transaction block
Basically i have a ktor exposed web app and i am trying to write this test and client.get("assets") fails to see the asset created in the outer transaction block. It tried to use what is ...
0
votes
0
answers
28
views
Integration test for a mobile app connected to firebase firestore
I have a mobile application built with Kotlin and linked with firebase firestore, I have a 'LoginOnline' method which call Firebase Authentication to check the user credentials.
I need to know how to ...
0
votes
1
answer
73
views
How to correct the build path for a JUnit Test Class in Eclipse? [duplicate]
I'm making a JUnit test class for a java class in Eclipse and I'm unsure of what steps to take to fix it.
I tried to add the JUnit 5 Library to the build path as part of "Fix project setup",...
0
votes
0
answers
54
views
MockitoJUnitRunner Don't init mocks in SpringBoot
I have this Junit test:
@RunWith(MockitoJUnitRunner.class)
class NotificationServiceTest {
private static final Long EMAIL_ID = 1L;
private static final Long ORGANISATION_ID = 1L;
private ...