protected void payloadHandling() {
    if (payload != null) {
      logger.info("the payload is " + payload.toString());
      url = payload.getString("url", null);
      port = payload.getInt("port", 30000);
      testTimeout = payload.getInt("testTimeout", testTimeout);
      takeScreenshotForEachTest =
          payload.getBoolean("takeScreenshotForEachTest", false);
      getStatsConfig = payload.getJsonObject("getStats");
      multiThread = payload.getBoolean("multiThread", true);
      expectedTestDuration = payload.getInt("expectedTestDuration", expectedTestDuration);
      meetingDuration = this.payload.getInt("meetingDuration", meetingDuration);
      closeDrivers = payload.getBoolean("closeDrivers", false);
      setExpectedTestDuration(Math.max(getExpectedTestDuration(), (meetingDuration + 300) / 60));
      maxUsersPerRoom = payload.getInt("usersPerRoom", this.tupleSize);
      consoleLogs = payload.getBoolean("consoleLogs", consoleLogs);
      fastRampUp = payload.getBoolean("fastRampUp", fastRampUp);
      if (payload.containsKey("windowSize") && payload.getString("windowSize").contains("x")) {
        StringTokenizer st = new StringTokenizer(payload.getString("windowSize"), "x");
        windowWidth = Integer.parseInt(st.nextToken());
        windowHeight = Integer.parseInt(st.nextToken());
      }
      if (this.payload.containsKey("scenarios")) {
        JsonArray jsonArray2 = this.payload.getJsonArray("scenarios");
        for (int i = 0; i < jsonArray2.size(); ++ i) {
          try {
            this.scenarioArrayList.add(new Scenario(jsonArray2.getJsonObject(i), logger, networkInstrumentation));
          } catch (Exception e) {
            logger.error("Invalid scenario number : " + i + "\r\n" + ReportUtils.getStackTrace(e));
          }
        }
      }
    }
  }
Restructuring the test according to options given in payload object from config file. This
function processes the parameters common to all load tests.
KITE-Framework/src/main/java/org/webrtc/kite/tests/KiteBaseTest.java