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
│ ├── examples # the examples that can be used for testing
35
64
│ ├── manifests # requred manifests for tests
36
65
│ └── tests # tests
37
-
├── agntcy-agp # Agent Gateway related tests, components, etc...
38
-
│ └── agentic-apps # Agentic apps for gateway tests
39
-
│ ├── autogen_agent
40
-
│ └── langchain_agent
41
-
└── report # tools for reportning test results
66
+
└── agntcy-agp # Agent Gateway related tests, components, etc...
67
+
└── agentic-apps # Agentic apps for gateway tests
68
+
├── autogen_agent
69
+
└── langchain_agent
42
70
```
43
71
44
72
## Running tests
45
73
46
74
We can launch tests using taskfile locally or in GitHub actions.
47
75
Running locally we need to create a test cluster and deploy the test env on
48
-
it before running the tests.
76
+
it before running the tests. It requires Kind and Helm installed on local machine.
77
+
Instructions for installing [helm](https://helm.sh/docs/intro/install/) and [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation)
49
78
50
-
```
79
+
```bash
51
80
cd integrations
52
81
task kind:create
53
82
task test:env:directory:deploy
54
83
task test:directory
55
84
```
56
85
57
86
We can focus on specified tests:
58
-
```
87
+
```bash
59
88
task test:directory:compiler
60
89
```
61
90
62
91
After we finish the tests we can destroy the test cluster
63
-
```
92
+
```bash
64
93
task kind:destroy
65
94
```
66
95
@@ -69,16 +98,128 @@ task kind:destroy
69
98
70
99
We can run integration test using Github actions using `gh` command line tool or using the GitHub web UI
71
100
72
-
```
101
+
```bash
73
102
gh workflow run test-integrations -f testenv=kind
74
103
```
75
104
76
105
If we want to run the tests on a specified branch
77
106
78
-
```
107
+
```bash
79
108
gh workflow run test-integrations --ref feat/integration/deploy-agent-directory -f testenv=kind
80
109
```
81
110
111
+
112
+
## How to extend tests with your own test
113
+
114
+
Contributing your own tests to our project is a great way to improve the robustness and coverage of our testing suite. Follow these steps to add your tests.
Create a new branch for your test additions to keep your changes organized and separate from the main codebase.
129
+
130
+
131
+
```bash
132
+
git checkout -b add-new-test
133
+
```
134
+
135
+
3. Navigate to the Integrations Directory
136
+
137
+
Locate the integrations directory where the test components are organized.
138
+
139
+
```bash
140
+
cd integrations
141
+
```
142
+
143
+
4. Add Your Test
144
+
145
+
Create a new sub-directory for your test if necessary, following the existing structure. For example, integrations/new-component.
146
+
Add all necessary test files, such as scripts, manifests, and configuration files.
147
+
148
+
5. Update Taskfile
149
+
150
+
Modify the Taskfile.yaml to include tasks for deploying and running your new test.
151
+
152
+
```yaml
153
+
tasks:
154
+
test:env:new-component:deploy:
155
+
desc: Desription of deployig new component elements
156
+
cmds:
157
+
- # Command for deploying your components if needed
158
+
159
+
test:env:new-component:cleanup:
160
+
desc: Desription of cleaning up component elements
161
+
cmds:
162
+
- # Command for cleaning up your components if needed
163
+
164
+
test:new-component:
165
+
desc: Desription of the test
166
+
cmds:
167
+
- # Commands to set up and run your test
168
+
```
169
+
170
+
6. Test Locally
171
+
172
+
Before pushing your changes, test them locally to ensure everything works as expected.
173
+
174
+
```bash
175
+
task kind:create
176
+
task test:env:new-componet:deploy
177
+
task test:new-component
178
+
task test:env:new-componet:cleanup
179
+
task kind:destroy
180
+
```
181
+
182
+
7. Document Your Test
183
+
184
+
Update the documentation in the docs folder to include details about your new test. Explain the purpose of the test, any special setup instructions, and how it fits into the overall testing strategy.
185
+
186
+
8. Commit and Push Your Changes
187
+
188
+
Commit your changes with a descriptive message and push them to your fork.
189
+
190
+
```bash
191
+
git add .
192
+
git commit -m "feat: add new test for component X"
193
+
git push origin add-new-test
194
+
```
195
+
196
+
9. Submit a Pull Request
197
+
198
+
Go to the original repository on GitHub and submit a pull request from your branch.
199
+
Provide a detailed description of what your test covers and any additional context needed for reviewers.
200
+
201
+
# Samples
202
+
203
+
The directory sturcture of the samples applications:
The samples directory in the CSIT repository serves two primary purposes related to the testing of agentic applications:
216
+
217
+
218
+
1. Compilation and Execution Verification: The agentic applications stored within the samples directory are subjected to sample tests. These tests are designed to run whenever changes are made to the agentic apps to ensure they compile correctly and are able to execute as expected.
219
+
2. Base for Agent Directory Integration Test:
220
+
The agentic applications in the samples directory also serve as the foundation for the agent model build and push test. This specific test checks for the presence of two required files: model.json and build.config.yaml. If these files are present within an agentic application, the integration agent model build and push testa are triggered. This test is crucial for validating the construction and verification of the agent model, ensuring that all necessary components are correctly configured and operational.
0 commit comments