citrusframework / citrus

Framework for automated integration tests with focus on messaging integration
https://citrusframework.org
Apache License 2.0
459 stars 137 forks source link

Migration guide from v3.4.0 to v4.0.0 #1051

Closed sothavirak closed 1 year ago

sothavirak commented 1 year ago

Citrus Version Migrating from v3.4.0 to v4.0.0

Question What is the replacement of https://github.com/citrusframework/citrus/blob/v3.4.0/vintage/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/runner/TestRunner.java in v4.0.0?

bbortt commented 1 year ago

https://github.com/citrusframework/citrus/blob/main/core/citrus-api/src/main/java/org/citrusframework/TestCaseRunner.java

and

https://github.com/citrusframework/citrus/blob/main/core/citrus-base/src/main/java/org/citrusframework/DefaultTestCaseRunner.java

some guide would be helpful indeed.. eyeing @christophd. do you have plans for that? or should I try and come up with something?

sothavirak commented 1 year ago

Thanks but cant find replacement for this in v4.0.0

https://github.com/citrusframework/citrus/blob/v3.4.0/vintage/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/runner/TestRunner.java#L431

christophd commented 1 year ago

Yep, need to add this into the migration guide. Thanks you!

Please, also have a look into the citrus-samples repository. Here you can see how it works with Citrus 4.0.0 and the mentioned TestCaseRunner replacement

Also this might give you an idea (e.g. for JUnit Jupiter runtime): https://github.com/citrusframework/citrus/tree/main/runtime/citrus-junit5/src/test/java/org/citrusframework/junit/jupiter/integration

christophd commented 1 year ago

https://github.com/citrusframework/citrus-samples/tree/main/samples-junit https://github.com/citrusframework/citrus-samples/tree/main/samples-testng

sothavirak commented 1 year ago

The documentation seems still refer to v3.4.0

image

christophd commented 1 year ago

True, and sorry for that. Updating the documentation will be an iterative task. Any help is much appreciated!

sothavirak commented 1 year ago

Would love too, but struggling to fix the breaking changes after migrating to v4.0.0 - Some codes no longer work.

christophd commented 1 year ago

We are here to help. Please can you give some examples and error messages?

sothavirak commented 1 year ago

Another question, we used to rely on this class for our JUnit https://github.com/citrusframework/citrus/blob/v3.4.0/vintage/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/junit/JUnit4CitrusTestRunner.java

What is the 1 to 1 replacement in V4.0.1?

christophd commented 1 year ago

This would be org.citrusframework.junit.spring.JUnit4CitrusSpringSupport

Once again, I recommend having a look into the samples (the Java code as the update of the documentation is still ongoing) as these have all been updated to Citrus 4.0

sothavirak commented 1 year ago

Thanks Chris. Will close this.