openfasttrace icon indicating copy to clipboard operation
openfasttrace copied to clipboard

Multi artifact-type forwarding broken

Open redcatbear opened this issue 6 years ago • 1 comments

Description

When trying to forward a req artifact to an imp and a utest artifact from a Markdown file, the according implicit dsn artifact is not created.

If I forward to one type only, it works as expected.

Strangely there is a unit test that should cover this kind of situation. Looks like it does not completely:

https://github.com/itsallcode/openfasttrace/blob/develop/importer/markdown/src/test/java/org/itsallcode/openfasttrace/importer/markdown/TestMarkdownImporter.java

Steps to Reproduce

  1. Create requirement spec item req~boolean-operators~1 that needs dsn coverage
  2. Forward it throut dsn like this dsn --> impl, utest: req~boolean-operators~1
  3. Create coverage in impl and utest
  4. Run trace

Expected behavior

Trace is green

Environment

  • OFT: 2.2.0
  • OS: Fedora 29
  • Java Version: openjdk version "1.8.0_191" OpenJDK Runtime Environment (build 1.8.0_191-b13) OpenJDK 64-Bit Server VM (build 25.191-b13, mixed mode)

redcatbear avatar Jan 30 '19 07:01 redcatbear

The problem is probably caused by the Markdown state machine. It recognizes FORWARD patterns only in states START and OUTSIDE. When adding a forwarding in the middle (see below) it won't detect the forwarding:

req~boolean-operators~1
Needs: dsn
dsn --> impl, utest: req~boolean-operators~1

A workaround would be to force the state machine into the OUTSIDE state by prefixing the forwarding line with a header and some text:

req~boolean-operators~1
Needs: dsn
# Separator
ignore
dsn --> impl, utest: req~boolean-operators~1

Fixing this will require updating the state machine to allow forwarding also in SPEC_ITEM state.

kaklakariada avatar Feb 18 '24 19:02 kaklakariada