This document discusses Citrus, an open source integration test framework for automated interface testing of distributed systems. It focuses on testing message exchanges between services. The presentation provides an overview of Citrus capabilities such as ready-made endpoint components for REST, JMS, SOAP and others. It demonstrates how to write Citrus tests using actions like send, receive and validate messages. Integration with tools like Docker, Camel and Arquillian is also highlighted. The document concludes with information on learning more about Citrus.
2. @citrus_test#Devoxx #CitrusTwist
Christoph Deppisch
• Senior software developer
• @ConSol* Munich, Germany
• 10 years of experience in Java
• Passionate about automated software testing
• Founder of the Open Source framework Citrus
• Happy to be here today!
Twitter: @freaky_styley
3. @citrus_test#Devoxx #CitrusTwist
What is Citrus?
• Open Source integration test framework
• Focus on messaging in distributed software systems
• Automated interface tests
• Ready-to-use endpoint components for message exchange
• Works & integrates with well-known libraries
• TestNG, JUnit
• Apache Camel, Spring, Docker,Arquillian …
16. @citrus_test#Devoxx #CitrusTwist
• Missing something? Adding custom actions is possible!
Test actions
Test action Description
echo Log message to console
send Sends a message
receive Receives a message
sleep Wait some time
sql Execute SQL statements
parallel Execute actions in parallel
conditional Execute actions based on condition
iterate Execute actions in iteration
repeat-on-error Failsafe action execution
…
17. @citrus_test#Devoxx #CitrusTwist
@Test
public class MessageExchangeIT extends TestNGCitrusTestDesigner {
@Autowired
private Endpoint orderEndpoint;
@CitrusTest
public void sendAndReceiveMessage() {
send(orderEndpoint)
.payload("...");
receive(orderEndpoint)
.payload("...");
}
}
20. @citrus_test#Devoxx #CitrusTwist
• Missing something? Adding custom components is easy!
Endpoint components
Component Description
citrus-http Http REST client and server
citrus-jms JMS queue or topic destination
citrus-ws SOAP client and server
citrus-mail SMTP mail client and server
citrus-docker Docker container management
citrus-camel Apache Camel endpoint
citrus-ftp FTP client and server
citrus-vertx Vert.x endpoint
citrus-ssh SSH client and server
…