About Project Insights

Spike Testing on JSON Placeholder - K6 & Jenkins πŸš€

πŸš€ Spike Testing JSONPlaceholder API with K6

JSON Placeholder is a free online REST API that serves as a testing ground for developers. It provides a set of fake data endpoints, such as users, posts, and todos, which mimic real-world API responses.

For this test, I conducted Spike Testing using K6, a powerful performance testing tool πŸ› οΈ. The objective was to evaluate how well the API handles sudden surges in traffic πŸš€. This type of testing helps identify whether the API remains stable and reliable even under extreme loads. By simulating traffic spikes, we can detect performance bottlenecks and potential failures before they impact end-users.

The API endpoints tested:

  • Users πŸ‘€: Retrieves user details.
  • Todos βœ…: Manages user tasks.
  • Posts πŸ“: Handles blog-like posts.

Each endpoint was tested for different functionalities:

  • CRUD Operations (Create βž•, Read πŸ“–, Update ✏️, Delete ❌)
  • Search πŸ” & Filter Functionality 🎯

To simulate real-world usage, I designed different scenarios where these endpoints experience sudden bursts of requests, analyzing how well the system adapts under stress. To determine whether the API endpoints were stable under a spike load, I monitored the following K6 parameters:

  • http_req_duration ⏳ – Measures the response time of API requests. A lower duration indicates better performance and responsiveness ⚑.
  • http_req_failed ❌ – Tracks failed requests. A high failure rate suggests potential bottlenecks or service instability πŸ›‘.
  • Checks Rate > 0.75 βœ… – Ensures that at least 75% of requests pass without errors. If this metric drops, it signals that the API is struggling to handle the spike 🚦.

These key metrics help gauge the system’s resilience under sudden bursts of traffic, providing insights into whether further optimizations are needed.

Testing Tools

K6

Jenkins

Check the repository

json-placeholder-k6

Thanks for diving into my world. The future is built by dreamers and doers β€” let’s create something legendary.

Linkedin Email