Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My feature #20

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ pipeline {
stages {
stage('Run Static Code Analysis') {
steps {
sh "npm install"
sh 'npm install'
sh 'npm run lint'
}
}
stage('Run Unit Tests') {
steps {
echo 'npm run test-single-run'
sauce('e16593fe-6899-463b-9595-e5ba5eb46563') {
sh 'npm run test-single-run'
}
}
}
stage('Deploy Application') {
Expand All @@ -21,7 +23,9 @@ pipeline {
stage('Run Functional Tests') {
steps {
sauce('e16593fe-6899-463b-9595-e5ba5eb46563') {
sauceconnect(options: '', sauceConnectPath: '') {
sh 'npm run protractor'
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions e2e-tests/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports.config = {
allScriptsTimeout: 11000,

specs: [
'scenarios.js'
'scenarios.spec.js'
],

onPrepare: function () {
Expand Down Expand Up @@ -39,7 +39,7 @@ exports.config = {
// 'browserName': 'chrome'
// },

baseUrl: 'http://localhost:7225/index.html',
baseUrl: "http://localhost:7225/index.html",

framework: 'jasmine',

Expand Down
72 changes: 58 additions & 14 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,45 @@
//jshint strict: false
module.exports = function(config) {

// Browsers to run on Sauce Labs
var customLaunchers = {
'SL_Chrome': {
base: 'SauceLabs',
browserName: 'chrome',
version: '48.0',
platform: 'Linux'
},
'SL_Firefox': {
base: 'SauceLabs',
browserName: 'firefox',
version: '50.0',
platform: 'Windows 10'
},
'SL_InternetExplorer': {
base: 'SauceLabs',
browserName: 'internet explorer',
version: '11.0',
platform: 'Windows 7'
},
'SL_Safari': {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.11',
version: '10.0'
}
};

config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: './app',


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],


// list of files / patterns to load in the browser
files: [
'bower_components/angular/angular.js',
'bower_components/angular-route/angular-route.js',
Expand All @@ -12,23 +48,31 @@ module.exports = function(config) {
'view*/**/*.js'
],

autoWatch: true,

frameworks: ['jasmine'],
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['dots', 'saucelabs'],

browsers: ['Chrome'],

plugins: [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine',
'karma-junit-reporter'
],
// web server port
port: 9876,

junitReporter: {
outputFile: 'test_out/unit.xml',
suite: 'unit'
}
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_INFO,

sauceLabs: {
testName: 'Karma and Sauce Labs demo',
},
captureTimeout: 120000,
customLaunchers: customLaunchers,

// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: Object.keys(customLaunchers),
singleRun: true
});
};
Loading