CSV Test Import
Use this skill when a user wants to import test cases from CSV into qaos. CSV formats can be arbitrary, so first infer structure and mapping, then run the import script.
Trigger Conditions
- •User asks to import or migrate test cases from a
.csvfile. - •CSV has unknown or inconsistent schema.
- •User wants structured PostgreSQL test records.
Instructions
- •Inspect CSV headers and representative rows.
- •Infer a mapping from raw CSV columns to normalized keys.
- •Call the script with
run_scriptusingtransform-csv. - •Report import summary (
insertedCount,skippedCount) and any skipped-row reasons.
run_script template
json
{
"action": "run_script",
"skill_name": "csv-test-import",
"script": "transform-csv",
"args": {
"csvPath": "/absolute/path/to/file.csv",
"testId": "import-2026-02-21",
"mapping": {
"Test case": "title",
"Priority": "priority",
"Description": "description",
"Tested by": "testedBy",
"Test result": "testResult",
"Bug ticket": "bugTicket"
},
"batchSize": 500
}
}
Notes
- •The script uses stream-based processing (
fs.createReadStream) and does not load full CSV into memory. - •Use larger
batchSizefor faster imports on stable DB/network. - •If CSV does not have headers, first derive synthetic headers and adjust mapping accordingly.