Draft
Conversation
chgeo
reviewed
Jan 12, 2026
Member
chgeo
left a comment
There was a problem hiding this comment.
Cool!
But I wonder how such Java tests will be invoked? Certainly not with cds.test() from Java code, right?
So what is the way developers would use that?
|
@chgeo I think the advantage of this is that if you already have integration tests written in Jest and you want to validate the same logic for Java, you don't have to write the exact same tests again in JUnit. So developers can simply run the same tests against a CAP Java sever instead a Node.js one. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR uses the default
cds.env.profilesbehavior to detect whether the application is anjavaapplication. If this is the case it trigger the defaultmvncommand to start the application on a random port. Once the server is responsive thedbservice and theaxiosurl are adjusted accordingly to have the test communicate to thejavaapplication instead of an internalnodeserver.When the tests want to run the
javaapplication insidenodeit is possible to provide thenodeprofile and thejavaprofile will be ignored (e.g.CDS_ENV=node npm t).