Welcome back. In this video, we are going to talk about Message Proxies.
There are many ways to create virtual services. One of the most powerful ways to create virtual services is from recorded traffic. This allows us to simply listen to a transaction between an application and a back-end dependency. And then, we can let Parasoft Virtualize do all the heavy lifting to create the virtual service.
This virtual service is what we're going to need to solve our needs. So there's a little bit of setup work that needs to be done in order to prepare for recording the traffic. So we are going to take a look at a typical application and where that setup work will take place. What you're going to get from this video is an understanding of how to use message proxies, how to add a message proxy, and how to add a proxy connection.
Let's get started with common practices. Organizations have requirements for any application they want to test this application under test or AUT. Most commonly exposed is an API that allows the UI to communicate with the application. Any service calls and any additional APIs that communicate with the back-end resources, including things like databases, additional applications, or other REST APIs or microservices. A key to automating testing is to simulate, mock or virtualize any or all pieces of this equation.
You can virtualize the back-end services from the perspective of the application under test, the application itself from the UI tester's point of view. You can even virtualize the tester or multiple testers and emulate their behavior from the application's perspective.
Now, once you've established these virtual assets, how can you manage your test environment, telling Virtualize which assets you want to use, the live asset or the virtual one? The Answer? Institute a proxy between your back-end and your application under test.
This proxy acts as a traffic cop. Directing traffic that originally required the live asset to be available and now to direct those requests to the virtual assets instead. In order to capture the communication that has been taking place between these applications and the back-end systems, we will start by defining proxies. By defining proxies it is simply to allow you to intercept the calls coming from the application to the back-end systems by generating a listener. Like the traffic cop in the example, the proxy then forwards those calls to the target systems and listens for those responses to come back. We can then take all that information and forward it to Parasoft Virtualize and generate a virtual service that will behave just like the live assets.
We can then use those proxies for their secondary purpose, which is to redirect the communication from the back-end system and pointed towards a Virtualize as well, and Virtualize can respond with the information that just recorded. So, let's step through the initial creation of a proxy.
For this, we are going to use the Parabank application we set up to record traffic. Proxies within the Parabank virtual server view which is here on the right. And you can add a proxy by simply clicking on Message Proxies and click Add a Proxy.
So if we open that up, you can now see the proxy and if I double-click on it, it's going to take me to the main editor. By definition, proxies do not have connection information, so we will need to supply that.
Let's look at what a proxy connection looks like. So I'm going to click on the Add button and just to go through it. A proxy is made up of three pieces where the proxy is listening. Where the proxy is sending. And if you've configured a secondary connection where that secondary connection is sending. We are going to be using the Parabank demo application as the application under test, and we are going to define our proxy point to a third-party service.
So we are going to need to know what the endpoint of that third-party service is, and then we can simply feed it to the proxy. In the Parabank demo application, we can go into the services section here, and that will allow us to get the endpoint information for any services that Parabank talks to. In a subsequent video, we're going to take the service information, and we're going to feed it to the proxy, and we'll record some traffic for use in creating a virtual service.
I hope now you have a better understanding of proxies and how they work within Virtualize Free Edition.
Next up, we're going to talk about Monitoring Traffic.
Comments are closed.