Professional Documents
Culture Documents
Table of Contents
Overview .................................................................................................................................................................... 4
End-to-end Flow..................................................................................................................................................... 4
Intended Usage and Test Classification ................................................................................................................. 5
Business cycle (Business process) testing .......................................................................................................... 5
Data Integration testing ..................................................................................................................................... 6
Unit and component testing .............................................................................................................................. 6
Task Recordings and Validation of Expected Values.............................................................................................. 6
Prerequisites .............................................................................................................................................................. 7
Dynamics 365 for Finance and Operations test environment ............................................................................... 7
Excel ....................................................................................................................................................................... 7
Azure DevOps......................................................................................................................................................... 7
Authentication Certificate...................................................................................................................................... 7
Install .......................................................................................................................................................................... 9
Install the Tool ....................................................................................................................................................... 9
Install Selenium and Browser Drivers .................................................................................................................... 9
Run ........................................................................................................................................................................... 10
Configure.............................................................................................................................................................. 11
Load Test Cases and Create Automation Files ..................................................................................................... 12
Modify Test Parameters....................................................................................................................................... 13
Run a test as a specific user ............................................................................................................................. 14
Run a test in the context of a specific company .............................................................................................. 14
Infolog Validation ............................................................................................................................................. 14
Run ....................................................................................................................................................................... 14
Investigate Results ............................................................................................................................................... 15
Test Response Times ........................................................................................................................................ 17
Save your Work .................................................................................................................................................... 17
Chaining of Test Cases ............................................................................................................................................. 17
Best Practices ........................................................................................................................................................... 19
Authoring test cases using the Task Recorder ..................................................................................................... 19
Overview
The Regression Suite Automation Tool (RSAT) significantly reduces the time and cost of user acceptance testing.
User acceptance testing is typically required before taking a Microsoft application update or applying custom
code and configurations to your Dynamics 365 for Finance and Operations production environment.
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 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 .
End-to-end Flow
This tool is part of the end to end flow described below. Finance and Operations, along with LCS and Azure
DevOps, provide a set of tools for test case authoring (using task recorder), configuration, execution,
investigation and reporting.
(https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/lifecycle-services/using-task-
guides-and-bpm-to-create-user-acceptance-tests)
Note
Using Lifecycle Services (and BPM) is recommended but not mandatory. You can manually create test cases in
Azure DevOps and attach developer recording files to your Azure DevOps test cases. Developer recording files can
be created directly from the task recorder pane in Finance and Operations.
You must name the developer recording file Recording.xml before attaching it to an Azure DevOps test case.
For more information on how to create task recordings, see this topic.
Prerequisites
Dynamics 365 for Finance and Operations test environment
Your Dynamics 365 for Finance and Operations test environment must be running Platform update 15 or newer.
The Regression Suite Automation Tool must have access to your Dynamics 365 for Finance and Operations test
environment via a web browser.
Excel
You need Microsoft Excel installed to generate and edit test parameters.
Azure DevOps
You must have an Azure DevOps project to store and manage your test cases, test plans and test case results.
You will need an Azure DevOps Test Manager license. For example, if you have a Visual Studio Enterprise
subscription, you already have a license to Test Manager. For more information, visit the pricing page for Azure
DevOps.
Authentication Certificate
To enable authentication, you need to generate and install a certificate. Below are step-by-step instructions. If
you are not familiar with this process, get help from your system administrator. Make sure 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 https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk . You
will need these two components only for the steps described in this document.
5. Preserve the Thumbprint, you will need it later. See next sections for more details.
1. Modify l to make the AOS trust this certificate. To do that, open IIS and find Dynamics 365 for
Operations in the list of sites. Click Explore to open and find the file wif.config.
+
2. Update the wif.config file by adding a new authority entry for your certificate and authority name as
shown here.
<issuerNameRegistry type="Microsoft.Dynamics.AX.Security.SharedUtility.AxIssuerNameRegistry,
Microsoft.Dynamics.AX.Security.SharedUtility">
<authority name="CN=127.0.0.1">
<keys>
<add thumbprint="ccbc124d0a119xxxxxxxxxxxxxxxxxxxx841e797" />
</keys>
<validIssuers>
<add name="CN=127.0.0.1" />
</validIssuers>
</authority>
3. Restart IIS.
Install
Install the Tool
Download Regression Suite Automation Tool.msi to your machine and double-click it to run the installer.
1. Go to https://sites.google.com/a/chromium.org/chromedriver/downloads
2. Download chromedriver_win32.zip from the latest/current release.
3. Unzip the downloaded file and move the contents to "C:\Program Files (x86)\Regression Suite
Automation Tool\Common\External\Selenium”
Run
Open the tool from your desktop.
The following sections explain how to configure the tool, load test cases from Azure DevOps, generate
automation files, modify test parameters, run tests, investigate results, and save your work back to Azure
DevOps.
Configure
Click “Settings” button on the top right and fill the dialog as follows:
1. Azure DevOps Url: This is the URL of your Azure DevOps project. Example:
https://yourAzureDevOpsUrlHere.visualStudio.com
2. 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://www.visualstudio.com/en-us/docs/setup-admin/team-services/use-personal-access-
tokens-to-authenticate
3. Project Name: The name of your Azure DevOps project.
4. Test Plan: The Azure DevOps test plan that contains your test cases. For more information, see
https://www.visualstudio.com/en-us/docs/test/manual-exploratory-testing/getting-
started/create-a-test-plan
5. Click “Test Connection” to test your connection to Azure DevOps.
6. 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.
7. 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.
8. Admin User Name: Email address of an admin user on the Finance and Operations test
environment.
9. Thumbprint: Thumbprint of the authentication certificate described earlier in this document.
10. Working directory: Folder location for storing test automation files, including Excel test data
files. For example: C:\Temp\RegressionTool
11. Test Run Timeout: Timeout (in minutes) of a test run. All active windows are closed, and
pending test cases are failed.
12. 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.
13. Click Apply to apply and save your settings.
14. Click Close to close the dialog.
The Save and Open buttons allow you to save your settings for reuse 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.
Test cases are organized by test suites under a common test plan. These are test suites you created in your
Azure DevOps project. Using this tool, you can work with one test suite at a time.
If the tool fails to load any test case, verify that your test plan in Azure DevOps is properly created and contains
the desired test suites and test cases.
If this is the first time you load this test plan, the Parameters File column will be blank. You will need to create
test automation files for your test cases. Test automation files consist of:
COPYRIGHT MICROSOFT CORPORATION 2019
12
Regression Suite Automation Tool 03/01/2019
Test parameter files (Microsoft Excel files contain test case parameters)
Other binary and XML files needed to execute the tests.
When you click the New button, test automation files are generated in your working directory. The Excel test
parameter files will appear on the grid under Parameters File.
You can also generate binary and XML files only without overwriting your parameter files: Use submenu New-
>Generate Execution Files only to re-generate execution files only and leave Excel files untouched. This is typical
when you install a new version of the tool, you can update your execution files while preserving the test
parameter files.
In addition to the General tab, the Excel file contains a data tab for every Finance and Operations form that the
test case visits.
Select the desired form (Excel tab) you want to edit and identify the parameter values that you want to change.
Values are identified by their control name. If you are not sure which control is the right one, open the form in
Finance and Operations, right-click the control whose value you want to change and select form information.
Infolog Validation
Excel parameter files that are generated using version 1.200 or newer contain an InfologValidation tab.
You can enter messages in this tab under Infolog Validation. After a test case completes execution, it validates
that the messages specified here appear in the Finance and Operations info log. The test case will fail if these
messages are not found.
Run
Click Run to execute the selected test cases. Only test cases with existing automation files can be run. The tool
will open Finance and Operations and execute these tests with the data you entered in Excel.
Note: You can modify the order in which test cases are executed using the up and down arrow buttons.
Investigate Results
When all test cases complete execution, Pass or Fail will be populated in the Result column. You can click on the
result to see error messages.
More investigation details are available in Azure DevOps. From your Azure DevOps project page, go to Test >
Runs.
Select the desired test run. It will include the results of all tests that were executed during that run.
You can open a failed test result and review the ErrorMessage section for information about the failure.
You can also review the response time of each step of the test case by opening the BaseTime.xml file attached
to the test result.
Once test automation files are uploaded to Azure DevOps, the next time your use RSAT, even from a different
computer, you will simply need to Load then Run without the need to generate test execution files or edit Excel
parameter files.
To save the value of a variable while recording the test in Task Recorder, right click the field and click Task
recorder > Copy as shown below. This will save the variable in the recording file; this variable can be used in
subsequent tests.
In the Excel data file, these saved values appear in the Saved variables table of the General Tab.
To reuse these variables during test playback, copy the variable name and use it in place of a parameter value in
the data file of another test (or the same test) as shown below.
Note that variables can only be passed between tests during the same test run and the name of the variables
must match exactly.
Best Practices
Authoring test cases using the Task Recorder
1. Make sure all your recordings start on the main dashboard of Finance and Operations (or Retail).
2. Keep individual recordings short and focus on a business task performed by one user, like creating a
sales order. This simplifies maintainability and reusability of test cases.
3. Chart controls are not supported, any task recording actions related to charts will be ignored by RSAT
during test case playback.
4. When creating a recording make sure to click on a tab header even if the tab is already open. For
example, you can switch to another tab and then click back on the needed tab to activate it before using
a control on it. This will make your recording more reliable during test case playback.
5. If you edit your recording after it has been created, do not change the order of the steps. You can add or
delete a step instead.
6. RSAT cannot playback any test step that is not recognized by the task recorder. For example: You cannot
upload a file from the local disk during playback of a test case.
7. RSAT cannot playback a “page refresh” step, avoid refreshing a page while recording your test.
Using RSAT
1. Upon opening the tool for the first time, click on Settings and ensure you have all the desired settings.
2. Before installing a new version of the tool, it is recommended to uninstall the previous version.
3. When you install a new version of the tool, regenerate test execution files.
It is not necessary to regenerate Excel parameter files unless you want to take advantage of new
features available in a newer format of parameter files.
4. For test parameters needing a unique value (e.g. product receipt number in the Product Receipt form or
invoice number in the Vendor Invoice form), use the RandBetween(a,b) Excel function to generate a
unique number every time the test case is executed.
5. The default values in Excel come from the task recording. For certain Reference Group controls (such as
storage dimensions, tracking dimensions etc…), it stores the key of the lookup instead of the value (e.g.
2 instead of SiteWH). It is recommended to update these fields with the actual value in Excel so that the
test is more robust and resilient to changes.
Sequence A: Load->New->Edit->Run->Upload
1. Click Load.
2. Select desired test case(s).
3. If some test cases have no parameter file, click New to generate them.
4. Optional step: Edit Excel file to run tests with different parameters.
5. Click Run.
6. Optional step: After a successful run, click Upload to upload all generated automation files
(including Excel test parameter files) to Azure DevOps.
Sequence B: Load->Edit->Run->Upload
1. Click Load.
(If all parameter files already exist, there is no need to click New to regenerate)
2. Optional step: Edit Excel file to run tests with different parameters.
3. Click Run.
4. Optional step: After a successful run, click Upload to upload all generated automation files
(including Excel test parameter files) to Azure DevOps.
1. Click Load.
2. Select all test cases in the test plan and click New.
3. Edit Excel parameter files
4. Click Run
5. After a successful run, click Upload to upload all generated test artifacts to Azure DevOps.
In the Finance and Operations web client, open the Task recorder pane and start editing the recording using
the Edit Recording option.
You can add or remove any step; however, do not re-order steps because RSAT will not be able to playback
the edited recording correctly. If you must reorder steps, re-create the recording from scratch or re-order by
deleting and re-adding a step.
When you finish editing, playback the recording in the Finance and Operations client verify that all steps pass
and then save it. It is then safe to playback the edited recording using RSAT.
4. Excel data tabs display the system identifiers for data variables. It does not display friendly names.
5. You can’t initiate a run while Excel test parameter files are open.
6. If you have used a previous version of the test tool, please uninstall it before installing the new version.
7. If you are testing against a Standard Acceptance Test Sandbox environment (Tier2) or any other multi-
box environment, and you get the following error when you run a test:
Assuming you have specified the correct SOAP hostname in the settings dialog, run the following
Powershell script on your client computer where the test tool is installed:
if ((Test-Path HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319))
8. Sometimes Chrome browser don’t work with the tool due to AD security settings. In this case, change
your settings to use Internet Explorer browser.