Closed tcjcodes closed 7 years ago
Below is the logs:
Running "karma:dist:run" (karma) task
##teamcity[enteredTheMatrix]
##teamcity[testSuiteStarted nodeId='1' parentNodeId='0' name='karma.conf.js' nodeType='config' locationHint='config://C:\Development\test-toolkit\karma.conf.js']
##teamcity[testSuiteStarted nodeId='2' parentNodeId='1' name='PhantomJS 2.1.1 (Windows 7 0.0.0)' nodeType='browser']
##teamcity[testCount count='14']
**< omitting the tests here >**
##teamcity[testFinished nodeId='18' duration='1']
##teamcity[testSuiteFinished nodeId='4']
##teamcity[testSuiteFinished nodeId='3']
##teamcity[testSuiteFinished nodeId='2']
##teamcity[testSuiteFinished nodeId='1']
Hmm, this is no longer happening. I'm not sure what happened?
This is my new config:
// Karma configuration
// Generated on Mon Feb 20 2017 10:12:14 GMT-0800 (Pacific Standard Time)
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'node_modules/angular/angular.js',
'node_modules/angular-sanitize/angular-sanitize.js',
'node_modules/angular-mocks/angular-mocks.js',
'src/**/*.spec.js',
'src/**/*.js',
],
// list of files to exclude
exclude: [],
// plugins to extend karma functionality
plugins: [
require('karma-jasmine'),
require('karma-ie-launcher'),
require('karma-chrome-launcher'),
require('karma-phantomjs-launcher'),
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_WARN,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}
Gruntfile.js
karma: {
options: {
configFile: 'karma.conf.js',
},
dist: {
background: true, // work with watch task
}
},
watch: {
scripts: {
files: [
'src/**/*.js',
],
tasks: ['karma', 'uglify']
},
}
});
Just figured this mystery out myself. If you have spawned a Karma server through Intelij\Webstorm etc. then the server is configured with the TeamCity reporter. Spawn your own server and you get the reporter you specified.
Hi, I'm new at test runners. I'm getting teamcity reporter logs even though I don't have it installed. I think it's a grunt-karma problem because they only show up when I run
grunt karma:dist:run
and notkarma start
or on my IntelliJ IDEA tasks (via IntelliJ Karma plugin). I only have 7 tests right now and the teamcity reporter kind of clogs up the terminal window.Gruntfile.js code:
karma.conf.js:
Dev Dependencies:
Running
npm list
on the teamcity dependencies also shows no teamcity packages are installed.