Skip to content

Commit 27f045a

Browse files
committed
Add manual test case documentation (20 files + AGENT-TESTING.md)
Comprehensive test case docs covering all 19 MDL command areas: entity, enumeration, microflow, nanoflow, page, integration, security, navigation, organization, workflow, catalog, tooling, CLI commands, SQL, session, mapping, business event, image collection, and agent/model/KB/MCP. Each file specifies inputs, expected outputs, and edge cases. AGENT-TESTING.md provides shared instructions for AI agents executing these tests. Validated all 1007 test cases against MDLParser.g4 grammar - removed 102 hallucinated tests, fixed 16 syntax errors.
1 parent baa8253 commit 27f045a

20 files changed

Lines changed: 15622 additions & 69 deletions

docs/15-testing/AGENT-TESTING.md

Lines changed: 1015 additions & 0 deletions
Large diffs are not rendered by default.

docs/15-testing/agent-editor-test-cases.md

Lines changed: 874 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 344 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,344 @@
1+
# Business Event Service Test Cases — Manual Testing
2+
3+
**Updated:** 2026-04-29
4+
**PR:** [mendixlabs/mxcli#301](https://github.com/mendixlabs/mxcli/pull/386)
5+
6+
## Setup
7+
8+
> See [AGENT-TESTING.md](./AGENT-TESTING.md) for build, execution methods, and verification patterns.
9+
10+
---
11+
12+
## 1. SHOW BUSINESS EVENT SERVICES
13+
14+
### 1.1 List all services
15+
16+
```
17+
show business event services;
18+
```
19+
20+
**Expected:** Table with columns `Module | QualifiedName | Service | Messages | Publish | Subscribe`. Summary line `(N business event services)`. Sorted alphabetically.
21+
22+
### 1.2 Filter by module
23+
24+
```
25+
show business event services in MyModule;
26+
```
27+
28+
**Expected:** Only services from `MyModule`. Same column format.
29+
30+
### 1.3 Empty result
31+
32+
```
33+
show business event services in NonExistentModule;
34+
```
35+
36+
**Expected:** `No business event services found.`
37+
38+
---
39+
40+
## 2. SHOW BUSINESS EVENTS
41+
42+
### 2.1 List all business events
43+
44+
```
45+
show business events;
46+
```
47+
48+
**Expected:** Table with columns `Service | Message | Operation | Entity | Attributes`. `Operation` values are `PUBLISH` or `SUBSCRIBE`. Summary line `(N business events)`.
49+
50+
### 2.2 Filter by module
51+
52+
```
53+
show business events in MyModule;
54+
```
55+
56+
**Expected:** Only events from `MyModule`. Same column format.
57+
58+
### 2.3 Empty module
59+
60+
```
61+
show business events in NonExistentModule;
62+
```
63+
64+
**Expected:** Empty result or `No business events found.`
65+
66+
---
67+
68+
## 3. DESCRIBE BUSINESS EVENT SERVICE
69+
70+
### 3.1 Service with publish message
71+
72+
```
73+
describe business event service MyModule.OrderEvents;
74+
```
75+
76+
**Expected:** Full MDL output:
77+
```
78+
create business event service MyModule.OrderEvents
79+
event_name_prefix 'com.example.order'
80+
message OrderCreated (
81+
OrderId: Long,
82+
CustomerName: String,
83+
Total: Decimal
84+
) publish entity MyModule.OrderCreatedEvent
85+
/
86+
```
87+
88+
### 3.2 Service with subscribe message
89+
90+
```
91+
describe business event service MyModule.PaymentEvents;
92+
```
93+
94+
**Expected:** MDL includes `subscribe` keyword with entity and microflow references:
95+
```
96+
create business event service MyModule.PaymentEvents
97+
event_name_prefix 'com.example.payment'
98+
message PaymentReceived (
99+
PaymentId: Long,
100+
Amount: Decimal,
101+
Currency: String
102+
) subscribe entity MyModule.PaymentReceivedEvent microflow MyModule.OnPaymentReceived
103+
/
104+
```
105+
106+
### 3.3 Service with multiple messages
107+
108+
```
109+
describe business event service MyModule.InventoryEvents;
110+
```
111+
112+
**Expected:** Multiple `message` blocks in output. Each has its own attribute list, operation keyword, and entity reference.
113+
114+
### 3.4 All attribute types
115+
116+
Verify described output includes attributes of each supported type:
117+
118+
| Type | Example |
119+
|------|---------|
120+
| Long | `OrderId: Long` |
121+
| String | `Name: String` |
122+
| Integer | `Count: Integer` |
123+
| Boolean | `IsActive: Boolean` |
124+
| DateTime | `Timestamp: DateTime` |
125+
| Decimal | `Amount: Decimal` |
126+
127+
### 3.5 Non-existent service
128+
129+
```
130+
describe business event service MyModule.Fake;
131+
```
132+
133+
**Expected:** Error — service not found.
134+
135+
---
136+
137+
## 4. DROP BUSINESS EVENT SERVICE
138+
139+
### 5.1 Drop existing service
140+
141+
```
142+
drop business event service MyModule.OrderEvents;
143+
```
144+
145+
**Expected:** Service removed. `describe business event service MyModule.OrderEvents` returns error.
146+
147+
### 5.2 Drop non-existent service
148+
149+
```
150+
drop business event service MyModule.Fake;
151+
```
152+
153+
**Expected:** Error — service not found.
154+
155+
---
156+
157+
## 5. MULTI-STEP WORKFLOWS
158+
159+
### 5.1 Create entity → create publish service → verify events
160+
161+
```
162+
create persistent entity MyModule.InvoiceCreatedEvent (
163+
InvoiceId: Long,
164+
CustomerName: String,
165+
TotalAmount: Decimal
166+
);
167+
168+
create business event service MyModule.InvoiceEvents
169+
event_name_prefix 'com.example.invoice'
170+
message InvoiceCreated (
171+
InvoiceId: Long,
172+
CustomerName: String,
173+
TotalAmount: Decimal
174+
) publish entity MyModule.InvoiceCreatedEvent;
175+
176+
show business events in MyModule;
177+
```
178+
179+
**Expected:** All statements succeed. `show business events` lists `InvoiceCreated` with operation `PUBLISH` and entity `MyModule.InvoiceCreatedEvent`.
180+
181+
### 5.2 Create entity → create subscribe service → verify events
182+
183+
```
184+
create persistent entity MyModule.ShipmentReceivedEvent (
185+
ShipmentId: Long,
186+
Carrier: String
187+
);
188+
189+
create business event service MyModule.ShipmentEvents
190+
event_name_prefix 'com.example.shipment'
191+
message ShipmentReceived (
192+
ShipmentId: Long,
193+
Carrier: String
194+
) subscribe entity MyModule.ShipmentReceivedEvent microflow MyModule.OnShipmentReceived;
195+
196+
show business events in MyModule;
197+
```
198+
199+
**Expected:** `show business events` lists `ShipmentReceived` with operation `SUBSCRIBE`.
200+
201+
### 5.3 Create → replace → verify
202+
203+
```
204+
create business event service MyModule.Lifecycle
205+
event_name_prefix 'com.example.lc.v1'
206+
message Ping (
207+
Seq: Integer
208+
) publish entity MyModule.PingEvent;
209+
210+
create or replace business event service MyModule.Lifecycle
211+
event_name_prefix 'com.example.lc.v2'
212+
message Ping (
213+
Seq: Integer,
214+
Timestamp: DateTime
215+
) publish entity MyModule.PingEvent;
216+
217+
describe business event service MyModule.Lifecycle;
218+
```
219+
220+
**Expected:** Final `describe` shows v2 prefix and `Timestamp` attribute.
221+
222+
---
223+
224+
## 6. FAILURE MODES & ERROR RECOVERY
225+
226+
### 6.1 Not connected to project
227+
228+
```
229+
show business event services;
230+
```
231+
232+
(Run without `-p` flag or before opening a project.)
233+
234+
**Expected:** Error — not connected to a project.
235+
236+
### 6.2 Service not found
237+
238+
```
239+
describe business event service MyModule.DoesNotExist;
240+
```
241+
242+
**Expected:** Error — service not found.
243+
244+
### 6.3 Service already exists
245+
246+
```
247+
create business event service MyModule.OrderEvents
248+
event_name_prefix 'com.example.order'
249+
message Msg (X: Integer) publish entity MyModule.MsgEvent;
250+
create business event service MyModule.OrderEvents
251+
event_name_prefix 'com.example.order'
252+
message Msg (X: Integer) publish entity MyModule.MsgEvent;
253+
```
254+
255+
**Expected:** First succeeds. Second returns error — already exists.
256+
257+
### 6.4 Module not found
258+
259+
```
260+
show business event services in FakeModule;
261+
```
262+
263+
**Expected:** `No business event services found.` or error — module not found.
264+
265+
### 6.5 Missing entity reference
266+
267+
```
268+
create business event service MyModule.BadRef
269+
event_name_prefix 'com.example.badref'
270+
message Msg (X: Integer) publish entity MyModule.NonExistentEntity;
271+
```
272+
273+
**Expected:** Error — entity not found.
274+
275+
### 6.6 Invalid attribute type
276+
277+
```
278+
create business event service MyModule.BadType
279+
event_name_prefix 'com.example.badtype'
280+
message Msg (X: InvalidType) publish entity MyModule.SomeEvent;
281+
```
282+
283+
**Expected:** Error — unknown type. No service created.
284+
285+
---
286+
287+
## Test Project Coverage Matrix
288+
289+
| Operation | Lato Enquiry | Evora Factory | Lato Product |
290+
|-----------|:---:|:---:|:---:|
291+
| SHOW BUSINESS EVENT SERVICES | x | x | x |
292+
| SHOW BUSINESS EVENTS | x | x | x |
293+
| DESCRIBE BUSINESS EVENT SERVICE | x | x | |
294+
| DROP BUSINESS EVENT SERVICE | x | | |
295+
296+
Read operations tested on all projects. Write operations on copies of one project.
297+
298+
---
299+
300+
## Automated Test Coverage
301+
302+
| Section | Automated | Manual-only |
303+
|---------|:---------:|:-----------:|
304+
| 1. SHOW BUSINESS EVENT SERVICES | Mock tests | |
305+
| 2. SHOW BUSINESS EVENTS | Mock tests | |
306+
| 3. DESCRIBE BUSINESS EVENT SERVICE | Mock tests | |
307+
| 4. DROP BUSINESS EVENT SERVICE | Mock tests | |
308+
| 5. Multi-step | | All manual |
309+
| 6. Failure modes | Partial | Edge cases |
310+
311+
---
312+
313+
## Manual Test Report Template
314+
315+
**Tester:** _______________
316+
**Date:** _______________
317+
**Project:** _______________
318+
319+
| # | Section | Test | Pass | Fail | Skip | Notes |
320+
|---|---------|------|:----:|:----:|:----:|-------|
321+
| 1.1 | SHOW BE SERVICES | List all | | | | |
322+
| 1.2 | SHOW BE SERVICES | Filter by module | | | | |
323+
| 1.3 | SHOW BE SERVICES | Empty result | | | | |
324+
| 2.1 | SHOW BE | List all | | | | |
325+
| 2.2 | SHOW BE | Filter by module | | | | |
326+
| 2.3 | SHOW BE | Empty module | | | | |
327+
| 3.1 | DESCRIBE BE SERVICE | Publish message | | | | |
328+
| 3.2 | DESCRIBE BE SERVICE | Subscribe message | | | | |
329+
| 3.3 | DESCRIBE BE SERVICE | Multiple messages | | | | |
330+
| 3.4 | DESCRIBE BE SERVICE | All attribute types | | | | |
331+
| 3.5 | DESCRIBE BE SERVICE | Not found | | | | |
332+
| 4.1 | DROP BE SERVICE | Existing | | | | |
333+
| 4.2 | DROP BE SERVICE | Non-existent | | | | |
334+
| 5.1 | MULTI-STEP | Entity + publish + verify | | | | |
335+
| 5.2 | MULTI-STEP | Entity + subscribe + verify | | | | |
336+
| 5.3 | MULTI-STEP | Create + replace + verify | | | | |
337+
| 6.1 | FAILURE | Not connected | | | | |
338+
| 6.2 | FAILURE | Service not found | | | | |
339+
| 6.3 | FAILURE | Already exists | | | | |
340+
| 6.4 | FAILURE | Module not found | | | | |
341+
| 6.5 | FAILURE | Missing entity ref | | | | |
342+
| 6.6 | FAILURE | Invalid attribute type | | | | |
343+
344+
**Summary:** ___ / ___ passed | ___ failed | ___ skipped

0 commit comments

Comments
 (0)