Concordion Concordion Specifications 2 — Questions and Answers
Question 1: What is the recommended file extension for a Concordion specification?
- .html (Correct answer)
- .xml
- .txt
- .spec
Correct answer: .html
Concordion specifications use .html extension so they render naturally in browsers as readable documents.
Question 2: How does Concordion match a specification file to its fixture class?
- By class name and package path mirrored in the classpath (Correct answer)
- By a @SpecFile annotation
- By a properties configuration file
- By scanning all HTML files at startup
Correct answer: By class name and package path mirrored in the classpath
Concordion derives the spec path from the fixture class name and package, looking for a matching HTML file on the classpath.
Question 3: What is the benefit of writing Concordion specs in plain HTML rather than a custom DSL?
- Any browser can render them without special tools (Correct answer)
- They compile faster
- They are automatically unit-tested
- They require no classpath setup
Correct answer: Any browser can render them without special tools
Plain HTML specs can be opened in any browser, shared via email, or posted on a wiki without needing Concordion installed.
Question 4: What is a Concordion 'index' specification?
- A spec that uses concordion:run to link to and execute child specifications (Correct answer)
- The first test that always runs
- A spec that only contains assertions
- A spec that imports database fixtures
Correct answer: A spec that uses concordion:run to link to and execute child specifications
An index spec acts as a test suite entry point, using concordion:run links to execute a collection of child specifications.
Question 5: Can a Concordion specification contain regular HTML content alongside concordion: commands?
- Yes, non-annotated HTML is treated as descriptive prose (Correct answer)
- No, all elements must have concordion: attributes
- No, only concordion: elements are allowed
- Only if surrounded by special comment tags
Correct answer: Yes, non-annotated HTML is treated as descriptive prose
Most of a Concordion spec is ordinary prose HTML; only specific elements need concordion: attributes to drive the tests.
Question 6: What is the preferred approach for adding styling to Concordion HTML reports?
- CSS linked in the spec's <head> element (Correct answer)
- Inline styles on every element
- A separate XSLT transform
- The Concordion CSS configuration API
Correct answer: CSS linked in the spec's <head> element
Standard CSS stylesheets linked in the HTML <head> apply to both the authored spec and the generated report.
What is the recommended file extension for a Concordion specification?