Integration with RSAT
    • 12 Nov 2024
    • 8 Minutes to read
    • Contributors
    • PDF

    Integration with RSAT

    • PDF

    Article summary

    The Regression Suite Automation Tool can be a very powerful tool in the Dynamics 365 application lifecycle. It enables functional power users to record business tasks using the Finance and Operations task recorder and convert them into a suite of automated tests without the need to write source code. Test libraries are stored and distributed in Lifecycle services using the Business Process Modeler (BPM) libraries and are fully integrated with Azure DevOps Services (Azure DevOps) for test execution, reporting, and investigation. Test parameters are decoupled from test steps and stored in Microsoft Excel files.

    RSAT can be used to automate Lasernet report testing. For example, it could be used to re-validate reports after each application update or configuration change.

    RSAT Prerequisites

    • Dynamics 365 Finance and Operations environment (development or sandbox)

    • Access to LCS for the environment above

    • Client machine for RSAT tool (A Windows PC)

    • Excel on the above machine

    • Azure Dev Ops project (with Test plans license)

    • RSAT installation file

    • Windows 10 SDK (for certificate generation on Client machine)

    • Selenium drivers installation file (can be downloaded automatically)

    Installation and Configuration

    This section contains short instructions for RSAT configuration, Test setup end execution. See more details in the RSAT manual and links below.

    Create Authentication Certificate on RSAT Client Machine

    RSAT is designed to be installed on any Windows 10 computer and connect remotely via a web browser to a Dynamics 365 Finance and Operations environment.

    Ensure you have Windows Kits installed on your machine. If you do not have Windows Kits installed on your machine, you can download the Windows 10 SDK from this page. You will need these two components only for the steps described in this document.

    • Windows SDK Signing Tools for Desktop Apps

    • Windows SDK for UWP Managed Apps

    To generate a certificate file, follow these steps:

    1. Open a command line window as Administrator and run the following command from a command window:

    cd c:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64 (Your exact folder maybe different, depending on where you have installed the windows SDK. You can also use Windows Kits 8.1.)

    makecert.exe -n "CN=127.0.0.1" -ss My -sr LocalMachine -a sha256 -len 2048 -cy end -r -eku 1.3.6.1.5.5.7.3.1 c:\temp\authCert.cer

    1. When you are prompted to enter a private key password, enter 'None'.

    2. Create the C:\Temp folder if it does not already exist on your computer.

    Note

    The certificate must be generated on the same computer that the test tool is running on.

    1. Install the certificate to the Trusted Root.

    2. Double-click authCert.cer to install the certificate.

    3. Click Install Certificate…

    4. Select Local Machine > Place all certificates in the following Store > Browse > Trusted Root Certification Authorities, clicking Next through each screen.

    5. Leave the Password field blank.

    6. In the Certificate dialog, browse to the Details section and look for the Thumbprint.

    7. Preserve the Thumbprint. You will need it next.

    Configure the AOS Machine to Trust the Connection

    After creating the certificate, configure the Finance and Operations AOS to trust the test automation connection. On a multi-AOS environment, repeat the steps below for all AOS machines.

    1. Open a Remote Desktop connection to the AOS machine.

    2. Open IIS and find AOSService in the list of sites.

    1. Right-click AOSService, then click Explore.

    2. Open and find the file wif.config.

    3. Update the wif.config file by adding a new authority entry as follows. Use 127.0.0.1 for the authority name and paste your certificate thumbprint.

    Install RSAT Tool

    Download Regression Suite Automation Tool to your machine and double-click it to run the installer. RSAT requires Selenium and web browser driver libraries. RSAT will prompt you if needed libraries are missing and will automatically install them for you.

    For the initial test setup, actions should be taken in LCS, DevOps project, RSAT, and Dynamics 365 FO.

    Configure LCS

    The LCS Project, which contains the Dynamics 365 FO environment, should be linked to the DevOps site and project (which should have a license to support Test plans).

    Note

    DevOps site could be registered to other organization.

    Note

    The name in screenshot can be different.

    The LCS Project, which contains the Dynamics 365 FO environment, should have created a Business process library for LAC Testing.

    Note

    The name in screenshot can be different.

    Create a process in the Library that will be used for Testing.

    Configure DevOps

    A Test plan should be created in the DevOps project.

    An access token should be created.

    Configure RSAT

    The RSAT Tool should be configured on the client machine. It should be started in Run as Administrator mode, all settings entered:

    1. Azure DevOps Url: This is the URL of your Azure DevOps organization.

    1. Access Token: Access token that allows the tool to connect to Azure DevOps. You need to create a Personal Access Token or use an existing one that you have saved. For more information, see

    https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows

    1. Project Name: The name of your Azure DevOps project. The RSAT tool will automatically detect project names and test plans that are available based on the Azure DevOps URL specified. You can then select the required Test Project and Test Plan using a dropdown.

    2. Test Plan: The Azure DevOps test plan that contains your test cases. For more information, see

    https://learn.microsoft.com/en-us/azure/devops/test/create-a-test-plan?view=azure-devops

    1. Click Test Connection to test your connection to Azure DevOps.

    2. Hostname: Hostname of the Dynamics 365 for Finance and Operations test environment. Example:

    <myaos>.cloudax.dynamics.com.

    Do not include the https:// or http:/ prefix.

    1. SOAP Host Name: SOAP Hostname of the Dynamics 365 for Finance and Operations test environment. The SOAP hostname is typically the same as the Hostname with a soap suffix. Example:

    <myaos>soap.cloudax.dynamics.com.

    Do not include the https:// or http:/ prefix.

    1. Admin User Name: Email address of an admin user on the Finance and Operations test environment.

    2. Thumbprint: Thumbprint of the authentication certificate described earlier in this document.

    3. Working directory: Folder location for storing test automation files, including Excel test data files. For example: C:\Temp\RegressionTool

    4. Test Run Timeout: Timeout (in minutes) of a test run. All active windows are closed and pending test cases fail when this timeout is reached.

    5. Test Action timeout: Timeout (in minutes) of individual test steps. When a test step times out, the test case fails.

    6. Company name: Specify a company name to use as you default Finance and Operations company during creation of Excel Parameters files. It can be changed later my editing an Excel file.

    7. Click Apply to apply and save your settings.

    8. Click Close to close the dialog.

    The Save and Open buttons allow you to save your settings for re-use later. Click Save to save your current settings into a configuration file on your computer. Click Open to restore your settings from a configuration file on your computer.

    Record and Configure Test

    Each scenario for automated testing should be recorded first. The same applies for Lasernet Report testing, which should be recorded with Task recorder. It should be started with an initial Dynamics 365 workspace screen. Follow these steps:

    1. Start recording.

    1. Add an appropriate Recording name and Description, and then click Start.

    1. The Lasernet Run test scenario should be called from Lasernet > Test and performance suite > Test > Run test.

    Note

    To avoid conflicts and misinterpretation of stored values, it is recommended to change Run test by to other value and back (it clears previously entered Run test criteria).

    1. Enter the required Checkpoint, which is reflected in the Task recorder details section.

    1. Click Run in the Run test dialog.

    2. After the process is ended (test passed), click Stop in the Task recorder.

    1. Click Save to Lifecycle Services and load it to Business process library and Process created for testing:

    Your title goes here

    If load fails, it could be saved to This PC and manually loaded into Library in LCS page.

    1. Call Save as developer recording, which generates and downloads the *.xml file. Rename it Recording.xml for later use (attaching to Azure DevOps test case).

    1. On the Business process libraries page, on the tile for the library that you want to synchronize, select the ellipsis button (), and then select Azure DevOps sync.

    1. After Azure DevOps synchronization is complete, select the ellipsis button (), and then select Sync test cases.

    1. When this step is complete, your task recordings will become test cases in Azure DevOps, and a link will appear under the Requirements tab.

    2. Work items should be added to the Test plan. Use the Add existing option, query the tag LCS:Test Cases, and add them to the Test plan.

    1. The recordings saved and renamed Recording.xml should now be uploaded to Test cases created (in case Recording.xml already exists there, usually zero in size, it should be deleted).

    After completing all these steps, the RSAT tool can be used to run tests.

    Note

    In case of a non-forced test, the system picks up the last generated report archive as Report run result for testing and uses it in comparison with Checkpoint. Users must make sure that the correct report run parameters were chosen (same data and same setup as for Test checkpoint). In the case of an automated test run it could be a separate linked stored business process scenario recorded running the report (and generating result archive) just before the report Test run.

    Run the Test

    The test is executed using the RSAT tool on the client's machine. Results are uploaded into DevOps and actions can be planned accordingly. The RSAT tool should be opened in Administrator mode and Load clicked.

    This loads Test cases from DevOps into the RSAT tool.

    This Test execution should be created using the New function. It creates all required files on Customer side, including parameters. Usually it should be enough to Run tests and Upload results into DevOps for later actions. Test Run opens separate specific browser session, executes recorded scenario and gets Infolog messages for Result (pass/fail) identification.

    Warning

    RSAT client computer should not have scaling applied for display settings. It should be 100%.

    After test Run and Upload, the test results can be seen in DevOps, in Test Plans\Runs.

    Test automation can be enhanced by modifying parameters (Excel files), or Task recordings used. It can handle specific value reading from controls, passing values between Tests, etc. Check the links below for further details:

    Links


    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.