Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Behat-Table-Generator for VSCodeNew to Visual Studio Code? Get it now.
Behat-Table-Generator for VSCode

Behat-Table-Generator for VSCode

Neokil

|
323 installs
| (0) | Free
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Behat-Table-Generator for VSCode

When we are writing Behat-Test-Cases we sometimes have plenty of parameters that need to be tested. To test those we normally use a Scenario-Outline with Examples:

Scenario Outline: Test the Endpoint with several parameters
Given I request "/search?name=<name>&parent?<parent>&active=<active>" using HTTP GET
   ... some validation happening here
Examples:
    | name | parent | active |
    | abc  |        |        |
    | abc  | xyz    |        |
    | abc  | xyz    | true   |

But those Testcases dont cover all possible combinations. This is why this extension was created. Instead of a Table you can write this:

Examples:
{
    "name": [ "abc", "" ],
    "parent: [ "xyz", "" ],
    "active: [ "true", "false", "" ]
}

Then by selecting the JSON and executing the Command GenerateBehatTable it will generate a Table with all combinations from your JSON-Object.

| name | parent | active |
| abc  | xyz    | true   | 
| abc  | xyz    | false  | 
| abc  | xyz    |        | 
| abc  |        | true   | 
| abc  |        | false  | 
| abc  |        |        | 
|      | xyz    | true   | 
|      | xyz    | false  | 
|      | xyz    |        | 
|      |        | true   | 
|      |        | false  | 
|      |        |        | 

This Table can then be used for the Behat-Examples.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft