Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about building custom RequestAction #7

Open
drewvella-dpg opened this issue Nov 20, 2020 · 0 comments
Open

Question about building custom RequestAction #7

drewvella-dpg opened this issue Nov 20, 2020 · 0 comments

Comments

@drewvella-dpg
Copy link

drewvella-dpg commented Nov 20, 2020

I followed the tutorial which teaches you to extend Gatling and essentially led to building this plugin. I'm looking to build my own custom actions and have a small issue. Here's a simplified version of the code in my action (extends RequestAction):

  override def sendRequest(requestName: String, session: Session): Validation[Unit] = {
    val start = clock.nowMillis
    if (requestName.toString().equals("abc")) {
      statsEngine.logResponse(session.scenario, session.groups, requestName.toString(), start, clock.nowMillis, OK, None, None)
      Success("success")
    } else {
      statsEngine.logResponse(session.scenario, session.groups, requestName.toString(), start, clock.nowMillis, KO, None, None)
      Failure("fail")
    }
  }

For some reason when this action is invoked from exec the test remains active if result is OK. Any suggestions? (Apologies in advance if this is not the right forum)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant