Skip to content

Commit de287e2

Browse files
authored
doc: update readme (#32)
Signed-off-by: Peter Balogh <p.balogh.sa@gmail.com>
1 parent 3fa69ef commit de287e2

File tree

1 file changed

+152
-11
lines changed

1 file changed

+152
-11
lines changed

README.md

Lines changed: 152 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,41 @@
77
- [Running tests](#running-tests)
88
- [Running tests using GitHub actions](#running-tests-using-github-actions)
99
- [Copyright Notice](#copyright-notice)
10+
- [Samples](#samples)
1011

1112
## Architecture
1213

1314
Agncty CSIT system design needs to meet continuously expanding requirements of
1415
Agntcy projects including Agent Gateway Protocol, Agent Directory and many more.
1516

17+
The directory structure of the CSIT:
18+
19+
```
20+
csit
21+
└── integrations
22+
| ├── Taskfile.yaml # Task definitions
23+
| ├── docs # Documentations
24+
| ├── environment
25+
| │   └── kind # kind related manifests
26+
| ├── agntcy-dir # Agent directory related tests, components, etc...
27+
| │   ├── components # the compontents charts
28+
| │   ├── examples # the examples that can be used for testing
29+
| │   ├── manifests # requred manifests for tests
30+
| │   └── tests # tests
31+
| └── agntcy-agp # Agent Gateway related tests, components, etc...
32+
| └── agentic-apps # Agentic apps for gateway tests
33+
|    ├── autogen_agent
34+
|    └── langchain_agent
35+
|
36+
└── samples
37+
├── app1 # Agentic application example
38+
│ ├── model.json # Required model file
39+
│ ├── build.config.yaml # Required build configuration file
40+
├── app2 # Another agentic application example
41+
│ ├── model.json
42+
│ ├── build.config.yaml
43+
```
44+
1645

1746
# Integration tests
1847

@@ -34,33 +63,33 @@ integrations
3463
│   ├── examples # the examples that can be used for testing
3564
│   ├── manifests # requred manifests for tests
3665
│   └── 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
4270
```
4371

4472
## Running tests
4573

4674
We can launch tests using taskfile locally or in GitHub actions.
4775
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)
4978

50-
```
79+
```bash
5180
cd integrations
5281
task kind:create
5382
task test:env:directory:deploy
5483
task test:directory
5584
```
5685

5786
We can focus on specified tests:
58-
```
87+
```bash
5988
task test:directory:compiler
6089
```
6190

6291
After we finish the tests we can destroy the test cluster
63-
```
92+
```bash
6493
task kind:destroy
6594
```
6695

@@ -69,16 +98,128 @@ task kind:destroy
6998

7099
We can run integration test using Github actions using `gh` command line tool or using the GitHub web UI
71100

72-
```
101+
```bash
73102
gh workflow run test-integrations -f testenv=kind
74103
```
75104

76105
If we want to run the tests on a specified branch
77106

78-
```
107+
```bash
79108
gh workflow run test-integrations --ref feat/integration/deploy-agent-directory -f testenv=kind
80109
```
81110

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.
115+
116+
1. Fork and Clone the Repository
117+
118+
Fork the repository to your GitHub account.
119+
Clone your fork to your local machine.
120+
121+
```bash
122+
git clone https://github.com/your-username/repository.git
123+
cd repository
124+
```
125+
126+
2. Create a New Branch
127+
128+
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:
204+
205+
```
206+
samples
207+
├── app1 # Agentic application example
208+
│ ├── model.json # Required model file
209+
│ ├── build.config.yaml # Required build configuration file
210+
├── app2 # Another agentic application example
211+
│ ├── model.json
212+
│ ├── build.config.yaml
213+
```
214+
215+
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.
221+
222+
82223
## Copyright Notice
83224

84225
[Copyright Notice and Licence](./LICENSE.md)

0 commit comments

Comments
 (0)