Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #287 from Arquisoft/UpdateDocs
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
gs-Manuel authored Apr 27, 2024
2 parents 0efcdae + bf6e7b4 commit d548408
Show file tree
Hide file tree
Showing 437 changed files with 189,135 additions and 7 deletions.
Binary file added docs/images/12_code_coverage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/GameSimulationCode.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Game_1000_petitions_during30s.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Game_100_petitions.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Game_200_petitions.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Game_500_petitions.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Game_500_petitions_during20s.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Game_complex.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/Login_1_petition.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ include::src/10_quality_requirements.adoc[]
include::src/11_technical_risks.adoc[]

<<<<
// 12. Glossary
include::src/12_glossary.adoc[]
// 12. Testing Report
include::src/12_testing_report.adoc[]
<<<<
// 13. Glossary
include::src/13_glossary.adoc[]


68 changes: 68 additions & 0 deletions docs/load_tests/code/GameSimulation.java
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);
}
}
101 changes: 101 additions & 0 deletions docs/load_tests/code/LoginSimulation.java
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);
}
}
Loading

0 comments on commit d548408

Please sign in to comment.