Concordion Concordion Commands 1 — Questions and Answers
Question 1: Which XML namespace prefix is used for all Concordion commands in an HTML specification?
- concordion: (Correct answer)
- conc:
- test:
- spec:
Correct answer: concordion:
All Concordion attributes use the concordion: prefix, which must be mapped to the Concordion namespace URI.
Question 2: What concordion: attribute would you use to verify that a greeting method returns 'Hello World'?
- concordion:assertEquals (Correct answer)
- concordion:assertTrue
- concordion:verify
- concordion:check
Correct answer: concordion:assertEquals
concordion:assertEquals='greeting()' on an element whose text is 'Hello World' verifies the method returns that string.
Question 3: What does the concordion:run command do?
- Runs another Concordion specification as a sub-test (Correct answer)
- Runs a shell command
- Executes a SQL query
- Launches a new JVM
Correct answer: Runs another Concordion specification as a sub-test
concordion:run allows one specification to include and run another specification, enabling hierarchical test suites.
Question 4: How do you pass a variable captured with concordion:set into a fixture method?
- Reference #variableName in the expression (Correct answer)
- Use a Java field injection
- Annotate the method parameter with @Set
- Declare it in the HTML head
Correct answer: Reference #variableName in the expression
Variables set with concordion:set are referenced using the # prefix (e.g., #name) within other concordion: expressions.
Question 5: Which command would you use to assert that a method returns false?
- concordion:assertFalse (Correct answer)
- concordion:assertEquals='false'
- concordion:assertTrue negated
- concordion:verify='!true'
Correct answer: concordion:assertFalse
concordion:assertFalse evaluates the expression and passes only when the result is boolean false.
Question 6: When concordion:execute is placed on a <table> element, what does it iterate over?
- Each <tr> row in the table body (Correct answer)
- Each <td> cell
- Each <th> header
- The entire table once
Correct answer: Each <tr> row in the table body
Placing concordion:execute on a table causes Concordion to iterate over each body row, running the expression once per row.
Which XML namespace prefix is used for all Concordion commands in an HTML specification?