Concordion Concordion Fundamentals 2 — Questions and Answers
Question 1: What does the concordion:assertEquals command do?
- Checks that an expression matches the element text (Correct answer)
- Sets a variable value
- Executes a method and discards the result
- Iterates over a collection
Correct answer: Checks that an expression matches the element text
concordion:assertEquals evaluates a fixture expression and compares the result to the text content of the HTML element.
Question 2: What colour does Concordion use to highlight a passing test element in the output report?
- Green (Correct answer)
- Blue
- Yellow
- Orange
Correct answer: Green
Concordion colours passing assertions green in the rendered HTML output report.
Question 3: Which Concordion command is used to set a fixture variable from an HTML element's text?
- concordion:set (Correct answer)
- concordion:assertEquals
- concordion:execute
- concordion:run
Correct answer: concordion:set
concordion:set assigns the element's text content to a named variable for use in subsequent commands.
Question 4: What does the concordion:execute command do?
- Calls a fixture method without checking a return value (Correct answer)
- Asserts equality
- Sets a variable
- Iterates a table
Correct answer: Calls a fixture method without checking a return value
concordion:execute invokes a fixture method for its side effects without asserting the return value against element text.
Question 5: Which command does Concordion use to iterate over rows in an HTML table?
- concordion:forEach
- concordion:each
- concordion:execute on <tr> (Correct answer)
- concordion:repeat
Correct answer: concordion:execute on <tr>
Placing concordion:execute on a <tr> element tells Concordion to iterate over each table row as a separate test case.
Question 6: How does Concordion indicate a failing assertion in the HTML report?
- Red background with expected and actual values (Correct answer)
- Blue text
- Strikethrough on the element
- A warning icon only
Correct answer: Red background with expected and actual values
Failed assertions are highlighted red and show both the expected value from the spec and the actual value from the fixture.
What does the concordion:assertEquals command do?