Concordion Concordion Commands 2 — Questions and Answers
Question 1: What does the #TEXT variable refer to in a Concordion expression?
- The text content of the current HTML element (Correct answer)
- The full HTML of the element
- The element's ID attribute
- The class attribute value
Correct answer: The text content of the current HTML element
#TEXT is a built-in Concordion variable that holds the inner text of the element the command is placed on.
Question 2: Which Concordion expression syntax is used to call a fixture method with arguments?
- methodName(#arg1, #arg2) (Correct answer)
- methodName[#arg1][#arg2]
- call(methodName, #arg1)
- #arg1 -> methodName
Correct answer: methodName(#arg1, #arg2)
Concordion uses standard method-call syntax with # prefixed variables as arguments within concordion: attributes.
Question 3: What happens to surrounding whitespace in a concordion:set value?
- It is trimmed automatically (Correct answer)
- It is preserved exactly
- It causes a parse error
- It is replaced with underscores
Correct answer: It is trimmed automatically
Concordion trims leading and trailing whitespace from the element text when capturing a value with concordion:set.
Question 4: Which concordion: command can be used to conditionally skip a test?
- There is no built-in skip command; use an extension (Correct answer)
- concordion:skip
- concordion:ignore
- concordion:pending
Correct answer: There is no built-in skip command; use an extension
Core Concordion has no native skip command; the SkipExtension from the concordion-extensions library provides this capability.
Question 5: How are multi-step scenarios typically structured in a Concordion spec?
- Using concordion:execute to set up state followed by concordion:assertEquals to verify (Correct answer)
- Using nested HTML tables only
- Using XML processing instructions
- Using JavaScript callbacks
Correct answer: Using concordion:execute to set up state followed by concordion:assertEquals to verify
A common pattern is using concordion:execute to perform setup actions and concordion:assertEquals to assert outcomes in sequence.
Question 6: What does the concordion:echo command output to the HTML report?
- The result of an expression printed into the document (Correct answer)
- A copy of the element text
- A debug stack trace
- The fixture class name
Correct answer: The result of an expression printed into the document
concordion:echo evaluates an expression and injects the result as text into the HTML report at that point in the document.
What does the #TEXT variable refer to in a Concordion expression?