Skip to content

Conversation

@WardCunningham
Copy link
Owner

The tck is written in the style of Cucumber tests. We explore the possibility of mechanically converting these to the Deno test framework. Our first question, do we understand how we will recognize the various parts of the test specification.

We tally the keywords that begin each line of input. Given, When and Then are expected. A few other keywords appear in some feature files. We add additional match cases until we encounter no more surprises.

A next step would be to look a little deeper into the keyword lines. Then we would define Deno test helpers that match the semantics of those used in Cucumber.

{
  file: "Match1.feature",
  "#": 28,
  Blank: 19,
  Feature: 1,
  Scenario: 6,
  Given: 11,
  When: 11,
  '"""': 15,
  Then: 11,
  "|": 105,
  And: 9,
  Outline: 5,
  Examples: 5
}
{
  file: "Match2.feature",
  "#": 28,
  Blank: 21,
  Feature: 1,
  Scenario: 8,
  Given: 13,
  When: 13,
  '"""': 19,
  Then: 13,
  "|": 96,
  And: 13,
  Outline: 5,
  Examples: 5
}
{
  file: "Match3.feature",
  "#": 28,
  Blank: 33,
  Feature: 1,
  Scenario: 30,
  Given: 30,
  And: 55,
  '"""': 57,
  When: 30,
  Then: 30,
  "|": 67
}
{
  file: "Match4.feature",
  "#": 28,
  Blank: 13,
  Feature: 1,
  Scenario: 10,
  Given: 10,
  And: 18,
  '"""': 20,
  When: 10,
  Then: 10,
  "|": 20,
  Skip: 2
}
{
  file: "Match5.feature",
  "#": 30,
  Blank: 33,
  Feature: 1,
  Background: 1,
  Given: 1,
  And: 37,
  '"""': 37,
  Scenario: 29,
  When: 29,
  Then: 29,
  "|": 241
}
{
  file: "Match6.feature",
  "#": 28,
  Blank: 34,
  Feature: 1,
  Scenario: 20,
  Given: 25,
  And: 40,
  '"""': 45,
  When: 25,
  Then: 25,
  "|": 132,
  Outline: 5,
  Examples: 5
}
{
  file: "Match7.feature",
  "#": 29,
  Blank: 34,
  Feature: 1,
  Scenario: 31,
  Given: 31,
  When: 31,
  '"""': 60,
  Then: 31,
  "|": 70,
  And: 60
}
{
  file: "Match8.feature",
  "#": 28,
  Blank: 6,
  Feature: 1,
  Scenario: 3,
  Given: 3,
  And: 6,
  '"""': 6,
  When: 3,
  Then: 3,
  "|": 9
}
{
  file: "Match9.feature",
  "#": 28,
  Blank: 12,
  Feature: 1,
  Scenario: 9,
  Given: 9,
  And: 18,
  '"""': 18,
  When: 9,
  Then: 9,
  "|": 23
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants