Skip to content

sntekinay/PetStoreAutomation

Repository files navigation

🧪 PetStore API Test Otomasyonu

Bu proje, Swagger PetStore üzerinde API otomasyon testleri ve yük testleri gerçekleştirilmiştir..

🚀 Kullanılan Araçlar

  • Cypress – API Test Otomasyonu
  • Postman – Test koleksiyonu
  • Locust – Yük Testi (Load Test)
  • Mochawesome – Cypress raporlama aracı

📁 Proje Yapısı

PetStoreAutomation/
├── cypress/                
│   └── e2e/
│       └── user_api_test.cy.js
├── postman/                
│   └── PetStore.postman_collection.json
├── locust/                 
│   ├── locustfile.py
│   └── locust_gui_result.png
├── mochawesome-report/
│   └── mochawesome.html
├── README.md
└── package.json

📬 Postman Testleri

  • Postman Desktop App indirilmeli.
  • postman/PetStore.postman_collection.json dosyası içe aktarılmalıdır.
  • Bu koleksiyon, CRUD işlemleri içeren manuel testleri kapsar.

✅ Cypress API Testleri

Aşağıdaki endpoint’ler cypress/e2e/user_api_test.cy.js dosyasında test edilmiştir:

  • POST /user – Yeni kullanıcı oluşturma
  • GET /user/login – Giriş
  • GET /user/{username} – Kullanıcı bilgisi alma
  • PUT /user/{username} – Bilgi güncelleme
  • GET /user/logout – Çıkış
  • DELETE /user/{username} – Silme

🔧 Cypress Çalıştırma

npx cypress run

📊 Cypress Raporu – Mochawesome

Cypress çalıştırıldığında HTML raporu otomatik oluşur:

  • Rapor yolu: mochawesome-report/mochawesome.html

📸 Cypress Web Arayüzü:

Ekran Alıntısı1

Ekran Alıntısı2


📈 Locust Yük Testi

locust/locustfile.py dosyası kullanılarak API’lerin eş zamanlı kullanıcı yükü altında nasıl davrandığı test edilmiştir.

🔧 Locust GUI Modda Çalıştırma

locust -f locustfile.py

Tarayıcıdan:

http://localhost:8089

📸 Ekran Görüntüsü: locustreport


⚙️ Kurulum

Node.js Gereksinimleri (Cypress ve Raporlama için)

npm install --save-dev cypress
npm install --save-dev mochawesome mochawesome-merge mochawesome-report-generator

Python Gereksinimleri (Locust için)

pip install locust

About

Swagger Petstore API için kullanıcı işlemleri test koleksiyonu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages