tzatziki icon indicating copy to clipboard operation
tzatziki copied to clipboard

Tzatziki {{var}} reporting interpretation

Open bmougeot opened this issue 7 months ago • 0 comments

🚀 Feature Request

Hello 👋🏼

Subject: Allow tzatziki {{var}} interpretation in report.

Example:

Scenario: This is an example of scenario used in our team
        Given we post "{{tillURL}}/acquisitions":
        """
            {"value": "3608399888925"}
        """
        And we get "{{tillURL}}/transactions/current"

        # ⬇️ here I will retrieve and save in {{id}} my uuid data return by previous step
        And we save result as id 
        
        And we patch "{{tillURL}}/transactions/current/status":
        """
            {"status": "CANCELED"}
        """
        
        # ⬇️ here I will call another endpoint by my {{id}} value to assert his new status
        When we get "{{tillURL}}/transactions/{{id}}"
        Then we receive a status OK_200 and:
        """
            {
                "id": "{{id}}",
                "status": "CANCELED"
            }
        """

We are using since few weeks tzatziki for our integration tests and sometimes we should retrieve some data (not unique like an id, uuid, etc) before to do some calls.

Our problem: all {{var}} are not interpreted by our cucumber html (based on cucumber.json generated)

Example: The cucumber.json generated after tests looks like to:

{
   "result": {
         "duration": 139339000,
          "status": "passed"
      },
      "line": 23,
      "name": "we get \"{{tillURL}}/transactions/{{id}}\"", # ⬅️ example
      "match": {
           "arguments": [
                  {....},
                  {
                      "val": "{{tillURL}}/transactions/{{id}}", # ⬅️ example
                      "offset": 8
                   }
            ],
            {....}
       },
         "keyword": "When "
}

Our cucumber html report is generated from the cucumber.json:

Capture d’écran 2024-07-09 à 11 38 21

bmougeot avatar Jul 09 '24 09:07 bmougeot