-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add unit testing doc page #1692
base: dev
Are you sure you want to change the base?
Conversation
en/docs/choreo-concepts/ci-cd.md
Outdated
@@ -24,6 +24,8 @@ Choreo auto-generates build pipelines that may slightly differ depending on the | |||
- Pushes the container image to a container registry. In the cloud data plane, Choreo pushes the image to a Choreo-managed registry. If it is a private data plane organization, Choreo pushes the image to a registry that you own. | |||
- Updates service endpoints and API specifications from the provided repository if applicable. | |||
|
|||
In addition to these steps, some buildpacks support unit testing in the build pipeline. Refer to [Unit Testing in Choreo Build Pipeline](../testing/unit-testing-in-build-pipeline.md) for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
In addition to these steps, some buildpacks support integrating unit tests into the build pipeline. For more details, see Integrate Unit Tests into the Build Pipeline.
@@ -0,0 +1,28 @@ | |||
# Unit Testing in Choreo Build Pipeline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
Integrate Unit Tests into the Build Pipeline
Suggesting because the overall capability is more Choreo supporting creating and integrating unit tests into the build pipeline.
@@ -0,0 +1,28 @@ | |||
# Unit Testing in Choreo Build Pipeline | |||
|
|||
Choreo supports unit testing as part of the build pipeline, enabling users to validate their applications before deployment. This feature ensures that code changes are tested early, reducing the risk of defects in production. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
Choreo supports integrating unit tests into the build pipeline, allowing you to validate code before deployment. This ensures early testing of code changes, reducing the risk of defects in production.
Choreo supports unit testing as part of the build pipeline, enabling users to validate their applications before deployment. This feature ensures that code changes are tested early, reducing the risk of defects in production. | ||
|
||
!!! note | ||
Currently, Choreo only supports unit testing for the `WSO2 MI` buildpack. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, Choreo supports unit tests only for the WSO2 MI buildpack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We would need to mention the component types too yeah? As of now this is supported only for Schedules Task, Manual Task, and Event Handler component types is it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This supports any MI component type regardless of the type
!!! note | ||
Currently, Choreo only supports unit testing for the `WSO2 MI` buildpack. | ||
|
||
## How It Works |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## How It Works | |
## How it works |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use sentence-style capitalization for all subheadings. https://github.com/wso2/docs-choreo-dev/wiki/General-Writing-Style#titles-and-headings.
|
||
In your source code, develop unit tests using standard testing libraries. For example, unit tests can be developed for a WSO2 MI project by following this [documentation](https://mi.docs.wso2.com/en/latest/develop/creating-unit-test-suite/). | ||
|
||
### Enable Unit Testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### Enable Unit Testing | |
### Enable unit testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use sentence-style capitalization for all subheadings. https://github.com/wso2/docs-choreo-dev/wiki/General-Writing-Style#titles-and-headings.
3. **Save** the changes. | ||
4. Trigger a new build. | ||
|
||
### View Test Results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### View Test Results | |
### View test results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use sentence-style capitalization for all subheadings. https://github.com/wso2/docs-choreo-dev/wiki/General-Writing-Style#titles-and-headings.
|
||
If unit testing fails, Choreo allows you to view logs. Click **View Details** of the failed build, then click the failed **Unit Test** step to view logs. | ||
|
||
## Get Started |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we go with something along the lines of "Try it out" or "Explore a sample"?
|
||
## How It Works | ||
|
||
### Develop tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Write" and "create" are terms commonly used in reference to unit tests. Shall we use one of those terms instead of “Develop”?
|
||
### Develop tests | ||
|
||
In your source code, develop unit tests using standard testing libraries. For example, unit tests can be developed for a WSO2 MI project by following this [documentation](https://mi.docs.wso2.com/en/latest/develop/creating-unit-test-suite/). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion:
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].
Purpose
https://github.com/wso2-enterprise/choreo/issues/31861
Goals
Approach
Release note
Samples
Related PRs