1

I am trying to reuse my existing integration test cucumber Gherkin scenarios for performance test using Gatling. Integration tests are written in restassured.io and cucumber JVM. What I am trying to do is adding a new tag to existing integration test, something like @Performance_REQ_noOfRequest_RESP_responseTime.

So I want to know is there any way programmatically read cucumber tag so that I can extract request and response value and send it to Gatling test.

Sample Gherkin is Feature: End point to get employee information

@Regression @Performance_Req_1000_Resp_100s
Scenario: Get employees
When I send request to /api/employees
Then I should see a list of employees

Deepu Nair
  • 165
  • 5
  • 15

1 Answers1

5

You can retrieve the tags of a Scenario using the Before or After Hook like for example:

@Before
public void setUp(Scenario scenario) {

    scenario.getSourceTagNames();
}
André Barbosa
  • 684
  • 1
  • 6
  • 14