Hello!
I am updating
clj-concordion from using the deprecated JUnit3 style (i.e. FixtureRunner.run(fixture)) to the new, per-example run style of JUnit 4 (i.e. multiple FixtureRunner.run(exapmleName, fixture)). The tests run, the output in the terminal as as expected, but the generated HTML files do not show the results (i.e. green/red backround). Before it worked OK. Where should I start looking?
It is quite possible I forgot something, the junit4-style integration is much more complex, I have to relate to more Concordion classes, and remember to do some low-level stuff such as calling runResultsCache.startFixtureRun(fixtureType, concordion.getSpecificationDescription). (If anybody is interested, I can provide feedback on the API and suggestions. I strongly preferred the junit3 style where I essentially only needed to copy the 5 lines from ConcordionTestCase).
This is the terminal output, the latter .html is attached below:
file:///var/folders/kg/r_8ytg7x521cvlmz_47t2rgc0000gn/T/concordion/math/algebra/Addition.html
Successes: 2, Failures: 0
file:///var/folders/kg/r_8ytg7x521cvlmz_47t2rgc0000gn/T/concordion/math/Algebra.html
Successes: 4, Failures: 0
Here is the most important part of my code. It is Clojure but you can read it - just move opening parenthese right and swap the first two elements, "text".toUpperCase() <=> (.toUpperCase "text") :-)
(try
(do
(.setupForRun fixture (.getFixtureObject fixture))
(when suite? (.beforeSuite fixture))
(.startFixtureRun runResultsCache ftype (.getSpecificationDescription concordion))
(.beforeSpecification fixture)
(run-fixture-examples fixture)) ;; SEE BELOW - run and cache results
(doto (cached-spec-result fixture)
(print-result ftype))
(finally
(.afterSpecification fixture)
(.finish concordion)
(when suite? (.afterSuite fixture)))
----
Core of run-fixture-examples:
(for [example examples]
(try
(.beforeExample fixture example)
(doto (.run runner example fixture)
(.assertIsSatisfied ftype))
(finally
(.afterExample fixture example))))
Can you spot whether I missed anything important, that would cause Concordion to run the tests but not make results visible in the generated HTML files? Is there some "writeResultsToGeneratedHtmlFiles" call I missed?
Thank you! /Jakub