Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

235
Vistas
How to repeat gherkin snippet in Karate?

I have a snippet of Gherkin that builds a JSON body and makes an API call.

I can reuse this snippet in other Karate features via:

* call read("/path/to/snippet.feature")

I have a scenario where I need to repeat this API call, so I want to run this snippet N times.

karate.repeat() exists; however, despite the name, it does not work with Karate gherkin files, or even def'ed Karate functions based on a feature file. Apparently, it only works with JS functions.

How do I repeat a call read() of another feature file an arbitrary number of times without having to explicitly repeat the line that many times? This could get unwieldy in a scenario where the number of calls needed for the scenario is more than a small few.

It seems the only solution is to re-implement that feature as a JS function, so that now I have both a Gherkin and a JS definition of the exact same functionality, which is a pattern that is begging for maintenance nightmares.

How can I call a Karate feature file multiple times in another Karate feature?

about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda