Skip to content

Commit

Permalink
Update unit-testing.md (#43033)
Browse files Browse the repository at this point in the history
Changed 'that' to 'than' and removed double period (.) from table.
  • Loading branch information
BigT-88 authored Oct 11, 2024
1 parent 3de9fb6 commit 57dff72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/architecture/maui/unit-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ms.date: 05/30/2024

Multi-platform apps experience problems similar to both desktop and web-based applications. Mobile users will differ by their devices, network connectivity, availability of services, and various other factors. Therefore, multi-platform apps should be tested as they would be used in the real world to improve their quality, reliability, and performance. Many types of testing should be performed on an app, including unit testing, integration testing, and user interface testing. Unit testing is the most common form and essential to building high-quality applications.

A unit test takes a small unit of the app, typically a method, isolates it from the remainder of the code, and verifies that it behaves as expected. Its goal is to check that each unit of functionality performs as expected, so errors don't propagate throughout the app. Detecting a bug where it occurs is more efficient that observing the effect of a bug indirectly at a secondary point of failure.
A unit test takes a small unit of the app, typically a method, isolates it from the remainder of the code, and verifies that it behaves as expected. Its goal is to check that each unit of functionality performs as expected, so errors don't propagate throughout the app. Detecting a bug where it occurs is more efficient than observing the effect of a bug indirectly at a secondary point of failure.

Unit testing has the most significant effect on code quality when it's an integral part of the software development workflow. Unit tests can act as design documentation and functional specifications for an application. As soon as a method has been written, unit tests should be written that verify the method's behavior in response to standard, boundary, and incorrect input data cases and check any explicit or implicit assumptions made by the code. Alternatively, with test-driven development, unit tests are written before the code. For more information on test-driven development and how to implement it, see [Walkthrough: Test-driven development using Test Explorer.](/visualstudio/test/quick-start-test-driven-development-with-test-explorer)

Expand Down Expand Up @@ -66,7 +66,7 @@ The eShop multi-platform app uses [MSTest](../../core/testing/unit-testing-with-

| Testing Type | Attribute | Description |
|-----------------|--------------|--------------------------------------------------------------|
| TestMethod | `TestMethod` | Defines the actual test method to run.. |
| TestMethod | `TestMethod` | Defines the actual test method to run. |
| DataSource | `DataSource` | Tests that are only true for a particular set of data. |

The unit tests included with the eShop multi-platform app are TestMethod, so each unit test method is decorated with the `TestMethod` attribute. In addition to MSTest there are several other testing frameworks available including [NUnit](../../core/testing/unit-testing-with-nunit.md) and [xUnit](../../core/testing/unit-testing-with-dotnet-test.md).
Expand Down

0 comments on commit 57dff72

Please sign in to comment.