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

I’m completely new to Gatling. Literally only learned it this week but I’ve taken the responsibility of adding load testing to my office’s part of the company product. I’m getting the above error when I try to run my script and I have no idea what’s going wrong. I see some posts that are solved simply because the user added a missing period. I don’t think that is they case with me, but who knows. I’m also new to this group, so I’m sorry if I’m breaking a spoken or unspoken rule in this post. I’m pasting my code below. A lot of it reaches out to other classes, but I’m confident it’s not anything in those that is breaking. I think it’s something with my own script.

class viewSessionListPersona extends Simulation with scenarioBase {

  //reusable chunk of code to get users logged in and into sessions
  def goLoginCapAndViewSessions()= {

    //not sure if this will log in the same user as the first part of this persona
    //since it will have to come from the scenario
    //may need to pass that down somehow
      .pause(3, 10)
      .exec(cap.login("${username}", "${password}"))
      .pause(2, 10)

      // load each day once
      .repeat(4) {

        //also not sure if the day id will lead them to the same day id here
          .pause(1, 3)

   //the part that all users will go through regardless of what they do afterwards
   def commonViewSessionListPersonaFlow(): = {

    //grab a random day id from csv file

      //click "Sessions"
      //when we get the session list for the first time, it runs getSessionCount... and getFilterType

      //this clicks on a particular day
      .repeat(getRandomInt(1, 4)) {

        //newSearch = "false" means "don't go to a new session list, just load more of this one"
        //in other words, scroll
        exec(cap.getSessionList("${dayId}", newSearch = "false"))
          .pause(2, 4)

      //toggle some interests
        .repeat(getRandomInt(2, 5)) {
          exec(cap.toggleInterest("${sessionID}", "session"))

    //after the common flow, this is option one for users
    def viewSessionListPersonaLogsBackInAndTogglesInterests()= {
      exec(cap.toggleInterest("${sessionID}", "session")),

    //after the common flow, this is option two for users
    def viewSessionListPersonaLogsBackInAndEnrolls()= {
        "Open" -> cap.enrollSession("${sessionTimeID}"),
        "Scheduled" -> cap.unenrollSession("${sessionTimeID}")

    //has all users in this persona go through the common flow and then switches between users that
    //that toggle interests and users that enroll and unenroll
    //maybe this should be a function and not a scenario
    val scn = scenario("cap.viewSessionListPersona")

          splitUsers(simUsers) into (rampUsers(20) over (5 seconds)) separatedBy (30 seconds)


The error is pretty explicit: your test didn’t generate any HTTP request.
Log for missing dots that cause your actions to not be attached to the chain.

There’s at least one missing:

 MISSING DOT HERE>>>>>>>>     uniformRandomSwitch(

The cap. functions are all http requests that work in other scripts. I’ve added the . in front of uniform switch and it didn’t change the error.

Some things to check, once you are certain the chains are all intact:

  • are you launching the right simulation?
  • enable more detailed logging and capture the logs and see if they tell you anything useful