TF001 Writing requirements as text

We write requirements and functional tests in YAML files

Is a test for

Initial state

Blank project

Procedure

Step 1

Open a file called requirements.yaml in a text editor, write 2 requirements inside, so that it contains:

$ cat requirements.yaml
kind: requirements
category: functional
requirements:
- id: RF01
  long: The first requirement
- id: RF02
  short: Second
  long: The second requirement

Step 2

Verify the requirements are human-readable, in YAML format, and contain:

  • A unique identider in id

  • An optional summary in short

  • The requirement statement in long

Step 3

Open a file called tests.yaml in a text editor and write the following content inside:

$ cat tests.yaml
kind: tests
category: functional
tests:
- id: T01
  ref: [RF01]
  long: The first test, that validates the first requirement
  steps:
  - action: The only step
- id: T02
  ref: [RF02]
  short: Second test
  long: The second test, that validates the second requirement
  steps:
  - action: Do this
  - action: Do that shell command
    run: echo Hello

Step 4

Verify the tests are also in YAML format and contain:

  • The validated requirement(s) in ref

  • A procedure to follow in steps