-
Notifications
You must be signed in to change notification settings - Fork 130
MsTest .runsettings .testsettings
Jakub Raczek edited this page Apr 25, 2019
·
7 revisions
MsTest unit tests in Visual Studio can be configured by using a *.runsettings file or *.testsettings. It depends on Visual Studio version you using or test runner version.
Both files should be added as a content to your project during installation of each Ocaramba.MsTest nuget package.
One of solution is to use:
- RunSettings.runsettings file. More details can be found here or here how to run unit tests mstest in parallel.
<?xml version="1.0" encoding="UTF-8"?>
<RunSettings>
<RunConfiguration>
<MaxCpuCount>4</MaxCpuCount>
<ResultsDirectory>.\</ResultsDirectory>
</RunConfiguration>
<!-- MSTest adapter -->
<MSTest>
<CaptureTraceOutput>false</CaptureTraceOutput>
<DeleteDeploymentDirectoryAfterTestRunIsComplete>False</DeleteDeploymentDirectoryAfterTestRunIsComplete>
<DeploymentEnabled>False</DeploymentEnabled>
<!--<SettingsFile>.\Testsettings.testsettings</SettingsFile>
<ForcedLegacyMode>true</ForcedLegacyMode>-->
</MSTest>
</RunSettings>
- Or to use combination of RunSettings.runsettings file and Testsettings.testsettings file.
RunSettings.runsettings
<?xml version="1.0" encoding="UTF-8"?>
<RunSettings>
<RunConfiguration>
<!--<MaxCpuCount>4</MaxCpuCount>-->
<ResultsDirectory>.\</ResultsDirectory>
</RunConfiguration>
<!-- MSTest adapter -->
<MSTest>
<CaptureTraceOutput>false</CaptureTraceOutput>
<DeleteDeploymentDirectoryAfterTestRunIsComplete>False</DeleteDeploymentDirectoryAfterTestRunIsComplete>
<DeploymentEnabled>False</DeploymentEnabled>
<SettingsFile>.\Testsettings.testsettings</SettingsFile>
<ForcedLegacyMode>true</ForcedLegacyMode>
</MSTest>
</RunSettings>
Testsettings.testsettings
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="Local" id="164f37f6-b408-4a43-9caa-97fe6ccd4dc4" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>These are default test settings for a local test run.</Description>
<Deployment enabled="false"/>
<Execution parallelTestCount = "2">
<TestTypeSpecific />
<AgentRule name="Execution Agents">
</AgentRule>
</Execution>
</TestSettings>
-
Or use only Testsettings.testsettings file.
-
In Visual Studio remember to set proper configuration file in Test menu
- Home
- Getting started
- Parallel tests execution
- MsTest DataDriven tests from Xml and CSV files
- NUnit DataDriven tests from Xml, CSV and Excel files
- Comparing files by NUnit DataDriven tests
- Visual Testing
- Screen shots: full desktop, selenium. PageSource saving
- Verify-asserts without stop tests
- Downloading files
- Helpers
- Override browser profile preferences, install browser extensions, Headless mode
- Debugging Test.Automation framework
- Logging
- Performance measures
- Webdriver Extends
- More common locators
- Selenium-Grid-support
- Advanced Browser Capabilities and Options
- AngularJS synchronization
- Update App.config or appsettings.json
- Cross browser parallel test execution with testing-Cloud-Providers\SeleniumGrid
- Verifying Javascript Errors from browser
- Enabling Performance Log for Chrome
- Azure DevOps Support
- Edge browser Support
- Downloading and running Selenium Grid with Powershell
- Run Ocaramba tests with Docker container
- HTTP auth in Internet explorer
- ExtentReports Support