79448567

Date: 2025-02-18 14:24:37
Score: 0.5
Natty:
Report link

It is possible using tags.Official Doc:https://github.com/karatelabs/karate?tab=readme-ov-file#tags

Feature: Tags feature

  @smoke @regression
  Scenario: create user using post and inline json payload
    Given url 'https://reqres.in/api'
    And path '/users'
    And request {"name": "morpheus","job": "leader"}
    When method post
    Then status 201
    * match response.name == "morpheus"
    * match response.job == "leaders"
    * print 'Tags feature:@smoke @regression, method post'

  @regression
  Scenario: update user using put and inline json payload
    Given url 'https://reqres.in/api'
    And path '/users/2'
    And request {"name": "steve","job": "zion resident"}
    When method put
    Then status 200
    * match response.name == "steve"
    * match response.job == "zion resident"
    * print 'Tags feature:@regression, method put'

mvn command

mvn test "-Dkarate.options=--tags @regression" -Dtest=SampleTest 
Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: cyrilgeorge153