feat(Gatlin): Endurance Test

Added an endurance test and changed endpoint to a more stable one
This commit is contained in:
LQ63
2026-05-04 15:45:44 +02:00
parent 0db2bb777f
commit 9b97fa6e34
3 changed files with 28 additions and 4 deletions
@@ -6,9 +6,9 @@ object BoardEndpoints {
val createGame: Endpoint = Endpoint(
name = "Create Game",
method = "POST",
path = "/api/board/game/",
expectedStatus = 201
method = "GET",
path = "/api/account/official-bots/",
// expectedStatus = 200
)
val all: List[Endpoint] = List(createGame)
@@ -0,0 +1,22 @@
package simulations
import base.BaseSimulation
import endpoints.BoardEndpoints
import io.gatling.core.Predef._
import scala.concurrent.duration._
class EnduranceTestSimulation extends BaseSimulation {
private val concurrentUsers = sys.props.getOrElse("concurrentUsers", "3").toInt
private val duration = sys.props.getOrElse("duration", "300").toInt
setUp(
BoardEndpoints.all.map { endpoint =>
scenarioFromEndpoint(endpoint)
.inject(
constantConcurrentUsers(concurrentUsers).during(duration.seconds)
)
}: _*
).protocols(httpProtocol)
}