Skip to content

Wrong test name in XML report when running Scenario Outline #27

@frederico-betting

Description

@frederico-betting

👓 What did you see?

Scenario Outline name is not properly stored in the xml file when using variables.

Example:

Scenario Outline: Validate TLS ciphers for <service>
    Given I have the  domain "<domain>"
    Then I check that the following list of ciphers are configured:
      | TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 |
      | TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 |

   Examples:
      | service       | domain        |
      | qa-service    |  example.com  |

The output is:

<?xml version='1.0' encoding='UTF-8'?>
<testsuite name="Cucumber" time="25.413" tests="1" skipped="0" failures="0" errors="0">
<testcase classname="TLS Ciphers in public services" name="Validate TLS ciphers for &lt;service> - Example #1.1" time="24.496">
(...)

OR

Validate TLS ciphers for &lt;service> - Example #1.1

✅ What did you expect to see?

I was expecting the following output instead:

The output is:

<?xml version='1.0' encoding='UTF-8'?>
<testsuite name="Cucumber" time="25.413" tests="1" skipped="0" failures="0" errors="0">
<testcase classname="TLS Ciphers in public services" name="Validate TLS ciphers for qa-service" time="24.496">
(...)

Validate TLS ciphers for qa-service

The variable <service> changed to the value it was defined in the example and (maybe) no reference the example ( - Example #1.1)

📦 Which tool/library version are you using?

I am using cucumber 7.14.0 and testng 7.5.1.

🔬 How could we reproduce it?

  • You can have the latest version of cucumber and testng in a Java project.
  • Create a Scenario Outline with variables in the name.
  • Enable plugin to report in junit format.

This text was originally generated from a template, then edited by hand. You can modify the template here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions