Hello everyone
i am writting this because i am at a junction in my project. I am trying to setup karma using maven plugin, and at one point i am stuck, here is my karma.conf
/*
* ---Begin Copyright Notice--- Sep 20, 2013
*
* NOTICE
*
* THIS SOFTWARE IS THE PROPERTY OF AND CONTAINS CONFIDENTIAL INFORMATION OF
* INFOR AND/OR ITS AFFILIATES OR SUBSIDIARIES AND SHALL NOT BE DISCLOSED
* WITHOUT PRIOR WRITTEN PERMISSION. LICENSED CUSTOMERS MAY COPY AND ADAPT THIS
* SOFTWARE FOR THEIR OWN USE IN ACCORDANCE WITH THE TERMS OF THEIR SOFTWARE
* LICENSE AGREEMENT. ALL OTHER RIGHTS RESERVED.
*
* (c) COPYRIGHT 2013 INFOR. ALL RIGHTS RESERVED. THE WORD AND DESIGN MARKS SET
* FORTH HEREIN ARE TRADEMARKS AND/OR REGISTERED TRADEMARKS OF INFOR AND/OR ITS
* AFFILIATES AND SUBSIDIARIES. ALL RIGHTS RESERVED. ALL OTHER TRADEMARKS LISTED
* HEREIN ARE THE PROPERTY OF THEIR RESPECTIVE OWNERS.
*
* ---End Copyright Notice---
*/
preprocessors = {
// ...
'js/*.js': 'coverage' // (1)
};
coverageReporter = {// (2)
type: 'html',
dir: 'target/karma-coverage'
};
module.exports = function(config) {
config.set({
basePath: '../',
// Fix for "JASMINE is not supported anymore" warning
frameworks: ["jasmine"],
reporters: ['dots', 'coverage','progress', 'junit'],
files: [
'../main/webapp/resources/lib/google/angular.js',
'../main/webapp/resources/lib/google/angular-*.js',
'../main/webapp/resources/lib/google/angular.min.js',
'../main/webapp/resources/js/imam.js',
'../main/webapp/resources/js/filters.js',
'../main/webapp/resources/js/directives/*.js',
'../main/webapp/resources/js/controllers/*.js',
'../main/webapp/resources/lib/jquery/*.js',
'../main/webapp/resources/lib/infor/*.js',
'../main/webapp/resources/lib/localize/*.js',
'../main/webapp/resources/i18n/*.js',
'../main/webapp/resources/js/services/*.js',
'../main/webapp/resources/js/partials/*.js',
],
plugins: [
'karma-jasmine',
'karma-coverage',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-phantomjs-launcher',
],
colors: false,
autoWatch: true,
browsers: ['PhantomJS'],
junitReporter: {
outputFile: 'test_out/unit.xml',
suite: 'unit'
//...
}
});
}
so far everything seams ok, and in the console i get this:
cmd /C karma start E:\Work\projects\Motion\source\infor.motion.ims.imam_2.0\src\test\resources\karma.conf.js --single-run
WARN [reporter]: Can not load "junit", it is not registered!
Perhaps you are missing some plugin?
WARN [karma]: Port 9876 in use
INFO [karma]: Karma v0.10.2 server started at
http://localhost:9877/INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.2 (Windows 7)]: Connected on socket 7mj_3NYr62_jyOOIXncT
PhantomJS 1.9.2 (Windows 7): Executed 0 of 0 ERROR (0.207 secs / 0 secs)
PhantomJS 1.9.2 (Windows 7): Executed 0 of 0 ERROR (0.207 secs / 0 secs)
but the result of the build process is that is fails, i used the -e parameter in maven, and i get this
[ERROR] Failed to execute goal com.kelveden:maven-karma-plugin:1.3:start (default-cli) on project infor.motion.ims.imam_2.0: There were Karma test failures. -> [Help 1]
really trying to figure out this, but getting to a dead-end. Thank you in advance and thank you for you help.
Best Regards
Ruben Fragoso