4

With a recent change to our codebase we're starting to get the following error.

Caused by: java.lang.UnsupportedOperationException: There were no requests sent during the simulation, reports won't be generated

We changed nothing with our gatling setup compared to our master branch in which the tests do continue working fine.

The only meaningful change we made in the feature files was the usage of custom java code to fetch an api-key stored in our secret manager. Said code is called so:

* def AwsUtil = Java.type('be.telenet.yelo.qrcode.util.AwsUtil');
* def apiKey = AwsUtil.getParameterFromSSMByName(ssmApiKeyName, proxyFlag)

Behind this function is a simple AWS SDK getParameter call which works fine in the regular karate cucumber runs and the tests seem indeed to run as well during the karate run because we are getting results:

Karate version: 0.9.6 ====================================================== elapsed: 9.11 | threads: 5 | thread time: 36.70 features: 3 | ignored: 0 | efficiency: 0.81 scenarios: 15 | passed: 15 | failed: 0 ======================================================

Yet at the end of the run gatling says no calls have been made.

Some more config for our gatling setup:

    <profile>
        <id>load</id>
        <activation>
            <property>
                <name>load</name>
                <value>true</value>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>io.gatling</groupId>
                    <artifactId>gatling-maven-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>test</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <simulationsFolder>src/test/java</simulationsFolder>
                        <includes>
                            <include>KarateSimulation</include>
                        </includes>
                    </configuration>
                </plugin>
            </plugins>
        </build>
    </profile>

Is there anyone who has experienced similar issues and who might be able to help?

Kind regards

MaartenCl
  • 41
  • 1
  • the only suggestion I have, follow this process please: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue - also since we have tried to improve error traces, it would be good if you can try the version in development: https://github.com/intuit/karate/wiki/1.0-upgrade-guide – Peter Thomas Nov 20 '20 at 01:28
  • @MaartenCI Do you have used function read(<>) in your feature file? – Mitul Lakhani Feb 21 '21 at 12:34

1 Answers1

-1

My guess is that some library in the AWS utils conflicts with some of the Gatling ones. It may require some digging into JAR dependency trees.

One hint - if the API key retrieval is an HTTP call behind the scenes, guess what Karate is really good at.

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248