Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Test Profile App Unit Test Code Coverage
# Tizen Native Application Unit Test With Code Coverage


> [!NOTE]
> [NOTE]
>
> Before you run the Unit Test and Code Coverage, make sure:
> - You have an Emulator or a connected target device running.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Tizen Web App Unit Test
# Tizen Web Application Unit Test

> **Note**
> **[NOTE]**
>
> Before running the **Web Unit Test**, make sure:
> - You have an **Emulator** or a connected **target device** running.
Expand Down Expand Up @@ -36,7 +36,7 @@
1. Right-click again on your **Web project name**.
2. Select **Run Tizen Web Unit Test**.
3. The test will execute on your selected emulator or connected device.
4. Once complete, the test results will be displayed in the output window.
4. Once complete, the test results will be displayed in the output window in a tree format. It shows the passed tests with a green icon and failed tests with a red icon. When you click on certain the test result, it will take you to the tastcase in the generated test file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be like this: Upon double click on the failed test case, the cursor will navigate to the line the test case failed


![Web Unit Test Result](media/web_unit_test_result.png)
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add functionality of double click on failure to get to failed line

43 changes: 38 additions & 5 deletions docs/application/vstools/tools/unit-test-with-code-coverage.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,43 @@
# Unit Test with Code Coverage

The Code Coverage is a profiling tool used to determine the coverage details of Tizen Native Applications. It helps you to understand the code quality of your application. The Code Coverage tool finds the parts of the code covered during the execution of the unit test cases. A program with high code coverage (measured in percentage) implies that most of the source code is covered during testing, and the source code has a lower chance of containing undetected software bugs.
**Code Coverage** is a profiling tool used to measure how much of your application's source code is executed while running unit tests. It helps evaluate **code quality** and identify untested parts of your codebase.

The code coverage tool in the Tizen Extension for Visual Studio is based on the `llvm-cov` tool. Using the Code Coverage tool, you can detect parts of code that are not covered by a unit test, and ensure that the uncovered code does not cause errors at runtime. The Code Coverage tool supports functional, statement, and branch coverage.
A higher coverage percentage indicates that most of your source code has been tested, which reduces the likelihood of undetected software bugs. By using **Unit Tests**, you can verify the correctness of your code, improve reliability, and maintain high software quality.

With a Unit Test, you can verify that your code works well, and increases its reliability. Tizen Studio Extension for VS provides the creating, building, and editing tools for unit tests, and a view for checking and analyzing the test results.
It uses the `gtest` framework to make and launch the test cases. To manage your test cases, you can use the test explorer view.
The **Tizen Studio Extension for Visual Studio** provides tools for:
- Creating, building, and editing unit tests
- Running and analyzing test results
- Measuring and visualizing code coverage

Get started with [Unit test code coverage information of native application on VS](../getting-started/test-profile-app-unit-test-code-coverage.md)
---

## Native Application

For **Native Applications**, the Code Coverage feature in the **Tizen Extension for Visual Studio** is powered by the **`llvm-cov`** tool.
It helps you:
- Detect code segments that are not covered by unit tests
- Ensure that uncovered code does not cause runtime issues
- Measure different types of coverage:
- **Functional coverage**
- **Statement coverage**
- **Branch coverage**

The extension uses the **Google Test (gtest)** framework to create and execute test cases.

> 📘 **Learn more:**
> Get started with [Unit Test With Code Coverage for Native Applications on Visual Studio](../getting-started/test-profile-app-unit-test-code-coverage.md)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the get started with like before

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation has changed to the right, check why?


---

## Web Application

For **Web Applications**, you can also create and run unit tests within the **Tizen Extension for Visual Studio**.
These tools allow you to:
- Write test cases for web projects
- Execute them on an emulator or target device
- View and analyze test results directly in Visual Studio

> 📘 **Learn more:**
> Get started with [Unit Test for Web Applications on Visual Studio](../getting-started/web-app-unit-test.md)

---