DevOps Automation

 View Only

Tips & Tricks - Executing Multiple DevOps Test UI Tests Simultaneously Through Engineering Test Management

By Jerry Shengulette posted Fri February 12, 2021 04:24 PM

  

Disclaimer: This scenario is not specifically tested as part of testing tools product development and thus is not officially supported, but we wanted to share that customers have been successful using these techniques.

Glossary of Acronyms

  • DTUI - DevOps Test UI
  • ETM - Engineering Test Management

Note: This “tips and tricks” document assumes the audience has familiarity with running singular DTUI UI Test perspective tests through the Enginerring Test Management Adapter, including how to start and stop the adapter from within the desktop client.

Background

The DTUI UI Test perspective offers a feature called “Run Distributed Tests”. The feature is accessed by selecting multiple tests in the Test Navigator panel.
Highlighting "Run Distributed Tests" menu

Right-click to select “Run Distributed Test”.  Both tests run at the same time.

If tests are being run directly from the desktop client, this works fine. There are also IBM Knowledge Center instructions for running from a command line on the desktop client machine.

The recipe for success becomes more complex if the tests are to be run from a remote ETM TestCase or TestSuite through the DTUI Engineering Test Management Adapter. That scenario was recently investigated in response to a customer inquiry.

Execution from the Desktop Client

The difficulty in running simultaneous DTUI tests through the Engineering Test Management Adapter lies in the way test execution details are transmitted between ETM and the testing tool. In simplified terms, ETM runs a test by passing a message through the adapter: “Run one test asset of this specific type from this location with these parameters”. If the ETM TestSuite involved multiple WebUI tests, the same type of request is serialized and each test will be run in sequence. There is no capacity to alter the message to something like: “Run N test assets of these specific types from these locations with these parameters”.

There is a limited solution that allows you to run multiple Web UI tests simultaneously from ETM.

Requirement: the performance test tool must be installed alongside the functional test tool in a “shell-shared” configuration.

Eclipse is a tool in which functionality is based on perspective. Different perspectives allow access to different functions and, in this case, different test assets. In working with Web UI tests, the focus is in the DTUI UI Test perspective.
Highlighting Web UI Test perspectives

Installing DevOps Test Performance provides access to the Performance Test perspective.
Highlighting Functional Test perspective

The File > New menu from the UI Test perspective:

File > New menu from Web UI perspective

The File > New menu from the Performance Test perspective:
File > New menu for Performance Test perspective

There is some overlap but what the addition of the Performance Test perspective allows is the creation of a new VU Schedule (in performance test parlance, VU is virtual user). VU Schedules are used to drive performance tests by setting user loads, which agents to use, playback rates and many other details related to performance tests, but none of that matters for this discussion. What is important is that VU Schedules are a test asset that allows multiple tests to run at the same time.

Here are the steps to run multiple tests at the same time from ETM.

  1. Move to the Performance Test perspective.
  2. Create a new VU Schedule (File > New > VU Schedule).
  3. Provide a File name. Click the Next button.
    New Schedule creation dialog
  4. Set the number of users to the number of Web UI tests to be run concurrently. This is where the concept of LIMITED workaround comes into play. Without VU licenses in place, this number CANNOT exceed 5. Attempting to run a schedule with more than 5 users without the necessary VU licenses results in a licensing error. Click the Finish button.
    Set number of users dialog

  5. Use the Add button to add more user groups.
    Add first User Group

  6. Repeat until the number of User Groups is equal to the number of Web UI tests to run.
    Add second User Group

    Note the initial User Group uses percentage-based user allocation while subsequent User Group entries are set to 1 user.
    Displaying User Group 1 (100%) User Group 2 (1 user)
    That first User Group setting must be modified.
  7. Click on “User Group 1” and set the Absolute value to 1.


  8. Click the Add button and select Test.
  9. Choose one of the Web UI tests and click OK. Repeat until there is at least one Web UI test assigned to each User Group.

For localized validation of the concept, click the Run VU Schedule button and watch as the tests run simultaneously. Of course one may run in front of the others on the deskop.

Execution from ETM

Disclaimer: This document is NOT being developed by ETM support. Later versions of ETM may differ in functionality.

Having DevOps Test Performance and DevOps Test UI in an Eclipse shell-share generates TWO adapter entries on the Execution > Adapter Console menu:

One (RPT on … ) represents DevOps Test Performance, the other (RTW on …) represents DevOps Test UI UI Test perspective.

"Rational Performance Tester", "RPT, "Rational Functional Tester", "RFT", "Rational Test Workbench", and "RTW" are expiring product names. With v11.0 those products were renamed to DevOps Test ____. There is a lag in this detail reaching ETM side of the communication.

The two entries have the same Machine Name and IP address. In actuality, they are the same adapter, but the Adapter type is important because it controls what types of test assets are visible on the client (testing) machine.

If there are not two entries, something isn’t properly set up with the adapter. The first thing to check is the adapter.config file (default: C:\Program Files\IBM\DevOpsTest\RPT-RST_RQMAdapter\config\adapter.config).

PRIVATE.DO_NOT_CHANGE_ADAPTER_ID.com.ibm.rqm.executionframework.common.scripttype.rpt=_<someRandomAssignedValue>
PRIVATE.DO_NOT_CHANGE_ADAPTER_ID.com.ibm.rqm.executionframework.common.scripttype.rtw=_<someOtherRandomAssignedValue>
PROJECT_AREA=yourQualityManagerProject
RQM_DISPLAY_NAME=theNameToAppearOnAdapterConsole
WORKSPACE_DIR=C:\tmp\myWorkspace

The top two lines correspond to the listing in the ETM Adapter Console. If there are not two lines, there will not be two adapters listed on the ETM side. Correcting that may require uninstall/reinstall of “missing” testing product to ensure shell-share installation is in place.

If all in is in order, the only additional step is to create an ETM Test Script of type “Rational Performance Tester”.

When selecting the adapter to use, select the RPT adapter.

When selecting the testsuite to import, select the appropriate VU schedule from the list of testsuite files.

Note that “testsuite” is a file extension used by many different types of test assets (tests, schedules, compound tests) so it is important to provide meaningful names to test assets used in the testing tool.

Running the Adapter from the Command Line

Situations may arise where keeping the Eclipse IDE active is not possible. The same functionality can be accomplished by starting the adapter from the test machine using the command line interface.

In the “Execution from ETM” section above, the adapter.config file (default location C:\Program Files\IBM\DevOpsTest\RPT-RST_Adapter\config) was mentioned. Provided all the fields in this file are properly populated, one can make use of the command line interface.

  1. Open a command prompt window (cmd).
  2. Navigate to RPT-RST_RQMAdapter\bin directory.
  3. Run this command:
    .\RQMAdapter start


The adapter can be stopped using the command: .\RQMAdapter stop

Note: While this technique is not officially supported, it is successful within the documented limitations.

 

 

 

 

 

 

 

 


#rationaltest
#DevOps
#IBMDevOpsAutomation
#ibm-rqm
#ibm-etm
#2019 Year in Review

0 comments
44 views

Permalink