You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/developer-docs/docs/develop-components/integrate-unit-tests-into-the-build-pipeline.md
+29-7Lines changed: 29 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,13 @@
2
2
3
3
Choreo allows you to integrate unit tests into the build pipeline, enabling code validation before deployment. This ensures early testing of code changes, reducing the risk of defects in production.
4
4
5
-
Currently, Choreo supports unit tests only for the `WSO2 MI` and `Ballerina` build presets.
5
+
Choreo supports unit testing for the `Java`, `Python`, `Node.js`, `Go`, `.Net`, `WSO2 Micro Integrator (MI)` and `Ballerina` build presets.
6
6
7
7
## Write tests
8
8
9
-
You can create unit tests in your source code using standard testing libraries. For step-by-step instructions on creating unit tests for WSO2 Micro Integrator projects, see [Creating a Unit Test Suite](https://mi.docs.wso2.com/en/latest/develop/creating-unit-test-suite/). For step-by-step instructions on writing unit tests for Ballerina projects, see [Test Ballerina Code](https://ballerina.io/learn/test-ballerina-code/structure-tests/).
9
+
You can create unit tests in your source code using standard testing libraries for your respective programming language or framework. Below are examples for WSO2 MI and Ballerina projects.
10
+
11
+
For step-by-step instructions on creating unit tests for WSO2 Micro Integrator projects, see [Creating a Unit Test Suite](https://mi.docs.wso2.com/en/latest/develop/creating-unit-test-suite/). For step-by-step instructions on writing unit tests for Ballerina projects, see [Test Ballerina Code](https://ballerina.io/learn/test-ballerina-code/structure-tests/).
10
12
11
13
Once you have written your unit tests, commit them to your source code repository.
12
14
@@ -29,8 +31,28 @@ Once you have enabled unit tests, trigger a new build to run them by clicking **
29
31
30
32
If a unit test fails during the build, Choreo will stop the build to prevent faulty code from being deployed. To troubleshoot, click **View Details** for the failed build and expand the failed unit test step to review the test output logs.
31
33
32
-
## Explore a sample
33
-
34
-
To see unit tests in action within the build pipeline, try out the [WSO2 MI helloworld](https://github.com/wso2/choreo-samples/tree/main/hello-world-mi) sample or the [Ballerina helloworld](https://github.com/wso2/choreo-samples/tree/main/greeting-service) sample.
35
-
36
-
34
+
## Explore samples
35
+
36
+
To see unit tests in action within the build pipeline, try out these samples:
37
+
38
+
| Build Preset | Repository Link |
39
+
|--------------|-----------------|
40
+
| WSO2 MI |[Helloworld MI Service](https://github.com/wso2/choreo-samples/tree/main/hello-world-mi)|
0 commit comments