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

Document Spring SDK 8.6.7+ Testing support #4845

Merged
merged 10 commits into from
Jan 15, 2025
Merged

Conversation

megglos
Copy link
Contributor

@megglos megglos commented Jan 14, 2025

Description

This PR adds all changes needed to make transparent that with the 8.6.7 release going forward the official Spring SDK has testing support on-par with the former community SDK that we aimed towards with this epic camunda/camunda#26423 .

It also adds a note to announcements and the update guide on the actual switch and end-of-life of the community project, which seemed to have been missed previously.

closes
camunda/camunda#26598
camunda/camunda#26600

When should this change go live?

  • This is a bug fix, security concern, or something that needs urgent release support.
  • This is already available but undocumented and should be released within a week.
  • This on a specific schedule and the assignee will coordinate a release with the DevEx team. (apply hold label or convert to draft PR)
  • This is part of a scheduled alpha or minor. (apply alpha or minor label)
  • There is no urgency with this change and can be released at any time.

PR Checklist

  • My changes are for an already released minor and are in /versioned_docs directory.
  • My changes are for the next minor and are in /docs directory (aka /next/).

Copy link
Contributor

github-actions bot commented Jan 14, 2025

👋 🤖 🤔 Hello, @mesellings! Did you make your changes in all the right places?

These files were changed only in docs/. You might want to duplicate these changes in versioned_docs/version-8.6/.

  • docs/reference/announcements/860.md
These files were changed only in versioned_docs/version-8.6/. You might want to duplicate these changes in docs/.
  • versioned_docs/version-8.6/reference/announcements.md

You may have done this intentionally, but we wanted to point it out in case you didn't. You can read more about the versioning within our docs in our documentation guidelines.

@megglos megglos added the 8.7.0-alpha3 January 2024 alpha release label Jan 14, 2025
@megglos megglos requested review from a team and nicpuppa January 14, 2025 07:46
@@ -162,3 +162,44 @@ public void handleJobFoo(final ActivatedJob job) {
```

See [the configuration documentation](/apis-tools/spring-zeebe-sdk/configuration.md) for a more in-depth discussion on parameters and configuration options for job workers.

## Writing test cases
Copy link
Contributor Author

@megglos megglos Jan 14, 2025

Choose a reason for hiding this comment

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

@megglos megglos requested a review from felix-mueller January 14, 2025 07:47
@megglos megglos force-pushed the meg-26598-spring-sdk-test branch from b9a9579 to c833ef2 Compare January 14, 2025 07:50
@megglos megglos force-pushed the meg-26598-spring-sdk-test branch from c833ef2 to 3c8c34c Compare January 14, 2025 07:51
@megglos megglos requested a review from saig0 January 14, 2025 07:52
@nicpuppa nicpuppa added the deploy Stand up a temporary docs site with this PR label Jan 14, 2025
@github-actions github-actions bot temporarily deployed to camunda-docs January 14, 2025 09:02 Destroyed
@mesellings mesellings requested review from mesellings and removed request for a team January 14, 2025 10:11
@mesellings
Copy link
Contributor

mesellings commented Jan 14, 2025

@megglos Are you happy for me to make changes directly to the branch rather than trying to fit them into individual comments? They are all basically rewording, but might just be a lot cleaner?

Copy link
Member

@saig0 saig0 left a comment

Choose a reason for hiding this comment

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

@megglos thank you for adding these changes. 👍 I have a few minor comments and I recommend moving the docs to a different place. Please have a look. 🍪

Comment on lines 168 to 205
You can start up an in-memory test engine and do assertions by adding this Maven dependency:

```xml
<dependency>
<groupId>io.camunda</groupId>
<artifactId>spring-boot-starter-camunda-test</artifactId>
<version>8.6.x</version>
<scope>test</scope>
</dependency>
```

Note that **the test engine requires Java version >= 21**. If you cannot run on this Java version, you can use [Testcontainers](https://www.testcontainers.org/) **instead**. Testcontainers require that you have a Docker installation locally available on the developer machine. Use this dependency:

```xml
<!--
Alternative dependency if you cannot run Java 21, so you will leverage Testcontainer
Make sure NOT to have spring-zeebe-test on the classpath in parallel!
-->
<dependency>
<groupId>io.camunda</groupId>
<artifactId>spring-boot-starter-camunda-test-testcontainer</artifactId>
<version>8.6.x</version>
<scope>test</scope>
</dependency>
```

Then, start up the test engine in your test case by adding `@ZeebeSpringTest`

```java
@SpringBootTest
@ZeebeSpringTest
public class TestMyProcess {
// ...
```

An example test case is [available here](https://github.com/camunda-community-hub/camunda-cloud-examples/blob/main/twitter-review-java-springboot/src/test/java/org/camunda/community/examples/twitter/TestTwitterProcess.java).

> Please do not use `zeebeTestEngine.waitForBusyState(...)` to wait for a timer. This will not work as this is also triggered by an incoming job activation.
Copy link
Member

Choose a reason for hiding this comment

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

❌ We should add this content to the Zeebe Process Test docs instead of the Spring SDK docs. Just add a link in the Spring SDK docs. The Zeebe Process Test docs contain information about writing tests.

With 8.7, Camunda Process Test will become the default testing library and we should change the link to the Camunda Process Test docs.

We can keep the content in the Zeebe Process Test docs for users that still use Zeebe Process Test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for that suggestion, will apply this!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed with aca17e2

megglos and others added 2 commits January 14, 2025 19:57
Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
Co-authored-by: Philipp Ossler <philipp.ossler@gmail.com>
@github-actions github-actions bot temporarily deployed to camunda-docs January 14, 2025 19:11 Destroyed
@akeller
Copy link
Member

akeller commented Jan 14, 2025

@mesellings I didn't see a commit from you with changes. Will you get to this tomorrow? It looks like we want to move quickly on this PR and I'm wondering if we should pull in a US-based tech writer so you can enjoy your evening.

@mesellings
Copy link
Contributor

Thanks @akeller I was waiting for the changes from @saig0 to be made before I reviewed, but this must have got lost in the churn today - if another writer can take the review that would be great please, otherwise I can take a look?

@akeller
Copy link
Member

akeller commented Jan 14, 2025

@conceptualshark @christinaausley can one of you have a look at this PR so we can (hopefully) get it reviewed and merged today?

@mesellings
Copy link
Contributor

@akeller I'll give this a quick TW review before I finish, so it will jsut be grammar, writing etc rather than anything technical, but at least should help to get it merged, with follow-up PRs tomorrow if need be

@megglos
Copy link
Contributor Author

megglos commented Jan 14, 2025

@mesellings I'm done addressing the comments from @saig0 , please address any language matters directly. Thank you! 🙇

@megglos megglos requested a review from saig0 January 14, 2025 20:20
@mesellings
Copy link
Contributor

Actually @akeller I don't think I can manage this review tonight, I did start but changes were still just being committed, so I want to wait until it is closer to completion before I review - I can take a look first thing tomorrow morning though?

@akeller
Copy link
Member

akeller commented Jan 14, 2025

@megglos I thought you'd be offline for sure! If another TW is available, they'll visit this PR. If not, Mark will get it tomorrow morning.

@github-actions github-actions bot temporarily deployed to camunda-docs January 14, 2025 20:32 Destroyed
saig0
saig0 previously approved these changes Jan 15, 2025
Copy link
Member

@saig0 saig0 left a comment

Choose a reason for hiding this comment

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

@megglos 👍

@github-actions github-actions bot temporarily deployed to camunda-docs January 15, 2025 10:12 Destroyed
Copy link
Contributor

@mesellings mesellings left a comment

Choose a reason for hiding this comment

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

@megglos I've made some TW edits directly in the commits and backported for 8.6, nice work, happy to approve! 👍 🚀

@mesellings
Copy link
Contributor

@megglos Are you happy for me to merge and release the docs now, or are we still awaiting any other reviews?

@github-actions github-actions bot temporarily deployed to camunda-docs January 15, 2025 10:28 Destroyed
@mesellings mesellings merged commit 2872c5a into main Jan 15, 2025
8 checks passed
@mesellings mesellings deleted the meg-26598-spring-sdk-test branch January 15, 2025 10:36
@megglos
Copy link
Contributor Author

megglos commented Jan 15, 2025

Thank you @mesellings & @saig0 for the quick feedback loop! @mesellings yes, lets merge and publish.

Copy link
Contributor

🧹 Preview environment for this PR has been torn down.

@alexcorremans
Copy link

@mesellings is there a reason why the announcement reads 'Spring SDK test support support in 8.6.7' or is the double 'support' helping overlooked?

@mesellings
Copy link
Contributor

@alexcorremans Well spotted - that's a typo, I'll get that fixed - thank you for noticing this! 🚀 👀

@mesellings mesellings mentioned this pull request Jan 17, 2025
9 tasks
@mesellings
Copy link
Contributor

@alexcorremans Fixing this in #4871

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.7.0-alpha3 January 2024 alpha release deploy Stand up a temporary docs site with this PR
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

6 participants