MSTest Integration
UiTest is a class linked with MSTest and makes it easy to use the UiPlayer with MsTest. It is convenient when creating test cases using MSTest as the Test Framework.
When to use it?
When you want to take advantage of MsTest's reporting.
This integration incorporates some other MsTest features that make test cases development easier.
Execute
The way to tell QualityMate to perform the wanted steps is through the Execute method. It receives an Action containing the steps. Additionally, a UIPlayerConfiguration can be passed to it.
This method is like Execute inside UIPlayer, but is integrated with some MSTest features. Resulting in the following advantages:
Configuration from Runsettings file
You have two options for passing configuration to QualityMate, using a runsettings file or a UIPlayerConfiguration provided to the Execute method.
This is what a basic runsettings looks like:
If you're working on Visual Studio, information on how to load the runsettings can be found here.
This is how it is passed to the Execute method:
Note the following considerations:
If no configuration is provided, an exception is thrown indicating that the required parameters are needed. You can check the required parameters in this article.
If you provide both configurations, they are merged into one. Whenever they have overlapping parameters, UiPlayerConfiguration will take precedence over runsettings
Report files are attached when the test fails.
When the test fails the Log file and the screenshot of the last performed step are attached to the MsTest report. Those can be found at the end of the VisualStudio report as follow:
The attachments can be found at: {OutputPath}\{yyyy-MM-dd_HH-mm-ss}\{TestName}\
How to use UiTest?
You can use the UiPlayer with the NuGet Mobilize.QualityMate.UiTesting.MsTest
. For more information on how to use the UiPlayer, follow this link.
Last updated