Scénario de test & Cas d'usage
Erstellung einer Textdatei, die fälschlicherweise als Binärdatei importiert wird.
| 1 | filename bad_file temp; |
| 2 | DATA _null_; |
| 3 | file bad_file; |
| 4 | put 'Dies ist eine CSV, kein ONNX Modell. Header: ID, Value'; |
| 5 | RUN; |
| 6 | |
| 7 | PROC CAS; |
| 8 | upload path=fileref(bad_file) |
| 9 | casout={name='corrupt_model', caslib='casuser', replace=true} |
| 10 | importOptions={fileType='binary'}; |
| 11 | RUN; QUIT; |
| 1 | PROC CAS; |
| 2 | TABLE.fetch / TABLE={caslib='casuser', name='corrupt_model'} to=1 fetchVars={'_blob_'} RESULT=r; |
| 3 | corrupt_blob = r.Fetch.Rows[1][1]; |
| 4 | RUN; |
| 1 | PROC CAS; |
| 2 | aStore.check RESULT=res / onnx=corrupt_blob; |
| 3 | /* Überprüfung des Logs auf spezifische Fehlermeldungen */ |
| 4 | RUN; QUIT; |
Die Aktion 'aStore.check' muss fehlschlagen und eine eindeutige Fehlermeldung im Log ausgeben (z.B. 'Invalid ONNX format' oder ähnlich). Dies bestätigt, dass das System ungültige Eingaben korrekt identifiziert und ablehnt.