-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-skill-extraction.sh
More file actions
executable file
·45 lines (37 loc) · 1.74 KB
/
test-skill-extraction.sh
File metadata and controls
executable file
·45 lines (37 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
# Test script for skill extraction endpoint
# Make sure your Next.js server is running on localhost:3000
echo "🧪 Testing Skill Extraction Endpoint"
echo "=================================="
# Test 1: Basic skill extraction
echo "Test 1: Basic skill extraction"
curl -X POST http://localhost:3000/api/user-skills \
-H "Content-Type: application/json" \
-d '{"userQuery": "I have experience with React, TypeScript, and Node.js"}' \
-w "\nHTTP Status: %{http_code}\n\n"
# Test 2: More complex skills
echo "Test 2: Complex skills"
curl -X POST http://localhost:3000/api/user-skills \
-H "Content-Type: application/json" \
-d '{"userQuery": "I am a full-stack developer with 5 years of experience in Python, Django, PostgreSQL, Docker, AWS, and machine learning with TensorFlow"}' \
-w "\nHTTP Status: %{http_code}\n\n"
# Test 3: Empty query (should return error)
echo "Test 3: Empty query (should return 400)"
curl -X POST http://localhost:3000/api/user-skills \
-H "Content-Type: application/json" \
-d '{"userQuery": ""}' \
-w "\nHTTP Status: %{http_code}\n\n"
# Test 4: Missing userQuery parameter (should return error)
echo "Test 4: Missing userQuery parameter (should return 400)"
curl -X POST http://localhost:3000/api/user-skills \
-H "Content-Type: application/json" \
-d '{}' \
-w "\nHTTP Status: %{http_code}\n\n"
# Test 5: DevOps skills
echo "Test 5: DevOps skills"
curl -X POST http://localhost:3000/api/user-skills \
-H "Content-Type: application/json" \
-d '{"userQuery": "I work with Jenkins, GitLab CI/CD, Kubernetes, Terraform, and monitoring tools like Prometheus and Grafana"}' \
-w "\nHTTP Status: %{http_code}\n\n"
echo "✅ All tests completed!"
echo "Check your Next.js server console for skill extraction logs."