Intern JS Testing not Publishing JUnit XML File?

Just another random issue I couldn’t find the answer to by googling and finally figured out.

Issue: You have used the Yeoman Dojo generator to init a dojo boilerplate project.

This generator includes the files necessary for using intern to do JS unit testing in your dojo AMD javascript.

You would like to integrate your results into a CI build, and need xml results in order to do that.

You follow the Intern user guide and put the following in the intern config file:

reporters: [
{ id: ‘JUnit’, filename: ‘report.xml’ }
]

You run grunt intern.

You get no report.xml.

You are sad and confused.

😦

Solution:

I suppose that Intern was updated after the yeoman generator was put together. If you look in “node_modules” you’ll see that it includes “intern-geezer”. Not “intern”. I do not know why this is. However, now you know what to do, uninstall “intern-geezer” and install “intern”.

in terminal, within the project folder :
“npm uninstall intern-geezer –save-dev”

then

“npm install intern –save-dev”

Then run your grunt intern task, and witness the new report.xml file created at the project root.

🙂

Advertisements