الملفات
Building-API-and-Monitoring…/test_results.log
2025-09-30 23:23:53 +03:00

506 أسطر
13 KiB
Plaintext

🚀 Running API tests at Tue 30 Sep 2025 10:43:38 PM EEST
======================================
🔹 Testing /health
Status: 000
--------------------------------------
🔹 Testing GET /fruits
Status: 000
--------------------------------------
🔹 Testing GET /fruits/1
Status: 000
--------------------------------------
🔹 Testing POST /fruits
Status: 000
--------------------------------------
🔹 Testing PUT /fruits/1
Status: 000
--------------------------------------
🔹 Testing DELETE /fruits/1
Status: 000
--------------------------------------
🔹 Testing GET /fruits/search?name=apple
Status: 000
--------------------------------------
🔹 Testing GET /fruits/category/Tropical
Status: 000
--------------------------------------
✅ Tests completed at Tue 30 Sep 2025 10:43:39 PM EEST
======================================
🚀 Running API tests at Tue 30 Sep 2025 10:47:56 PM EEST
======================================
🔹 Testing /health
{"service":"fruit-api","status":"healthy"}
Status: 200
--------------------------------------
🔹 Testing GET /fruits
{"fruits":[{"category":"Tropical","color":"Red","id":1,"name":"Apple","price":1.5,"quantity":100},{"category":"Tropical","color":"Yellow","id":2,"name":"Banana","price":0.75,"quantity":150},{"category":"Citrus","color":"Orange","id":3,"name":"Orange","price":1.2,"quantity":80}],"total":3}
Status: 200
--------------------------------------
🔹 Testing GET /fruits/1
{"fruit":{"category":"Tropical","color":"Red","id":1,"name":"Apple","price":1.5,"quantity":100}}
Status: 200
--------------------------------------
🔹 Testing POST /fruits
{"fruit":{"category":"Tropical","color":"Yellow","created_at":"2025-09-30T22:47:56.301904","id":4,"name":"Mango","price":2.5,"quantity":50},"message":"Fruit created successfully"}
Status: 201
--------------------------------------
🔹 Testing PUT /fruits/1
<!doctype html>
<html lang=en>
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>
Status: 405
--------------------------------------
🔹 Testing DELETE /fruits/1
<!doctype html>
<html lang=en>
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>
Status: 405
--------------------------------------
🔹 Testing GET /fruits/search?name=apple
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
Status: 404
--------------------------------------
🔹 Testing GET /fruits/category/Tropical
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
Status: 404
--------------------------------------
✅ Tests completed at Tue 30 Sep 2025 10:47:56 PM EEST
======================================
🚀 Running API tests at Tue 30 Sep 2025 10:48:14 PM EEST
======================================
🔹 Testing /health
{"service":"fruit-api","status":"healthy"}
Status: 200
--------------------------------------
🔹 Testing GET /fruits
{"fruits":[{"category":"Tropical","color":"Red","id":1,"name":"Apple","price":1.5,"quantity":100},{"category":"Tropical","color":"Yellow","id":2,"name":"Banana","price":0.75,"quantity":150},{"category":"Citrus","color":"Orange","id":3,"name":"Orange","price":1.2,"quantity":80},{"category":"Tropical","color":"Yellow","created_at":"2025-09-30T22:47:56.301904","id":4,"name":"Mango","price":2.5,"quantity":50}],"total":4}
Status: 200
--------------------------------------
🔹 Testing GET /fruits/1
{"fruit":{"category":"Tropical","color":"Red","id":1,"name":"Apple","price":1.5,"quantity":100}}
Status: 200
--------------------------------------
🔹 Testing POST /fruits
{"fruit":{"category":"Tropical","color":"Yellow","created_at":"2025-09-30T22:48:14.534108","id":5,"name":"Mango","price":2.5,"quantity":50},"message":"Fruit created successfully"}
Status: 201
--------------------------------------
🔹 Testing PUT /fruits/1
<!doctype html>
<html lang=en>
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>
Status: 405
--------------------------------------
🔹 Testing DELETE /fruits/1
<!doctype html>
<html lang=en>
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>
Status: 405
--------------------------------------
🔹 Testing GET /fruits/search?name=apple
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
Status: 404
--------------------------------------
🔹 Testing GET /fruits/category/Tropical
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
Status: 404
--------------------------------------
✅ Tests completed at Tue 30 Sep 2025 10:48:14 PM EEST
======================================
🚀 Running API tests at Tue 30 Sep 2025 10:48:28 PM EEST
======================================
🔹 Testing /health
{"service":"fruit-api","status":"healthy"}
Status: 200
--------------------------------------
🔹 Testing GET /fruits
{"fruits":[{"category":"Tropical","color":"Red","id":1,"name":"Apple","price":1.5,"quantity":100},{"category":"Tropical","color":"Yellow","id":2,"name":"Banana","price":0.75,"quantity":150},{"category":"Citrus","color":"Orange","id":3,"name":"Orange","price":1.2,"quantity":80},{"category":"Tropical","color":"Yellow","created_at":"2025-09-30T22:47:56.301904","id":4,"name":"Mango","price":2.5,"quantity":50},{"category":"Tropical","color":"Yellow","created_at":"2025-09-30T22:48:14.534108","id":5,"name":"Mango","price":2.5,"quantity":50}],"total":5}
Status: 200
--------------------------------------
🔹 Testing GET /fruits/1
{"fruit":{"category":"Tropical","color":"Red","id":1,"name":"Apple","price":1.5,"quantity":100}}
Status: 200
--------------------------------------
🔹 Testing POST /fruits
{"fruit":{"category":"Tropical","color":"Yellow","created_at":"2025-09-30T22:48:28.894050","id":6,"name":"Mango","price":2.5,"quantity":50},"message":"Fruit created successfully"}
Status: 201
--------------------------------------
🔹 Testing PUT /fruits/1
<!doctype html>
<html lang=en>
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>
Status: 405
--------------------------------------
🔹 Testing DELETE /fruits/1
<!doctype html>
<html lang=en>
<title>405 Method Not Allowed</title>
<h1>Method Not Allowed</h1>
<p>The method is not allowed for the requested URL.</p>
Status: 405
--------------------------------------
🔹 Testing GET /fruits/search?name=apple
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
Status: 404
--------------------------------------
🔹 Testing GET /fruits/category/Tropical
<!doctype html>
<html lang=en>
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
Status: 404
--------------------------------------
✅ Tests completed at Tue 30 Sep 2025 10:48:28 PM EEST
======================================
🚀 Running API tests at Tue 30 Sep 2025 10:54:01 PM EEST
======================================
🔹 Testing /health
{
"service": "fruit-api",
"status": "healthy",
"timestamp": "2025-09-30T22:54:01.228357"
}
Status: 200
--------------------------------------
🔹 Testing GET /fruits
{
"fruits": [
{
"category": "Tropical",
"color": "Red",
"id": 1,
"name": "Apple",
"price": 1.5,
"quantity": 100
},
{
"category": "Tropical",
"color": "Yellow",
"id": 2,
"name": "Banana",
"price": 0.75,
"quantity": 150
},
{
"category": "Citrus",
"color": "Orange",
"id": 3,
"name": "Orange",
"price": 1.2,
"quantity": 80
}
],
"timestamp": "2025-09-30T22:54:01.275312",
"total": 3
}
Status: 200
--------------------------------------
🔹 Testing GET /fruits/1
{
"fruit": {
"category": "Tropical",
"color": "Red",
"id": 1,
"name": "Apple",
"price": 1.5,
"quantity": 100
}
}
Status: 200
--------------------------------------
🔹 Testing POST /fruits
{
"fruit": {
"category": "Tropical",
"color": "Yellow",
"created_at": "2025-09-30T22:54:01.376254",
"id": 4,
"name": "Mango",
"price": 2.5,
"quantity": 50
},
"message": "Fruit created successfully"
}
Status: 201
--------------------------------------
🔹 Testing PUT /fruits/1
{
"fruit": {
"category": "Tropical",
"color": "Red",
"id": 1,
"name": "Green Apple",
"price": 1.8,
"quantity": 100,
"updated_at": "2025-09-30T22:54:01.427456"
},
"message": "Fruit updated successfully"
}
Status: 200
--------------------------------------
🔹 Testing DELETE /fruits/1
{
"deleted_fruit": {
"category": "Tropical",
"color": "Red",
"id": 1,
"name": "Green Apple",
"price": 1.8,
"quantity": 100,
"updated_at": "2025-09-30T22:54:01.427456"
},
"message": "Fruit deleted successfully"
}
Status: 200
--------------------------------------
🔹 Testing GET /fruits/search?name=apple
{
"count": 0,
"results": [],
"search_term": "apple"
}
Status: 200
--------------------------------------
🔹 Testing GET /fruits/category/Tropical
{
"category": "Tropical",
"count": 2,
"fruits": [
{
"category": "Tropical",
"color": "Yellow",
"id": 2,
"name": "Banana",
"price": 0.75,
"quantity": 150
},
{
"category": "Tropical",
"color": "Yellow",
"created_at": "2025-09-30T22:54:01.376254",
"id": 4,
"name": "Mango",
"price": 2.5,
"quantity": 50
}
]
}
Status: 200
--------------------------------------
✅ Tests completed at Tue 30 Sep 2025 10:54:01 PM EEST
======================================
🚀 Running API tests at Tue 30 Sep 2025 11:14:57 PM EEST
======================================
🔹 Testing /health
{
"service": "fruit-api",
"status": "healthy",
"timestamp": "2025-09-30T20:14:57.077152"
}
Status: 200
--------------------------------------
🔹 Testing GET /fruits
{
"fruits": [
{
"category": "Tropical",
"color": "Red",
"id": 1,
"name": "Apple",
"price": 1.5,
"quantity": 100
},
{
"category": "Tropical",
"color": "Yellow",
"id": 2,
"name": "Banana",
"price": 0.75,
"quantity": 150
},
{
"category": "Citrus",
"color": "Orange",
"id": 3,
"name": "Orange",
"price": 1.2,
"quantity": 80
}
],
"total": 3
}
Status: 200
--------------------------------------
🔹 Testing GET /fruits/1
{
"fruit": {
"category": "Tropical",
"color": "Red",
"id": 1,
"name": "Apple",
"price": 1.5,
"quantity": 100
}
}
Status: 200
--------------------------------------
🔹 Testing POST /fruits
{
"fruit": {
"category": "Tropical",
"color": "Yellow",
"created_at": "2025-09-30T20:14:57.129021",
"id": 4,
"name": "Mango",
"price": 2.5,
"quantity": 50
},
"message": "Fruit created successfully"
}
Status: 201
--------------------------------------
🔹 Testing PUT /fruits/1
{
"fruit": {
"category": "Tropical",
"color": "Red",
"id": 1,
"name": "Green Apple",
"price": 1.8,
"quantity": 100,
"updated_at": "2025-09-30T20:14:57.150810"
},
"message": "Fruit updated successfully"
}
Status: 200
--------------------------------------
🔹 Testing DELETE /fruits/1
{
"deleted_fruit": {
"category": "Tropical",
"color": "Red",
"id": 1,
"name": "Green Apple",
"price": 1.8,
"quantity": 100,
"updated_at": "2025-09-30T20:14:57.150810"
},
"message": "Fruit deleted successfully"
}
Status: 200
--------------------------------------
🔹 Testing GET /fruits/search?name=apple
{
"count": 0,
"results": [],
"search_term": "apple"
}
Status: 200
--------------------------------------
🔹 Testing GET /fruits/category/Tropical
{
"category": "Tropical",
"count": 2,
"fruits": [
{
"category": "Tropical",
"color": "Yellow",
"id": 2,
"name": "Banana",
"price": 0.75,
"quantity": 150
},
{
"category": "Tropical",
"color": "Yellow",
"created_at": "2025-09-30T20:14:57.129021",
"id": 4,
"name": "Mango",
"price": 2.5,
"quantity": 50
}
]
}
Status: 200
--------------------------------------
✅ Tests completed at Tue 30 Sep 2025 11:14:57 PM EEST
======================================