swagger-api / swagger-api/swagger-codegen

Gatling and Scala generation

Open
#4,132 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Scala Enhancement: Feature help wanted
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

Swagger-codegen

I want to use the generated scala classes in a Gatling test scenario. But no gatling report is generated because no execution chain is invoked in the generated InvokeApi. I am using eclipse.

Caused by: java.lang.UnsupportedOperationException: There were no requests sent during the simulation, reports won't be generated
at io.gatling.charts.report.ReportsGenerator.generateFor(ReportsGenerator.scala:48)
at io.gatling.app.LogFileProcessor.generateReports(RunResultProcessor.scala:64)
at io.gatling.app.LogFileProcessor.processRunResult(RunResultProcessor.scala:43)
at io.gatling.app.Gatling.start(Gatling.scala:66)
at io.gatling.app.Gatling$.start(Gatling.scala:57)
at io.gatling.app.Gatling$.fromArgs(Gatling.scala:49)
at io.gatling.app.Gatling$.main(Gatling.scala:43)
at io.gatling.app.Gatling.main(Gatling.scala)

Swagger-codegen version

2.2.1

Swagger declaration file content or url
Command line used for generation

Scala
Scala-editor - manually convert the swagger.json
Java 8
STS
Maven

Steps to reproduce
  1. Get a REST server swagger json
  2. Use it to generate scala client code.
  3. Try to create a Gatling scenario with the generated scala classes.
  4. Start the gatling test.
Related issues
Suggest a Fix

Introduce a Gatling scala code generation option and add it in Swagger-editor

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported failure with Swagger-codegen 2.2.1, a generated Scala client, and the Gatling scenario described in the issue. Then investigate the Scala generation flow and the Swagger-editor option requested. Done means generated Scala code can invoke the execution chain and a Gatling report is produced.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
testing, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.