Skip to content

Commit 84a43ef

Browse files
added-robott-tests
1 parent d7fec6c commit 84a43ef

2 files changed

Lines changed: 112 additions & 4 deletions

File tree

docs/cli.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ build/anysdk aot \
193193
test/registry/src/aws/v0.1.0/provider.yaml \
194194
ec2 \
195195
--provider aws \
196-
--resource volumes_post_naively_presented
196+
--resource volumes_post_naively_presented \
197+
--schema-dir \
198+
cicd/schema-definitions
197199

198200

199201
build/anysdk aot \
@@ -202,6 +204,8 @@ build/anysdk aot \
202204
ec2 \
203205
--provider aws \
204206
--resource volumes_post_naively_presented \
205-
--method describeVolumes
207+
--method describeVolumes \
208+
--schema-dir \
209+
cicd/schema-definitions
206210

207211
```

test/robot/cli/aot/aot_adhoc.robot

Lines changed: 106 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,118 @@ Simple AOT Service Level Analysis AWS EC2 with CLI
5656
... \./test/registry
5757
... \./test/registry/src/aws/v0\.1\.0/provider\.yaml
5858
... ec2
59-
... \-\-schema-dir
59+
... \-\-schema-dir
6060
... cicd/schema-definitions
6161
... cwd=${CWD_FOR_EXEC}
6262
... stdout=${CURDIR}${/}/tmp${/}Simple-AOT-Service-Level-Analysis-AWS-EC2-with-CLI.txt
6363
... stderr=${CURDIR}${/}/tmp${/}Simple-AOT-Service-Level-Analysis-AWS-EC2-with-CLI_stderr.txt
6464
Log Stderr = ${result.stderr}
6565
Log Stdout = ${result.stdout}
6666
Log RC = ${result.rc}
67-
Should Contain ${result.stderr}
67+
Should Contain ${result.stderr}
6868
... successfully dereferenced method = 'describeVolumes' for resource = 'volumes' with service name = 'ec2'
6969
Should Be Equal As Strings ${result.rc} 1
70+
71+
AOT Resource Level Analysis AWS EC2 volumes_post_naively_presented with CLI
72+
[Documentation] Test resource level AOT analysis produces structured findings with prior and fixed templates
73+
[Tags] cli aot
74+
${result} = Run Process
75+
... ${CLI_EXE}
76+
... aot
77+
... \-v
78+
... \./test/registry
79+
... \./test/registry/src/aws/v0\.1\.0/provider\.yaml
80+
... ec2
81+
... \-\-provider
82+
... aws
83+
... \-\-resource
84+
... volumes_post_naively_presented
85+
... \-\-schema-dir
86+
... cicd/schema-definitions
87+
... cwd=${CWD_FOR_EXEC}
88+
... stdout=${CURDIR}${/}/tmp${/}AOT-Resource-Level-Analysis-AWS-EC2-with-CLI.txt
89+
... stderr=${CURDIR}${/}/tmp${/}AOT-Resource-Level-Analysis-AWS-EC2-with-CLI_stderr.txt
90+
Log Stderr = ${result.stderr}
91+
Log Stdout = ${result.stdout}
92+
Log RC = ${result.rc}
93+
# stderr: JSONL findings include classification bins, template fix pair, and verbose info messages
94+
Should Contain ${result.stderr}
95+
... "bin":"empty-response-unsafe"
96+
Should Contain ${result.stderr}
97+
... "bin":"missing-semantics"
98+
Should Contain ${result.stderr}
99+
... "prior_template":"{{ toJson . }}"
100+
Should Contain ${result.stderr}
101+
... "fixed_template":"{{- if . -}}{{ toJson . }}{{- else -}}null{{- end -}}"
102+
Should Contain ${result.stderr}
103+
... successfully built HTTP request context for method 'POST_DescribeVolumes' on resource 'volumes_post_naively_presented'
104+
Should Contain ${result.stderr}
105+
... successfully dereferenced method = 'describeVolumes' for resource = 'volumes_post_naively_presented' with service name = 'ec2'
106+
Should Contain ${result.stderr}
107+
... response transform template parses successfully
108+
# stdout: JSON summary with correct totals, bins, and service breakdown
109+
Should Contain ${result.stdout}
110+
... "total_warnings": 2
111+
Should Contain ${result.stdout}
112+
... "total_errors": 0
113+
Should Contain ${result.stdout}
114+
... "empty-response-unsafe"
115+
Should Contain ${result.stdout}
116+
... "missing-semantics"
117+
Should Contain ${result.stdout}
118+
... "warning_count": 2
119+
Should Contain ${result.stdout}
120+
... sample_response
121+
Should Be Equal As Strings ${result.rc} 0
122+
123+
AOT Method Level Analysis AWS EC2 volumes_post_naively_presented describeVolumes with CLI
124+
[Documentation] Test method level AOT analysis produces structured findings scoped to a single method
125+
[Tags] cli aot
126+
${result} = Run Process
127+
... ${CLI_EXE}
128+
... aot
129+
... \-v
130+
... \./test/registry
131+
... \./test/registry/src/aws/v0\.1\.0/provider\.yaml
132+
... ec2
133+
... \-\-provider
134+
... aws
135+
... \-\-resource
136+
... volumes_post_naively_presented
137+
... \-\-method
138+
... describeVolumes
139+
... \-\-schema-dir
140+
... cicd/schema-definitions
141+
... cwd=${CWD_FOR_EXEC}
142+
... stdout=${CURDIR}${/}/tmp${/}AOT-Method-Level-Analysis-AWS-EC2-with-CLI.txt
143+
... stderr=${CURDIR}${/}/tmp${/}AOT-Method-Level-Analysis-AWS-EC2-with-CLI_stderr.txt
144+
Log Stderr = ${result.stderr}
145+
Log Stdout = ${result.stdout}
146+
Log RC = ${result.rc}
147+
# stderr: JSONL findings scoped to the specific method
148+
Should Contain ${result.stderr}
149+
... "bin":"empty-response-unsafe"
150+
Should Contain ${result.stderr}
151+
... "method":"describeVolumes"
152+
Should Contain ${result.stderr}
153+
... "prior_template":"{{ toJson . }}"
154+
Should Contain ${result.stderr}
155+
... "fixed_template":"{{- if . -}}{{ toJson . }}{{- else -}}null{{- end -}}"
156+
Should Contain ${result.stderr}
157+
... successfully built HTTP request context for method 'POST_DescribeVolumes' on resource 'volumes_post_naively_presented'
158+
Should Contain ${result.stderr}
159+
... successfully inferred response schema for method = 'describeVolumes'
160+
# stdout: JSON summary with method-level detail
161+
Should Contain ${result.stdout}
162+
... "total_warnings": 2
163+
Should Contain ${result.stdout}
164+
... "total_errors": 0
165+
Should Contain ${result.stdout}
166+
... "empty-response-unsafe"
167+
Should Contain ${result.stdout}
168+
... "missing-semantics"
169+
Should Contain ${result.stdout}
170+
... "method": "describeVolumes"
171+
Should Contain ${result.stdout}
172+
... sample_response
173+
Should Be Equal As Strings ${result.rc} 0

0 commit comments

Comments
 (0)