From 2994fbb5343c79f534232d667fd8c421896c9b01 Mon Sep 17 00:00:00 2001 From: Quentin Date: Sat, 25 May 2024 18:29:03 +0200 Subject: [PATCH 1/3] Sonar: This block of commented-out lines of code should be removed --- generators/gatling/README.md | 11 +++++++++++ .../simulations/_entityClass_GatlingTest.java.ejs | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 generators/gatling/README.md diff --git a/generators/gatling/README.md b/generators/gatling/README.md new file mode 100644 index 000000000000..10d3404e3a47 --- /dev/null +++ b/generators/gatling/README.md @@ -0,0 +1,11 @@ +## Logging tips + +``` +LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); +{ + // Log all HTTP requests + //context.getLogger("io.gatling.http").setLevel(Level.valueOf("TRACE")); + // Log failed HTTP requests + //context.getLogger("io.gatling.http").setLevel(Level.valueOf("DEBUG")); +} +``` diff --git a/generators/gatling/templates/src/test/java/gatling/simulations/_entityClass_GatlingTest.java.ejs b/generators/gatling/templates/src/test/java/gatling/simulations/_entityClass_GatlingTest.java.ejs index fde73800a09c..b2c18c23d4c1 100644 --- a/generators/gatling/templates/src/test/java/gatling/simulations/_entityClass_GatlingTest.java.ejs +++ b/generators/gatling/templates/src/test/java/gatling/simulations/_entityClass_GatlingTest.java.ejs @@ -40,6 +40,8 @@ import org.slf4j.LoggerFactory; /** * Performance test for the <%= entityClass %> entity. + * + * @see Logging tips */ public class <%= entityClass %>GatlingTest extends Simulation { From 3702e3ac3ecb12e7a7dd817ab76d4a6353e4e8d9 Mon Sep 17 00:00:00 2001 From: Quentin Date: Sat, 25 May 2024 22:36:15 +0200 Subject: [PATCH 2/3] Update generators/gatling/README.md Co-authored-by: Marcelo Shima --- generators/gatling/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generators/gatling/README.md b/generators/gatling/README.md index 10d3404e3a47..3b33b09b64c2 100644 --- a/generators/gatling/README.md +++ b/generators/gatling/README.md @@ -1,3 +1,7 @@ +# Gatling sub-generator + +Generates load testing tool for entities using [Gatling](https://gatling.io/). + ## Logging tips ``` From 3ab1138c9b530a5a77bead2f2ed43fe38dc0489d Mon Sep 17 00:00:00 2001 From: Quentin Date: Sat, 25 May 2024 22:54:49 +0200 Subject: [PATCH 3/3] Update generators/gatling/README.md Co-authored-by: Matt Raible --- generators/gatling/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/gatling/README.md b/generators/gatling/README.md index 3b33b09b64c2..0611e639b157 100644 --- a/generators/gatling/README.md +++ b/generators/gatling/README.md @@ -1,6 +1,6 @@ # Gatling sub-generator -Generates load testing tool for entities using [Gatling](https://gatling.io/). +Generates load testing simulations for entities using [Gatling](https://gatling.io/). ## Logging tips