feat: NCS-62, NCS-64 Endurance Test, Spike Test #6

Merged
lq64 merged 4 commits from feat/merge-NCS-62-NCS-64 into main 2026-05-05 17:17:38 +02:00
3 changed files with 28 additions and 4 deletions
Showing only changes of commit 9b97fa6e34 - Show all commits
+3 -1
View File
@@ -22,7 +22,9 @@ tasks.withType(io.gatling.gradle.GatlingRunTask) {
"-Dgatling.authToken=${findProperty('authToken') ?: System.getenv('GATLING_AUTH_TOKEN') ?: ''}",
"-Dhealthz.path=${findProperty('healthzPath') ?: '/health'}",
"-DmaxUsers=${findProperty('maxUsers') ?: '10'}",
"-DrampDuration=${findProperty('rampDuration') ?: '60'}"
"-DrampDuration=${findProperty('rampDuration') ?: '60'}",
"-DconcurrentUsers=${findProperty('concurrentUsers') ?: '3'}",
"-Dduration=${findProperty('duration') ?: '300'}"
]
}
@@ -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)
}