BT

Intern 2.1 Brings New HTML and JUnit reporters

| by James Chesters Follow 2 Followers on Sep 23, 2014. Estimated reading time: 2 minutes |

SitePen has released version 2.1 of Intern, its next generation JavaScript testing stack. The new release brings with it new HTML and JUnit reporters, grep and skip functions, and improved performance.

Intern is described by SitePen on the project's GitHub wiki as "a complete test stack for JavaScript" and says its purpose is to help developers "write and run consistent, high-quality test cases" for JavaScript libraries and applications.

Colin Snover, senior software engineer for SitePen, listed the improvements with Intern's latest release including:

  • New HTML and JUnit reporters
  • New test filtering with grep and skip
  • Improved functional test performance
  • Improved proxy performance and functionality

In the article "Intern 2.1 Released" Jason Cheatham, a software engineer with SitePen, describes the HTML and JUnit reporters:

The HTML reporter is a new default reporter for Intern’s browser client runner (client.html). It displays at the end of a test run, summarizing the test results and presenting them in an easy-to-read format.

The output of the JUnit reporter, on the other hand, is meant for machine consumption. It aggregates test results and outputs them in a report.xml file that follows generally accepted standards for JUnit-compatible XML. This makes it much easier to plug Intern into tools that accept JUnit reports, like Jenkins.

Using a continuous integration server, such as Jenkins, the new JUnit XML reporter enables test drill-down via the GUI.

The new Intern release also provides new command line arguments, functionalSuites and grep, and a new test skipping functionality.

While Cheatham says "the functionalSuites argument works just like the existing suites argument", the grep argument allows the user filter test IDs using a regular expression.

Cheatham elaborates on this improvement, saying that when a test is filtered by grep, Intern skips it and reports it as skipped:

Test writers can also programmatically skip tests using the new skip function. A test can call this.skip() at any time to halt execution and move to the next test. The skip message will be reported by all built-in reporters, as well as any custom reporters that listen for the new /test/skip message.

Snover notes that by bypassing the unit test system entirely if there are only functional tests, the test function improves the performance of server-side app testing "and allows functional tests to be executed even when the instrumenting proxy is inaccessible."

Intern 2.1 also features some backwards-incompatible changes, these include an update to the remote.moveMouseTo command. In version 2.0 this command was broken, moving the mouse globally instead of relative to the last found element. This regression has been fixed in the latest version, meaning that the function now works again in the same was as it previously did with Intern 1.x.

The Intern 2.1 announcement was received well by the JavaScript community, although the official announcement from SitePen drew little in the way of in depth comments on either Facebook or Twitter.

Intern is available under the terms of the New BSD License. It is an Open Source project and welcomes contributions from the community. More information on the content licence agreement can be found here.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Do you not have spell-check? by Andy Newman

"moveing the mouse"
"Anotherbackwards-incompatible"
" the breakcingReporting"

Re: Do you not have spell-check? by James Chesters

Thanks for noticing, Andy -- these are now fixed. As is my spell check.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

2 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT