citrusframework / citrus

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

Alternatives to @MessageCreator #1095

Closed cj19 closed 8 months ago

cj19 commented 8 months ago

Citrus Version 4.0.2

Question In the older version (2.8) there was an option create messages with methods annotated with MessageCreator. In the latest versions of citrus and cucumber what are the alternatives to declare and dynamically use such messages?

I'm using gradle and these are the dependencies that I added so far:

    testImplementation group: 'io.cucumber', name: 'cucumber-java', version: '7.15.0'
    testImplementation group: 'io.cucumber', name: 'cucumber-junit', version: '7.15.0'
    testImplementation group: 'io.cucumber', name: 'cucumber-spring', version: '7.15.0'

    testImplementation group: 'org.springframework', name: 'spring-test', version: '6.1.3'
    testImplementation group: 'org.citrusframework', name: 'citrus-base', version: '4.0.2'
    testImplementation group: 'org.citrusframework', name: 'citrus-spring', version: '4.0.2'
    testImplementation group: 'org.citrusframework', name: 'citrus-cucumber', version: '4.0.2'
    testImplementation group: 'org.citrusframework', name: 'citrus-junit', version: '4.0.2'
    testImplementation group: 'org.citrusframework', name: 'citrus-endpoint-catalog', version: '4.0.2'
    testImplementation group: 'org.citrusframework', name: 'citrus-testng', version: '4.0.2'
    testImplementation group: 'org.citrusframework', name: 'citrus-kafka', version: '4.0.2'
    testImplementation group: 'org.citrusframework', name: 'citrus-validation-json', version: '4.0.2'

    testImplementation group: 'org.junit.vintage', name: 'junit-vintage-engine', version: '5.10.1'
christophd commented 8 months ago

Since 4.0 most of the Cucumber related step implementations of Citrus have been moved to a separate sub-project called YAKS (https://github.com/citrusframework/yaks)

You can use the MessageCreator feature by adding this dependency:

testImplementation group: 'org.citrusframework', name: 'yaks-standard`, version: '0.17.1'

Here is an example how message creator works with YAKS: https://github.com/citrusframework/yaks/blob/main/java/steps/yaks-standard/src/test/resources/org/citrusframework/yaks/standard/message-creator.feature

cj19 commented 8 months ago

Since 4.0 most of the Cucumber related step implementations of Citrus have been moved to a separate sub-project called YAKS (https://github.com/citrusframework/yaks)

You can use the MessageCreator feature by adding this dependency:

testImplementation group: 'org.citrusframework', name: 'yaks-standard`, version: '0.17.1'

Here is an example how message creator works with YAKS: https://github.com/citrusframework/yaks/blob/main/java/steps/yaks-standard/src/test/resources/org/citrusframework/yaks/standard/message-creator.feature

Thank you for your reply! I will look into it. :)