The production system has been targeted by troublesome random failures over a long period of time, and countless hours of debugging has yielded no valuable results. We're close to throwing in the towel. An army of Chaos Monkeys has been deployed in an attempt to force the issue, but no solution is in sight. We need to take back control. It's time to meet the assertable Chaos Monkey, Arquillian Cube Q. Arquilian Cube Q is an extension that gives you full control over a production-like system right from the comfort of your IDE. In this session, we'll explore some of the things you can do when you have control over the whole system. We'll validate scalability and connectivity, assert the failure state, enforce service responses, and more.

Aslak Knutsen, Senior Software Engineer, Red Hat
Bartosz Majsak, Atos Consulting Switzerland

Software is Eating the World

Everywhere you turn, software is running: your TV, your toaster, your car.  All of these systems, even the ones upon which your life depends, have bugs.  Recently, a French airport was shutdown due to a weather bug running on Windows 3.1 (note I said recently).  Solving bugs has always been a component, if not one of the primary purposes, of software development since day one.  Unit testing is one method of bug hunting, often using mock builds. While better than nothing, these are not really sufficient and have many disadvantages.  One major disadvantage being you still don't know if it'll work in production, much less know if it'll work well in production.

High-Level tests running in production-like environments

Arquillian is a "middleware for your tests" framework.  It tries to removes lot of complexities and boring parts of automated tests.  Arquillian allows you to run these unit tests from within your IDE.  After defining the dependencies, you can generate unit tests quickly and easily using this framework.  It also knows about where you are running your code, allowing for run-time integration and feedback.  The main principles of Arquillian are:

  • Portable tests
  • Executable from IDE and build tools
  • Reuse existing frameworks
  • flexibility to adapt to new technologies

Arquillian Cube

Arquillian Cube is an extension that deals with containers, specifically Docker containers.  It supports managing the life-cycle of containers, even providing testing integration within the immutable container.  Additionally, it also has a basic level of orchestration, allowing full-stack testing, all within the IDE.  This Docker integration takes you down the path of production quality assurance, well beyond simple unit tests.

Arquillian Cube Q

The Cube Q extension intercepts and changes the Arquillian Cube Docker compose command to interject Toxic Proxies, where they would not otherwise exist.  This includes changing network conditions, such as increased latency, decreased bandwidth, packet loss, etc).  Doing so allows you to simulate how your code responds during periods of service or network degradation and build tests around these conditions.  Despite the fact that nothing on the Internet is ever considered to be down, modern applications must take into account many failure conditions.  Cube Q gives you a great mechanism for these tests.

The combination of Arquillian Cube and Arquillian Cube Q provide a new and interesting method for testing your code base.  These projects give you the tools you need to squash bugs well before you hit production.  With any hope, your toaster will treat you better because of these and similar tools :)

 

 

About the Author

Brian J. Atkisson is a Senior Principal Systems Engineer and the technical lead on the Red Hat IT Identity and Access Management team.  He has 18 years of experience as a Systems Administrator and Systems Engineer, focusing on identity management, virtualization, systems integration, and automation solutions. He is a Red Hat Certified Architect and Engineer, in addition to his academic background in Biochemistry, Microbiology and Philosophy.

 

Last updated: February 6, 2024