TF001 Writing requirements as text

We write requirements and functional tests in text files

Is a test for

Initial state

Blank project

Procedure

Step 1

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

$ cat spec.yaml
kind: requirements
category: functional
requirements:
- id: S01
  short: Lorem ipsum
  long: The first requirement
- id: S02
  long: The second requirement

Step 2

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

  • A unique identider in id

  • A 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: [S01]
    long: The first test, that validates the first requirement
    steps:
      - action: A first step
      - action: A second step, with a 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