🖌️
Product Process Documentation
  • Product Process Documentation
  • Definition of Done (DoD)
    • General checkpoints
      • Specific checkpoints by team
    • Important process: QA review & PO review
      • QA Review
      • PO Review
  • Work Items
    • Product Backlog Item (PBI)
    • Bug
      • Basic rules for creating a bug
      • How to report a Bug
    • Bugs Management
  • Code Standards
  • Different Test Levels
    • Unit Test
      • Frontend Unit Testing
        • What is a Unit Test?
        • How do I know if I am developing a good unit test?
        • AAA (Arrange, Act and Assert)
        • Overloaded test suits
        • Setup & Teardown
          • JEST Mocks
          • FakeTimers
        • Istanbul Annotations
        • C8 Annotations
        • JEST Runner (Debug unit tests with Jest)
    • Component Test
      • Frontend Component Testing
        • What is Component Testing?
        • Best practices
        • Bad practices
        • Setup
          • Sandbox
          • Mocks, Services and Providers
          • Test scenario
    • Integration Test
      • Frontend Integration Testing
        • What is a Integration Test?
        • AAA (Arrange, Act and Assert)
        • Best Practices
        • Bad practices
        • Setup & Teardown
        • How to create a scenario
          • Create the migrated app
          • Add to project
        • How to debug
        • Common problems
      • Testing Driven Development Guide and recommendations
    • Functional Test
    • Security Testing
      • Security Testing Tools
      • Frontend Security Testing
    • Performance testing
    • Best Practices
    • Test Documentation
  • Run test projects
    • General steps
    • Specific steps by team
  • DevOps
    • Pipelines
    • Builds
    • Specific information by team
    • Test plan
    • Service Hooks for Azure DevOps Notifications
      • Slack Notifications
      • Microsoft Teams Notifications
  • Dashboards
    • General
    • QA Dashboards
  • Release Process
    • General Steps
    • Specific steps by team
  • Migration Cells
    • Basics of testing process
  • Release process
  • References
Powered by GitBook
On this page
  • Run settings
  • Run settings configuration example for unit and integration tests
  • How to manually add the .runsettings file
  • How to execute unit and integration/system tests
  • How to run functional tests

Was this helpful?

  1. Run test projects

General steps

PreviousRun test projectsNextSpecific steps by team

Last updated 3 years ago

Was this helpful?

In this section, the basic requirements to run the test project will be explained, such as the .runsettings file, how to execute the , and tests.

Run settings

The .runsettings file is a xml file, that is used to configure the testing environment in a Visual Studio solution. This file is customizable, so for example, the .NET version used for the tests can be changed, also the parameters needed for the conversion tool test execution or the code coverage configuration. This file can be used for Unit, Integration/System and Functional Tests.

Run settings configuration example for unit and integration tests

Please check the paths in the TestRunParameters block, that variable should be modify according to the local repository path.

<RunSettings>
  <TestRunParameters>
    <Parameter name="Technology" value="Desktop" />
    <Parameter name="TestTimeout" value="10000" />
    <Parameter name="ApplicationUrl" value="D:\Repositories\WebMAPSilverlightConversionTool\bin\CmdRunner\Debug\net462\silverct.exe" />
    <Parameter name="OutputPath" value="C:\Automation" />
    <Parameter name="ConversionTool" value="D:\Repositories\WebMAPSilverlightConversionTool\bin\CmdRunner\Debug\net462\silverct.exe"/>
    <Parameter name="InputFolder" value="D:\Repositories\WebMAPSilverlightConversionTool\TestAssets"/>
    <Parameter name="OutputFolder" value="D:\Repositories\WebMAPSilverlightConversionTool\TestOutputs"/>
  </TestRunParameters>

  <!--CodeCoverage-->
  <DataCollectionRunSettings>
    <DataCollectors>
      <DataCollector friendlyName="Code Coverage" uri="datacollector://Microsoft/CodeCoverage/2.0" assemblyQualifiedName="Microsoft.VisualStudio.Coverage.DynamicCoverageDataCollector, Microsoft.VisualStudio.TraceCollector, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
        <Configuration>
          <CodeCoverage>
            <ModulePaths>
              <Include>
                <ModulePath>.*.dll</ModulePath>
              </Include>
              <Exclude>
                <ModulePath>.*.tests.dll</ModulePath>
                <ModulePath>.*.test.dll</ModulePath>
              </Exclude>
            </ModulePaths>
            <Attributes>
              <Exclude>
                <Attribute>.*Angular.*</Attribute>
              </Exclude>
            </Attributes>            
            <CompanyNames>
              <Exclude>
                <CompanyName>.*microsoft.*</CompanyName>
              </Exclude>
            </CompanyNames>
          </CodeCoverage>
        </Configuration>
      </DataCollector>
    </DataCollectors>
  </DataCollectionRunSettings>
</RunSettings>

Run settings configuration example for functional tests

Please check the technology used in the TestRunParameters, this variable is to indicate which QuallityMate support will be used for the functional tests.

<RunSettings>
  <!-- Configurations that affect the Test Framework -->
  <RunConfiguration>
    <DisableParallelization>false</DisableParallelization>
  </RunConfiguration>
  <!-- Parameters used by tests at runtime -->
  <TestRunParameters>
    <Parameter name="Application" value="http://localhost:4200/" />
    <Parameter name="Technology" value="WM_ISilver"/>
    <Parameter name="WebBrowser" value="Chrome"/>
    <Parameter name="StepTimeout" value="80000"/>
    <Parameter name="RunInBackground" value="false"/>
    <Parameter name="Incognito" value="true" />
  </TestRunParameters>
</RunSettings>

How to manually add the .runsettings file

The Windows File Chooser will be opened. Usually, the .runsettings file is located in the TestAssemblies folder. Please see the following image as guide.

How to execute unit and integration/system tests

To execute the unit tests in a Visual Studio solution, open the Test Explorer. To open the Test Explorer, please click in the menu the View option, then click on Test Explorer, or just press Ctrl+E, T in the keyboard.

In the left panel, the Test Explorer should be visible. To run all the tests click in the Run All Tests in View button.

To run each test individually, right click on the desire test, and the click in the Run or Debug option, depending on the purpose.

How to run functional tests

For Visual Studio solutions, the first step is to add the file. To do this, in Visual Studio 2019, click in the menu the Test option. Then click on Configure Run Settings, then in Select Solution Wide runsettings File.

To execute the functional tests of , follow the path WebMAPDemos\test\ui. For the desire solution, please follow the to add the .runsettings file. Usually, for WebMAP product demos, the functional tests work on a migrated version of the legacy application. For this reason, the migration process should be made before running the functional tests.

When the demo application is migrated and in a localhost site, the functional tests can be executed. As in the section, the functional test can be executed in the same way, with the Test Explorer, right click on the desire test, and click Run button to execute the test individually.

unit
integration
functional
.runsettings
WebMAP demos
steps
How to execute unit and integration/system tests
Steps to add manually the .runsettings file in Visual Studio 2019.
Runsettings file location in WFNetConversionTool.
How to open the Test Explorer in Visual Studio 2019.
Run all the tests found in the solution.
Run or debug any test individually.