Skip to content
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

Testing/Java: Add section about io.crate:crate-testing package #178

Merged
merged 2 commits into from
Jan 21, 2025

Conversation

amotl
Copy link
Member

@amotl amotl commented Jan 21, 2025

About

The canonical documentation page has been erected in a haste, focused on Python and Testcontainers/Java, so it was natural it forgot to educate about the io.crate:crate-testing package.

Preview

https://cratedb-guide--178.org.readthedocs.build/integrate/testing.html

/cc @seut

@amotl amotl requested review from kneth and surister January 21, 2025 01:44
@amotl amotl force-pushed the crate-java-testing branch from 029eaf6 to a3c642b Compare January 21, 2025 01:44
@amotl amotl changed the title Testing: Add section about crate-testing package Testing: Add section about io.crate:crate-testing package Jan 21, 2025
Comment on lines 8 to 24
(java-junit)=
## Java JUnit

The popular [JUnit] framework is supported by *CrateDB Java Testing Classes*,
provided per [io.crate:crate-testing] package available on Maven Central.
Its source code is maintained within the [crate-java-testing] repository on GitHub.

The package includes `CrateTestServer` and `CrateTestCluster` classes for use
as [JUnit external resources]. Both classes download and start CrateDB before
test execution, and stop CrateDB afterwards.


Copy link
Member Author

@amotl amotl Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contrary to the other examples, this does not add a single link to a concise "usage description" resource yet.

a) We can easily link to this section in the README for a start:

@ClassRule
public static final CrateTestCluster TEST_CLUSTER =
    CrateTestCluster.fromVersion("3.3.2")
    .clusterName("with-builder")
    .numberOfNodes(3)
    .build();

b) Other than this, I would also like to link to a little but full working example program/project that users can use as a starting point to build upon, optimally slotted into cratedb-examples. It does not need to happen right now, but maybe you can already point out an almost-complete variant for a start.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also like to link to a little but full working example program/project that users can use as a starting point to build upon, optimally slotted into cratedb-examples.

Responding to myself:

The example java-qa uses crate-testing already.

-- by-language/java-qa/pom.xml

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than this, I would also like to link to a little but full working example program/project

The example java-qa uses crate-testing already.

I just added a link to the example project.

We can easily link to this section in the README for a start.

On a subsequent iteration, we can give the page a complete rework, and present concise code snippets within corresponding "Synopsis" subsections.

@amotl amotl force-pushed the crate-java-testing branch from ac10139 to 215df87 Compare January 21, 2025 01:53
@amotl amotl changed the title Testing: Add section about io.crate:crate-testing package Testing/Java: Add section about io.crate:crate-testing package Jan 21, 2025
amotl added 2 commits January 21, 2025 19:32
The canonical documentation page has been erected in a haste, focused on
Python and Testcontainers/Java, so it was natural it forgot to educate
about the `io.crate:crate-testing` package.

- https://github.com/crate/crate-java-testing
- https://repo1.maven.org/maven2/io/crate/crate-testing/
@amotl amotl force-pushed the crate-java-testing branch from 215df87 to 99c02c4 Compare January 21, 2025 18:33
@amotl amotl merged commit c8a2ecd into main Jan 21, 2025
3 checks passed
@amotl amotl deleted the crate-java-testing branch January 21, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants