Hello All,
Good evening!
I recently started using Gatling.
I created a Gatling Maven project and I am using Idea IntelliJ.
I want to see the request, headers, body and response logged in a file. I have configured as shown below in logback-test.xml file. I file is in /src/test/resources/logback-test.xml location. I am not able to see the request, headers, body, response. The file gatling.log file is also NOT getting created. Any help would be appreciated.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>../gatling.log</file>
<append>true</append>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - %msg%n%rEx</pattern>
</encoder>
</appender>
<!-- uncomment and set to DEBUG to log all failing HTTP requests -->
<!-- uncomment and set to TRACE to log all HTTP requests -->
<!-- <logger name="io.gatling.http.engine.response" level="TRACE" /> -->
<logger name="io.gatling.http" level="TRACE" />
<root level="TRACE">
<appender-ref ref="FILE" />
</root>
</configuration>
Below is my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="[http://maven.apache.org/POM/4.0.0](http://maven.apache.org/POM/4.0.0)" xmlns:xsi="[http://www.w3.org/2001/XMLSchema-instance](http://www.w3.org/2001/XMLSchema-instance)"
xsi:schemaLocation="[http://maven.apache.org/POM/4.0.0](http://maven.apache.org/POM/4.0.0) [http://maven.apache.org/xsd/maven-4.0.0.xsd](http://maven.apache.org/xsd/maven-4.0.0.xsd)">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.modeln.uam</groupId>
<artifactId>testsuite</artifactId>
<version>0.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>integration-gatling</artifactId>
<name>integration-gatling</name>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<gatling.version>3.2.0</gatling.version>
<gatling-plugin.version>3.0.3</gatling-plugin.version>
<scala-maven-plugin.version>4.1.1</scala-maven-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.gatling.highcharts</groupId>
<artifactId>gatling-charts-highcharts</artifactId>
<version>${gatling.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-core</artifactId>
<version>${gatling.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.gatling</groupId>
<artifactId>gatling-http</artifactId>
<version>${gatling.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-maven-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<jvmArgs>
<jvmArg>-Xss100M</jvmArg>
</jvmArgs>
<args>
<arg>-target:jvm-1.8</arg>
<arg>-deprecation</arg>
<arg>-feature</arg>
<arg>-unchecked</arg>
<arg>-language:implicitConversions</arg>
<arg>-language:postfixOps</arg>
</args>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.gatling</groupId>
<artifactId>gatling-maven-plugin</artifactId>
<version>${gatling-plugin.version}</version>
<configuration>
<jvmArgs>
<jvmArg>-Dit.server-url=${it.server-url}</jvmArg>
<jvmArg>-Dit.auth-server-url=${it.auth-server-url}</jvmArg>
<jvmArg>-Dit.mail-server-api-url=${it.mail-server-api-url}</jvmArg>
<jvmArg>-Dusername=demo</jvmArg>
<jvmArg>-Dpassword=demo</jvmArg>
</jvmArgs>
<runMultipleSimulations>true</runMultipleSimulations>
</configuration>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>