Skip to content
frawa edited this page May 2, 2012 · 13 revisions

Welcome to the TestCodeMirror2 wiki!

TestCodeMirror2 is adding more intensive testing to CodeMirror2. Find details on the project's backlog.

Test are based on js-test-driver framework. The latest version 1.3.4.b is not (yet) available from a public maven repository, you will need to download and install in your local repository:

  mvn install:install-file -DgroupId=com.google.jstestdriver -DartifactId=jstestdriver -Dpackaging=jar -Dversion=1.3.4.b -Dfile=JsTestDriver-1.3.4.b.jar -DgeneratePom=true 
  mvn install:install-file -DgroupId=com.google.jstestdriver -DartifactId=coverage -Dpackaging=jar -Dversion=1.3.4.b -Dfile=coverage-1.3.4.b.jar -DgeneratePom=true 

To launch your the tests use

mvn test
mvn test -P firefox
mvn test -P chrome
mvn test -P iexplorer
mvn test -P all

Your .m2/settings.xml file need to bring some additional information

  • For js-test-driver, see here.

  • For TestCodeMirror2 to find your browsers

<properties>
  <ChromePath>C:\Users\IBM_ADMIN\AppData\Local\Google\Chrome\Application\chrome.exe</ChromePath>
  <FirefoxPath>C:\Program Files (x86)\Mozilla Firefox\firefox.exe</FirefoxPath>
  <InternetExplorerPath>C:\Program Files (x86)\Internet Explorer\iexplore.exe</InternetExplorerPath>
</properties>

Coverage

To generate the test coverage report use

mvn integration-test -P coverage
mvn integration-test -P coverage,chrome
mvn integration-test -P coverage,firefox
mvn integration-test -P coverage,iexplorer
mvn integration-test -P coverage,all

You will need to have perl on your system and help TestCodeMirror2 find genhtml in lvoc, in your .m2/settings.xml:

  <GenHtmlPath>...\lcov-1.9\bin\genhtml</GenHtmlPath>

Clone this wiki locally