Skip to content

Conversation

peholmst
Copy link
Member

@peholmst peholmst commented Jun 11, 2025

It is possible in Spring Boot to create a TestApplication class, that extends the configuration of the main Application class with mocks or Testcontainers. This is very useful for local development as it does not require a separate development profile:

  • Run the main app with mvn spring-boot:run with real external services.
  • Run the test app with mvn spring-boot:test-run with Testcontainer services (or mocks you configure).

For this to work, Vaadin must support running both from target/classes (main app) and target/test-classes(test app). This PR adds support for that.

PR vaadin/walking-skeleton#71 adds a workaround to the walking skeleton, but I think it would be better to get this into Flow directly.

@peholmst peholmst marked this pull request as ready for review June 11, 2025 18:49
Copy link

github-actions bot commented Jun 11, 2025

Test Results

1 217 files   -  17  1 217 suites   - 17   1h 13m 50s ⏱️ - 1m 34s
8 425 tests  - 117  8 366 ✅  - 120  55 💤  - 1  4 ❌ +4 
8 832 runs   -  82  8 764 ✅  -  85  64 💤  - 1  4 ❌ +4 

For more details on these failures, see this check.

Results for commit 659c8b3. ± Comparison against base commit 8be728d.

This pull request removes 117 tests.
com.vaadin.base.devserver.AbstractDevServerRunnerTest ‑ shouldPassEncodedUrlToDevServer
com.vaadin.base.devserver.AbstractDevServerRunnerTest ‑ updateServerStartupEnvironment_preferIpv4_LocalhostIpAddressAddedToProcessEnvironment
com.vaadin.base.devserver.AbstractDevServerRunnerTest ‑ updateServerStartupEnvironment_preferIpv6_LocalhostIpAddressAddedToProcessEnvironment
com.vaadin.base.devserver.BrowserLiveReloadAccessorImplTest ‑ getLiveReload_devMode_contextHasNoReloadInstance_instanceIsCreated
com.vaadin.base.devserver.BrowserLiveReloadAccessorImplTest ‑ getLiveReload_devMode_contextHasReloadInstance_instanceIsReturned
com.vaadin.base.devserver.BrowserLiveReloadAccessorImplTest ‑ getLiveReload_liveReloadDisabled_instanceIsCreated
com.vaadin.base.devserver.BrowserLiveReloadAccessorImplTest ‑ getLiveReload_productionMode_nullIsReturned
com.vaadin.base.devserver.DebugWindowConnectionTest ‑ backwardsCompatibilityClassExists
com.vaadin.base.devserver.DebugWindowConnectionTest ‑ getBackend_HotSwapVaadinIntegrationClassLoaded_returnsHOTSWAP_AGENT
com.vaadin.base.devserver.DebugWindowConnectionTest ‑ getBackend_JRebelClassEventListenerClassLoaded_returnsJREBEL
…

♻️ This comment has been updated with latest results.

@peholmst peholmst marked this pull request as draft June 11, 2025 19:08
@peholmst
Copy link
Member Author

Converted back to draft as this change breaks several tests.

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants