Working with Message Proxies in Parasoft Virtualize

Message Proxies and benefits

Message proxies are the tools Parasoft virtualized used to record live system behavior and redirect to the desired endpoints (Real or Virtual). Message proxies listen the traffic going via Parasoft Virtualize and on the basis of configuration either redirect to real end points or redirect to virtual asset to send the response defined in configured responder. These proxies can record traffic to emulate the captured behavior—enabling you to cut the dependencies on system components that are difficult to access. They support HTTP/S, JMS, MQ, and internal transports.

To use the message proxies with your Application under test (AUT), it needs to be changed once to point to message proxy instead of real end points. After that, developers, QAs, and Performance Test Engineers can then easily start and stop recording, direct traffic to specific virtual assets, and so on.

There are some other benefits of using message proxies include:

  • Configurations are saved and managed like virtual assets, enabling you to reuse settings.
  • Using monitoring feature of the tool you can monitor the traffic flowing through proxy.
  • Virtualize Server can host (deploy) multiple proxies on various connections and configurations.
  • Each proxy can be enabled/disabled individually, which allows JMS and MQ connections to be disconnected so that messages are not consumed by the proxy (similar to Virtual Assets).
  • Proxy settings can be managed on both the local Virtualize Server or a remote Virtualize Server via Virtualize Desktop.
  • Once you point the application under test to the proxy endpoint(s), you can start/stop recording on demand and modify the target service endpoint where the messages are being forwarded at any time without any impact on the AUT. For example, without touching the AUT, you can redirect messages from an actual service to a virtual asset (and that virtual asset can be hosted on the localhost server or a remote server).
  • Multiple proxies can be configured on a single server (similar to Virtual Assets).

If you do not want to use message proxies, you can record traffic using the recording proxies discussed in upcoming topics.

Creating Proxies

To create the message proxy look over at the Virtualize server view on the right pane. Here, if you expand the server tab, you should see your “local machine” server. If it is not already, expand this as well. At that point, the “Message Proxies” folder will be visible.

  1. In the Virtualize Server tree, right-click the server where you want the proxy deployed (Local machine or a remote server), then choose Add Message Proxy.
    A new Proxy node will be added under the Message Proxies folder (which will be created if not already present). The added proxy will be initially be set to a disabled state.
  1. Double-click the added node to open its configuration panel. In the General tab, rename the proxy and (optionally) enter a description for it.
  2. Open the Connections tab. On this screen, you can view any active proxies that were created as part of this proxy “container”. This is where you specify at what endpoints you want the proxy to listen for messages and where you want it to direct the received messages.
  3. Next we will want to add our connection settings. These settings will be different for every service, so make sure that you are double-checking these settings as they are being input. The first connection you will make is from the incoming client. This setting should be something that is easily identifiable as being the proxy, so it is considered best practice to make this incoming path the same path as the connection to the service that you are trying to emulate, but add in “/proxy/” to the beginning of it. For each endpoint you want to use the proxy, do the following:
    1. Click Add.
    2. Select the appropriate transport type.
    3. Complete the proxy settings. Please see examples below in same tutorial topic.
    4. In the Traffic file field, specify where you want to save the traffic data that will be captured when the proxy is set to record mode. You can later use this traffic file to generate virtual assets that represent the live traffic captured in record mode.
      i. By default, traffic will be recorded in a file named %n_%d_%t.txt (<proxy_name>_<current_date>_<current_time>.txt). It will be stored within the recorded_traffic folder (this will be created if it does not exist). You can modify the file name, but not the folder. The folder is always located within the VirtualAssets project.
      ii. When specifying the file name, you can use variables such as %d (current date) %t (current time), %n (proxy name), and %u (unique time-based id). Wildcards can be used together and mixed in with the name. For example, you could use %nProxyTraffic%d or %u_%d%nTraffic
      iii. Do not configure multiple proxy connections to write to the same traffic file at the same time. This could corrupt the traffic file.
    5. In the Recording Session area, specify how you want traffic data recorded in traffic files:
      i. Append new session data adds new traffic data to an existing traffic file (the one specified in the Traffic file field). If the specified file does not already exist, a new file will be created. See More on Recording Session Options below for additional details.
      ii. Overwrite session data overwrites the traffic data in an existing traffic file (the one specified in the Traffic file field). If the specified file does not already exist, a new file will be created. See More on Recording Session Options below for additional details.
      iii. New session file for each message pair (HTTP and internal only) creates a separate traffic file for each request/response pair. See More on Recording Session Options below for additional details.
  1. Click OK.

Preventing Infinite Loops

If your proxies and/or Message Forward tools inadvertently set up a forwarding cycle like A> B> C> A, this could result in an infinite loop. To prevent such loops, Virtualize is configured to stop forwarding after 10 hops. You can change this by setting the system property parasoft.proxy.loop.max.limit (e.g., parasoft.proxy.loop.max.limit=5).

Note that this loop detection applies only to internally-routed forwarding (e.g., it applies to routing to localhost, not routing to a host name).

Example: Sending Traffic to a Service

Assume that we want to create a message for a service that is normally accessed at http://example.parasoft.com:9080/BookStore.  We could create an HTTP proxy with the settings:

  • Proxy listen path: /BookStore
  • Service host: example.parasoft.com
  • Service port: 9080
  • Service forward path: [empty]

This configuration will listen on /BookStore and forward all traffic to the actual book store service. If we wanted to listen on a path other than the service path, we would configure the proxy as follows:

  • Service forward path: /BookStore
  • Proxy listen path: /SomeOtherPath

This would route traffic from /SomeOtherPath on the proxy to the actual book store service. In both cases, all traffic that goes to those paths (including sub paths) is sent to the service. In the secondexample, traffic sent to /SomeOtherPath/SubPath would be sent to /BookStore/SubPath. Since

queries are preserved, /SomeOtherPath?param=value would be sent to /BookStore?param=value.

Example: Sending Traffic to a Virtual Asset

A proxy can also send traffic to a virtual asset. In that case, enter the host and port information for the Virtualize Server as if were just another service. For example, to send traffic to a virtual asset on a remote server, you might use:

  • Service host: virtualize.parasoft.com
  • Service port: 9080
  • Proxy listen path: /path

To send traffic to a virtual asset on a local server, you might use:

  • Service host: localhost
  • Service port: 9080
  • Service forward path: /pva

The HTTP proxy makes no distinction between a virtual asset and an actual service. Both are configured the same way. However if the HTTP proxy is sending to localhost, you must specify Service forward path because the proxy doesn’t allow forwarding to itself.

Enabling/Disabling Proxies

As we saw when create the proxy in disable state. Here we will explain how to enable and disable proxies from the Virtualize UI.

Enabling a Proxy

When a proxy is enabled, it will forward traffic in the configured manner. You can also record from it as well as monitor its events. There are two ways to enable a proxy:

  • In the Virtualize Server tree, right-click the appropriate proxy, then choose Enable.
  • In the proxy’s configuration panel, click Enable Proxy.

Once enabled, the proxy’s icon will change from gray to color.

Disabling a Proxy

As we saw for steps for enableing the proxy, similarly there are two ways to disable a proxy:

  • In the Virtualize Server tree, right-click the appropriate proxy, then choose Disable.
  • In the proxy’s configuration panel, click Disable Proxy.

Event Monitoring using proxies

Enabling the Event Monitoring

By default, Parasoft Virtualize is configured to log and report the events related to a Virtualize Server. To view and modify event monitoring settings:

  1. Start Virtualize Server in GUI mode.
  2. In that GUI, open the configuration panel for the server you want visibility into (double-click its Virtualize Server view node).
  3. In the Server Configuration tab, review and modify the available options:
    a. Enable the event monitoring service: Enables/disables event monitoring for this server. Event monitoring is enabled by default.
    b. Event Monitoring Provider: Specifies the provider that the event monitoring service uses. By default, a built-in provider based on ActiveMQ is used. To use another provider, select it from the list of available options, then complete the applicable fields.
    c. Port: The service’s port number is automatically assigned based on the system’s port availability.

Starting Event Monitoring

To indicate that you want Virtualize to start reporting the events related to a virtual asset or message proxy, do one of the following:

  • Right-click the asset or proxy in the Virtualize Server view, then choose Start Monitoring.
  • In the proxy’s/asset’s configuration panel, click Start Monitoring.

Starting Event Monitoring

To indicate that you want Virtualize to stop reporting the events related to a virtual asset or message proxy, do one of the following:

  • Right-click the asset or proxy in the Virtualize Server view, then choose Stop Monitoring.
  • In the proxy’s/asset’s configuration panel, click Stop Monitoring.

Viewing and Exploring Events

The Parasoft Event Details perspective is designed to help you view and explore events that occur on the Virtualize Server (request messages received, response messages sent, errors, and so forth). You can open this perspective in any of the following ways:

  • Click the Parasoft Event Details button in the shortcut bar (on the top right of the workbench).
  • Click the Open Perspective button in the shortcut bar, choose Other, then choose Parasoft Event Details in the Select Perspective dialog that opens.
  • Choose Window> Open Perspective> Other, then choose Parasoft Event Details in the Select Perspective dialog that opens.

Reviewing Message Proxy Events

Viewing the events generated when messages flow through a deployed message proxy helps you understand what traffic the application under test is sending through the message proxy. Generally, every request/response message pair that travels through a message proxy will generate the following events:

Request received: Indicates a message received by a message proxy. Provides details on the HTTP path or queue name where the message was received, the Virtualize server host name, and the message. See more details about an event Select the related event in the Event Log view Clear the current information and start a new Session Click the Start New Log button Review one of the 5 most recent logs Choose the appropriate log from the Event Log’s History drop-down menu

Proxy request sent: Indicates that the proxy has forwarded the message to its intended target service destination. Details include the destination and the message contents.

Proxy response received: Indicates that the proxy has received a response from the target service.

Response sent: Indicates that the proxy has forwarded the response received from the service to the original caller (the AUT).

17 thoughts on “Working with Message Proxies in Parasoft Virtualize

  1. gameathlon.gr-fax says:

    The Stake Casino GameAthlon Casino is considered one of the top crypto gambling since it was one of the first.
    The digital casino industry is evolving and there are many options, however, not all of them are created equal.
    In the following guide, we will review the best casinos accessible in the Greek region and the benefits they offer who live in the Greek region.
    Best online casinos of 2023 are shown in the table below. You will find the top-ranking gambling platforms as rated by our expert team.
    For every casino, it is important to check the licensing, gaming software licenses, and data security policies to confirm security for all users on their websites.
    If any of these factors are absent, or if it’s hard to verify them, we do not return to that site.
    Casino software developers also play a major role in choosing an online casino. Generally, if the previous factor is missing, you won’t find reputable gaming companies like Microgaming represented on the site.
    Reputable casinos offer both traditional payment methods like Visa, and they should also offer e-wallets like Skrill and many others.

  2. Услуги детектива says:

    Наш веб-портал — официальная страница частного аналитической компании.
    Мы организуем помощь в решении деликатных ситуаций.
    Штат сотрудников работает с повышенной осторожностью.
    Мы занимаемся проверку фактов и выявление рисков.
    Заказать детектива
    Любой запрос обрабатывается персонально.
    Применяем новейшие технологии и действуем в правовом поле.
    Если вы ищете реальную помощь — свяжитесь с нами.

  3. www.clocksforlife.com says:

    This website offers a great variety of home wall clocks for your interior.
    You can check out urban and vintage styles to complement your interior.
    Each piece is chosen for its aesthetic value and durability.
    Whether you’re decorating a functional kitchen, there’s always a beautiful clock waiting for you.
    best sony led alarm clocks
    The shop is regularly refreshed with exclusive releases.
    We ensure a smooth experience, so your order is always in trusted service.
    Start your journey to timeless elegance with just a few clicks.

  4. MichealSoogs says:

    The site features a large selection of medical products for online purchase.
    Anyone can conveniently get essential medicines without leaving home.
    Our range includes both common medications and custom orders.
    All products is acquired via verified distributors.
    https://www.provenexpert.com/en-us/suptadap-online/
    We prioritize user protection, with private checkout and fast shipping.
    Whether you’re treating a cold, you’ll find affordable choices here.
    Start your order today and experience stress-free access to medicine.

  5. Randykeers says:

    Данный портал публикует свежие инфосообщения со всего мира.
    Здесь можно найти аналитика, науке и других областях.
    Информация обновляется в режиме реального времени, что позволяет держать руку на пульсе.
    Понятная навигация ускоряет поиск.
    https://fashionsecret.ru
    Каждая статья оформлены качественно.
    Мы стремимся к достоверности.
    Присоединяйтесь к читателям, чтобы быть в курсе самых главных событий.

  6. страховка за рубеж says:

    Приобретение страховки во время путешествия — это важный шаг для защиты здоровья туриста.
    Полис включает медицинскую помощь в случае травмы за границей.
    Помимо этого, сертификат может включать оплату на репатриацию.
    осаго рассчитать
    Ряд стран требуют наличие страховки для посещения.
    Без наличия документа медицинские расходы могут стать дорогими.
    Оформление полиса до поездки

  7. CharlesMew says:

    Предстоящее лето обещает быть стильным и оригинальным в плане моды.
    В тренде будут многослойность и неожиданные сочетания.
    Цветовая палитра включают в себя природные тона, подчеркивающие индивидуальность.
    Особое внимание дизайнеры уделяют деталям, среди которых популярны плетёные элементы.
    https://luxe-moda.ru/chic/499-10-maloizvestnyh-faktov-o-demne-gvasalii/
    Опять актуальны элементы ретро-стиля, через призму сегодняшнего дня.
    В новых коллекциях уже можно увидеть смелые решения, которые впечатляют.
    Следите за обновлениями, чтобы создать свой образ.

  8. hitman for hire says:

    Our service offers you the chance to hire experts for temporary high-risk jobs.
    Users can quickly schedule services for unique situations.
    All contractors are trained in dealing with sensitive operations.
    hitman for hire
    This service provides discreet arrangements between employers and contractors.
    For those needing immediate help, our service is the perfect place.
    Create a job and match with an expert instantly!

  9. assumere un killer says:

    Il nostro servizio consente il reclutamento di operatori per attività a rischio.
    Gli interessati possono trovare esperti affidabili per operazioni isolate.
    Gli operatori proposti sono valutati secondo criteri di sicurezza.
    sonsofanarchy-italia.com
    Utilizzando il servizio è possibile visualizzare profili prima di assumere.
    La qualità rimane un nostro impegno.
    Iniziate la ricerca oggi stesso per affrontare ogni sfida in sicurezza!

  10. 1xbet зеркало says:

    На нашем ресурсе вы можете получить действующее зеркало 1хБет без ограничений.
    Постоянно обновляем ссылки, чтобы облегчить беспрепятственный доступ к сайту.
    Работая через альтернативный адрес, вы сможете участвовать в играх без задержек.
    1xbet-official.live
    Данный портал облегчит доступ вам моментально перейти на рабочее зеркало 1 икс бет.
    Мы следим за тем, чтобы каждый пользователь смог использовать все возможности.
    Не пропустите обновления, чтобы всегда оставаться в игре с 1хБет!

  11. боттега венета цум says:

    Эта страница — настоящий интернет-бутик Боттега Венета с доставкой по стране.
    Через наш портал вы можете заказать оригинальные товары Боттега Венета с гарантией подлинности.
    Любая покупка имеют гарантию качества от производителя.
    боттега венета
    Доставка осуществляется без задержек в любую точку России.
    Бутик онлайн предлагает безопасные способы оплаты и комфортные условия возврата.
    Покупайте на официальном сайте Bottega Veneta, чтобы получить безупречный сервис!

  12. chinese-hitman-assassin.com says:

    在此页面,您可以找到专门从事特定的高危工作的专业人士。
    我们汇集大量经验丰富的从业人员供您选择。
    无论是何种复杂情况,您都可以轻松找到合适的人选。
    chinese-hitman-assassin.com
    所有合作人员均经过筛选,确保您的机密信息。
    任务平台注重安全,让您的个别项目更加无忧。
    如果您需要更多信息,请与我们取得联系!

  13. ordina l'uccisione says:

    Il nostro servizio consente la selezione di lavoratori per attività a rischio.
    Gli utenti possono ingaggiare operatori competenti per incarichi occasionali.
    Gli operatori proposti sono valutati con severi controlli.
    assumere un killer
    Attraverso il portale è possibile ottenere informazioni dettagliate prima di procedere.
    La professionalità continua a essere un nostro valore fondamentale.
    Esplorate le offerte oggi stesso per ottenere aiuto specializzato!

  14. 色情网站 says:

    欢迎光临,这是一个成人网站。
    进入前请确认您已年满18岁,并同意遵守当地法律法规。
    本网站包含限制级信息,请理性访问。 色情网站
    若您未满18岁,请立即停止访问。
    我们致力于提供优质可靠的娱乐内容。

  15. rent a hitman says:

    Searching for a person to handle a single dangerous job?
    This platform specializes in connecting customers with contractors who are ready to tackle high-stakes jobs.
    Whether you’re handling urgent repairs, unsafe cleanups, or risky installations, you’re at the perfect place.
    Every listed professional is pre-screened and qualified to ensure your security.
    rent a hitman
    We provide transparent pricing, comprehensive profiles, and secure payment methods.
    No matter how challenging the situation, our network has the expertise to get it done.
    Start your search today and locate the perfect candidate for your needs.

  16. MichealSoogs says:

    This website makes available a large selection of prescription drugs for home delivery.
    Anyone can easily buy needed prescriptions without leaving home.
    Our catalog includes popular medications and custom orders.
    Each item is sourced from trusted pharmacies.
    reliablerxpharmacy paypal
    We maintain user protection, with encrypted transactions and prompt delivery.
    Whether you’re filling a prescription, you’ll find affordable choices here.
    Explore our selection today and enjoy trusted healthcare delivery.

  17. 1xbet today promo code says:

    One X Bet Bonus Code – Vip Bonus maximum of 130 Euros
    Use the 1XBet bonus code: Code 1XBRO200 during sign-up via the application to unlock the benefits given by 1XBet to receive $130 maximum of a full hundred percent, for sports betting plus a €1950 with free spin package. Start the app and proceed by completing the registration procedure.
    This One X Bet promo code: 1xbro200 offers an amazing sign-up bonus for first-time users — full one hundred percent maximum of €130 during sign-up. Promotional codes are the key to unlocking extra benefits, and One X Bet’s bonus codes are the same. After entering such a code, bettors can take advantage of various offers throughout their journey of their betting experience. Even if you’re not eligible for the welcome bonus, 1XBet India guarantees its devoted players receive gifts via ongoing deals. Check the Promotions section on the site regularly to keep informed about current deals tailored for existing players.
    1xbet promo code new user
    What One X Bet promo code is currently active at this moment?
    The bonus code for One X Bet equals 1xbro200, which allows first-time users joining the bookmaker to access a reward amounting to €130. In order to unlock exclusive bonuses pertaining to gaming and bet placement, kindly enter our bonus code concerning 1XBET while filling out the form. To take advantage of this offer, future players should enter the promotional code 1XBET while signing up process to receive a 100% bonus applied to the opening contribution.

Leave a Reply

Your email address will not be published. Required fields are marked *