This repository has been archived by the owner on May 10, 2024. It is now read-only.
generated from Arquisoft/wiq_0
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #287 from Arquisoft/UpdateDocs
Update docs
- Loading branch information
Showing
437 changed files
with
189,135 additions
and
7 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
|
||
import java.time.Duration; | ||
import java.util.*; | ||
|
||
import io.gatling.javaapi.core.*; | ||
import io.gatling.javaapi.http.*; | ||
import io.gatling.javaapi.jdbc.*; | ||
|
||
import static io.gatling.javaapi.core.CoreDsl.*; | ||
import static io.gatling.javaapi.http.HttpDsl.*; | ||
import static io.gatling.javaapi.jdbc.JdbcDsl.*; | ||
|
||
public class GameSimulation extends Simulation { | ||
|
||
private HttpProtocolBuilder httpProtocol = http | ||
.baseUrl("http://40.66.46.204:8003") | ||
.inferHtmlResources() | ||
.acceptHeader("*/*") | ||
.acceptEncodingHeader("gzip, deflate") | ||
.acceptLanguageHeader("es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3") | ||
.originHeader("http://wiqgame.run.place") | ||
.userAgentHeader("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0"); | ||
|
||
private Map<CharSequence, String> headers_0 = Map.ofEntries( | ||
Map.entry("Access-Control-Request-Headers", "content-type"), | ||
Map.entry("Access-Control-Request-Method", "POST") | ||
); | ||
|
||
private Map<CharSequence, String> headers_2 = Map.ofEntries( | ||
Map.entry("Accept", "application/json, text/plain, */*"), | ||
Map.entry("Content-Type", "application/json") | ||
); | ||
|
||
|
||
private ScenarioBuilder scn = scenario("GameSimulation") | ||
.exec( | ||
http("request_0") | ||
.options("/api/game/new") | ||
.headers(headers_0) | ||
.resources( | ||
http("request_1") | ||
.options("/api/game/settings") | ||
.headers(headers_0), | ||
http("request_2") | ||
.post("/api/game/settings") | ||
.headers(headers_2) | ||
.body(RawFileBody("gamesimulation/0002_request.json")), | ||
http("request_3") | ||
.post("/api/game/new") | ||
.headers(headers_2) | ||
.body(RawFileBody("gamesimulation/0003_request.bin")), | ||
http("request_4") | ||
.options("/api/game/next") | ||
.headers(headers_0), | ||
http("request_5") | ||
.post("/api/game/next") | ||
.headers(headers_2) | ||
.body(RawFileBody("gamesimulation/0005_request.json")), | ||
http("request_6") | ||
.options("/api/game/update") | ||
.headers(headers_0) | ||
) | ||
); | ||
|
||
{ | ||
setUp(scn.injectOpen(atOnceUsers(1))).protocols(httpProtocol); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
|
||
import java.time.Duration; | ||
import java.util.*; | ||
|
||
import io.gatling.javaapi.core.*; | ||
import io.gatling.javaapi.http.*; | ||
import io.gatling.javaapi.jdbc.*; | ||
|
||
import static io.gatling.javaapi.core.CoreDsl.*; | ||
import static io.gatling.javaapi.http.HttpDsl.*; | ||
import static io.gatling.javaapi.jdbc.JdbcDsl.*; | ||
|
||
public class LoginSimulation extends Simulation { | ||
|
||
private HttpProtocolBuilder httpProtocol = http | ||
.baseUrl("http://40.66.46.204:8001") | ||
.inferHtmlResources() | ||
.acceptHeader("*/*") | ||
.acceptEncodingHeader("gzip, deflate") | ||
.acceptLanguageHeader("es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3") | ||
.userAgentHeader("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:125.0) Gecko/20100101 Firefox/125.0"); | ||
|
||
private Map<CharSequence, String> headers_0 = Map.ofEntries( | ||
Map.entry("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"), | ||
Map.entry("Upgrade-Insecure-Requests", "1") | ||
); | ||
|
||
private Map<CharSequence, String> headers_1 = Map.ofEntries( | ||
Map.entry("Access-Control-Request-Headers", "content-type"), | ||
Map.entry("Access-Control-Request-Method", "POST"), | ||
Map.entry("Origin", "http://wiqgame.run.place") | ||
); | ||
|
||
private Map<CharSequence, String> headers_2 = Map.ofEntries( | ||
Map.entry("Accept", "application/json, text/plain, */*"), | ||
Map.entry("Content-Type", "application/json"), | ||
Map.entry("Origin", "http://wiqgame.run.place") | ||
); | ||
|
||
private Map<CharSequence, String> headers_5 = Map.ofEntries( | ||
Map.entry("Accept", "image/avif,image/webp,*/*"), | ||
Map.entry("If-None-Match", "\"2703dd875fee9f83862e5ddddd0c83066db3db0a\"") | ||
); | ||
|
||
private Map<CharSequence, String> headers_6 = Map.ofEntries( | ||
Map.entry("Accept", "image/avif,image/webp,*/*"), | ||
Map.entry("If-None-Match", "\"d0c780791798822d083faa134b4e4c44f0edaacd\"") | ||
); | ||
|
||
private String uri1 = "40.66.46.204"; | ||
|
||
private String uri2 = "http://wiqgame.run.place"; | ||
|
||
private ScenarioBuilder scn = scenario("LoginSimulation") | ||
.exec( | ||
http("request_0") | ||
.get(uri2 + "/login") | ||
.headers(headers_0), | ||
pause(5), | ||
http("request_1") | ||
.options("/api/auth/login") | ||
.headers(headers_1) | ||
.resources( | ||
http("request_2") | ||
.post("/api/auth/login") | ||
.headers(headers_2) | ||
.body(RawFileBody("loginsimulation/0002_request.json")), | ||
http("request_3") | ||
.options("/api/auth/verify") | ||
.headers(headers_1), | ||
http("request_4") | ||
.post("/api/auth/verify") | ||
.headers(headers_2) | ||
.body(RawFileBody("loginsimulation/0004_request.bin")), | ||
http("request_5") | ||
.get(uri2 + "/static/media/wiq_banner.72e2dbab15a075289fa5.png") | ||
.headers(headers_5), | ||
http("request_6") | ||
.get(uri2 + "/static/media/wiq_banner.light.4fe52d0e6b07455671e6.png") | ||
.headers(headers_6), | ||
http("request_7") | ||
.options("http://" + uri1 + ":8004/api/userdetails/name") | ||
.headers(headers_1), | ||
http("request_8") | ||
.options("http://" + uri1 + ":8002/api/questions/tags") | ||
.headers(headers_1), | ||
http("request_9") | ||
.post("http://" + uri1 + ":8002/api/questions/tags") | ||
.headers(headers_2) | ||
.body(RawFileBody("loginsimulation/0009_request.json")), | ||
http("request_10") | ||
.post("http://" + uri1 + ":8004/api/userdetails/name") | ||
.headers(headers_2) | ||
.body(RawFileBody("loginsimulation/0010_request.json")) | ||
) | ||
); | ||
|
||
{ | ||
setUp(scn.injectOpen(atOnceUsers(1))).protocols(httpProtocol); | ||
} | ||
} |
Oops, something went wrong.