test: add comprehensive test suite for server
- Add load testing with Artillery (smoke, standard, peak, stress) - Add functional tests: voting, lottery, admin (18 tests) - Add fault tolerance tests (14 tests) - Add network tests for WebSocket (7 tests) - Add compatibility tests (15 tests) - Add security tests: anti-fraud, auth, data integrity (10 tests) - Fix optional callback handling in socket handlers - Total: 64 test cases, all passing Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,11 @@
|
||||
"db:push": "prisma db push",
|
||||
"db:seed": "tsx src/scripts/seed.ts",
|
||||
"test": "vitest",
|
||||
"test:load": "echo 'Load tests not configured yet'"
|
||||
"test:load": "artillery run load-test/vote-load-test.yaml -e standard",
|
||||
"test:load:smoke": "artillery run load-test/vote-load-test.yaml -e smoke",
|
||||
"test:load:peak": "artillery run load-test/vote-load-test.yaml -e peak",
|
||||
"test:load:stress": "artillery run load-test/vote-load-test.yaml -e stress",
|
||||
"test:load:report": "artillery run load-test/vote-load-test.yaml -e standard --output load-test/report.json && artillery report load-test/report.json"
|
||||
},
|
||||
"dependencies": {
|
||||
"@gala/shared": "workspace:*",
|
||||
@@ -40,10 +44,12 @@
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/multer": "^2.0.0",
|
||||
"@types/uuid": "^11.0.0",
|
||||
"artillery": "^2.0.28",
|
||||
"prisma": "^6.2.1",
|
||||
"socket.io-client": "^4.8.1",
|
||||
"tsup": "^8.3.5",
|
||||
"tsx": "^4.19.2",
|
||||
"typescript": "^5.7.3",
|
||||
"vitest": "^2.1.8"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user