Video

Automate integration testing with Red Hat OpenShift Container Platform

About this video

With Red Hat® OpenShift® Container Platform and Jenkins we can build continuous integration/continuous delivery (CI/CD) pipelines where our build tasks are executed in containers that are started on demand. This stack can also be used to dynamically create whole environments for integration tests. Use the capabilities of a container application platform to optimize resource utilization and avoid the hustle of maintaining permanent test environments. 

Learn more: www.redhat.com/consulting

Video channel
Services and support
Run time
4:07
Date

Transcript

[David] Hi. I'm David Johnston, and I'm a consultant for Red Hat specializing in OpenShift Container Platform and CI/CD.

[Balazs] I'm Balazs Szeti, a Senior Middleware Consultant focusing on Cloud Native Application Development. Containers have definitely changed the way how we run our applications. Simply by providing services as load-balancing and scaling out of the box. As a developer, at the beginning, I believed that this was just another infrastructure to run my code. But it actually - it's much more than that.

[David] Well it certainly change CI/CD as well. We still use a good old Jenkins workflow tool, and now we can speed it up dynamically to save resources when it's not in use. Also we still can do our traditional pipeline as always where we get the source code, run the unit test, bake the binary into a container image, and then deploy it to our OpenShift environment. But with the dynamic provisioning of containers, we can save more time and resources than ever before.

[Balazs] Yes, one thing, how I'd really like to extend, this basic pipeline, is to add integration testing. We used to have dedicated environments for integration tests. You know, say your application being deployed somewhere, having all your dependency services up and running - simply just maintaining such an environment can be a hassle.

[David] A hassle? What kind of dependencies do you have?

[Balazs] Ah, you know, typically - if you have an application, which requires a database, maybe a message broker if you do a sequence messaging, this could be the memory cache, especially if you do micro services that your application probably requires a bunch of other dependency services just simply to do its job. With tools like OpenShift and Arquillian Cube you can create the whole integration testing environment on demand.

[David] What's great about containers is, we have images for pretty much any application that you possibly need. You can go to DoctorHUB, or you can go to Clay.io, or if you need supported versions you can go to the Red Hat container catalog. Within 60 seconds, you can push a button and have an entire integration environment.

[Balazs] Yes, your application is deployed by using the same image that you will use in production. Once you have your dependency containers up and running, now you can run your test simply by calling your rest API, or docking messages in a queue. You can also interact with the whole test environment dynamically, on-the-fly, during your integration test.

[David] So you're saying you could bring containers up and down as needed to simulate, say, database downtime? Or something along those lines?

[Balazs] Exactly. And once you are done with your test, the whole environment disappears. The next time, everything starts from scratch.

[David] Okay, what's the advantage with that?

[Balazs] Uh, well, you don't need to clean up after your tests. You don't need to worry about batching your services as long as you get the latest image from a trusted and secure container image registry. And honestly, it forces you to do automation, to script everything from day one. So, simply, those manual "temporary hacks" don't work here.

[David] So, it sounds like you're gonna have a lot more free time to focus on the important thing, which is the business requirements, and that's already complex enough. If you wanna get started with bringing up an integration environment with containers, you can reach out to a Red Hat account executive, or go to redhat.com/services to get started.