Concordion Concordion Markdown Specifications 2 — Questions and Answers
Question 1: What is the correct Concordion Markdown syntax to execute a method and capture its return value into a variable?
- [](- "#result = computeValue()") (Correct answer)
- [result](- "#result")
- [](- "capture computeValue()")
- [result](- "return=computeValue()")
Correct answer: [](- "#result = computeValue()")
Using `#result = methodCall()` in the URL captures the method's return value into the named variable for use in later assertions.
Question 2: How do you link to and run a sub-specification from a Concordion Markdown file?
- [Suite Name](sub-spec.html "c:run") (Correct answer)
- [run](sub-spec.md -)
- [](- "c:run=sub-spec.html")
- [Suite Name](- "#run=sub-spec.html")
Correct answer: [Suite Name](sub-spec.html "c:run")
The `c:run` title on a standard Markdown link (pointing to the HTML output path) instructs Concordion to run the linked specification as a suite member.
Question 3: In Concordion Markdown, how are multiple parameters supplied to a fixture method in a single row?
- Each parameter is set via a separate `#var` link in the row, then referenced in the method call (Correct answer)
- Parameters are passed positionally using `$1, $2` placeholders
- Parameters are declared with `@Param` annotations in the fixture method
- Parameters are listed in the Markdown front matter section
Correct answer: Each parameter is set via a separate `#var` link in the row, then referenced in the method call
Each input cell in a row contains a set command like `[value](- "#param")`, and the method call references those variables by name.
Question 4: What does the `?=` prefix in a Concordion Markdown link URL specifically indicate?
- The link text is the expected value and the expression after `?=` is evaluated and compared (Correct answer)
- The link is an optional assertion that won't fail the test if incorrect
- The expression result is only printed to output without failing on mismatch
- The link is a conditional assertion based on a previously captured variable
Correct answer: The link text is the expected value and the expression after `?=` is evaluated and compared
`?=` introduces an assertEquals command: Concordion evaluates the OGNL expression on the right and asserts it equals the link text.
Question 5: How are Concordion table commands expressed within Markdown specification files?
- Using standard Markdown table syntax with Concordion link commands embedded in cells (Correct answer)
- Using HTML table tags embedded directly within the Markdown file
- Using a special `{concordion:table}` fenced block syntax
- Using CSV rows with column headers declared in the YAML front matter
Correct answer: Using standard Markdown table syntax with Concordion link commands embedded in cells
Concordion Markdown uses standard pipe-delimited Markdown tables, with Concordion commands placed as link syntax inside individual table cells.
Question 6: Which of the following correctly represents a Concordion Markdown assertion that `fullName(#first, #last)` returns "John Smith"?
- [John Smith](- "?=fullName(#first, #last)") (Correct answer)
- [John Smith](- "assertEquals=fullName(#first, #last)")
- [John Smith](- "#result = fullName(#first, #last)")
- [John Smith](- "check fullName(#first, #last)")
Correct answer: [John Smith](- "?=fullName(#first, #last)")
The `?=` prefix followed by the method call makes Concordion evaluate the method and assert its output equals the link text "John Smith".
Question 7: In Concordion Markdown, what is the correct way to express a set-variable command inline within a paragraph?
- Embed `[value](- "#var")` directly in the sentence text (Correct answer)
- Place `{set #var=value}` anywhere in the paragraph
- Use `{{#var = value}}` double-brace syntax
- Add a `<!-- set #var=value -->` HTML comment before the paragraph
Correct answer: Embed `[value](- "#var")` directly in the sentence text
Concordion Markdown allows command links to appear naturally inline within prose paragraphs, making specifications readable while still executable.
What is the correct Concordion Markdown syntax to execute a method and capture its return value into a variable?