question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[karate-gatling] explore ways of composing existing tests better for specific flows

See original GitHub issue

Triggered by this question on Stack Overflow: https://stackoverflow.com/q/51504264/143475 and others who have discussed this with me as well.

Please comment and add asks / opinion.

I see the following themes:

  • when there already exists a bunch of Karate tests, it should be possible to “pick and choose” some of them, treat as a unit and then use that unit in a Gatling simulation.
  • I think the above is best solved by tags. so you can declare that only some tags should participate in a Gatling run
  • ideally your existing features should be split into fine-grained flows.
  • but I get that people want to have feature files with multiple scenarios
  • proposal: a tag of the form @name=foo will be considered special in Karate
  • this is how you can control WHICH scenarios to isolate in a given feature. for e.g. in Gatling scenarioNames( "createUser,deleteUser")
  • if we have a Karate-native means of calling a feature BUT only invoke a certain Scenario then for Gatling all you need to do is write one extra “wrapper” feature, which would be “thin” that can “delegate” to or “orchestrate” all the other features and scenarios that need to be called. this needs more thinking and will evolve I am guessing. it might be better to have this “orchestration” definable in Gatling itself to avoid one extra layer

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
ptrthomascommented, Jul 25, 2018

additional thought, should be possible to refer to the feature+scenario directly in one short-cut notation:

karateFeature("classpath:mock/cats-create.feature@name=foo")

would we need any other meta info on top of this ?

1reaction
ptrthomascommented, Jul 25, 2018

@manoj404 a couple of extra points. just so that I can explain this to others later:

  • remember that this is a perf test. gatling will run each unit in parallel. there’s no way you can inter-depend
  • if you already have a CRUD test for say DELETE, you will naturally have a CREATE as a “pre-requisite” for that flow. isn’t this how most teams do testing. if you are really smart about tests you may modularize so that you have a re-usable C flow - but still you will have a single feature that will run C first and then D

hope that makes sense !

Read more comments on GitHub >

github_iconTop Results From Across the Web

[karate-gatling] explore ways of composing existing tests ...
I think the above is best solved by tags. so you can declare that only some tags should participate in a Gatling run;...
Read more >
Step-5: Karate & Gatling Performance Tests - Kloia
In this blog post, which is the last article of the series, we will examine how Karate service tests can be used as...
Read more >
Is there an option for us to customize and group the test ...
Is there an option for us to customize and group the test scenarios in the statics section of the Karate Gatling Report? Ask...
Read more >
Automation and Performance Testing Using Karate - Medium
Karate is an open-source behavioural-driven development (BDD) based testing framework from Intuit.
Read more >
Karate: Test Automation Made Simple - YouTube
Karate is the only open-source tool to combine #API test -automation, mocks, performance- testing, and even UI automation into a single, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found