Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onPrepare: () => {
let jasmineReporters = require('jasmine-reporters');
let junitReporter = new jasmineReporters.JUnitXmlReporter({
// setup the output path for the junit reports
savePath: 'output/',
// conslidate all true:
// output/junitresults.xml
//
// conslidate all set to false:
// output/junitresults-example1.xml
// output/junitresults-example2.xml
consolidateAll: false
});
jasmine.getEnv().addReporter(junitReporter);
require('ts-node').register({
project: 'e2e'
try {
reporter = jasmineRunner.addReporter(reporter, onComplete);
enabledReporters.push(reporter.name);
} catch (error) {
grunt.log.error(error);
}
}
// BUILT-IN REPORTERS
// additional Jasmine reporters
// https://github.com/larrymyers/jasmine-reporters
var reporter;
// Reporters that only write to a file:
if (ropts.junit) {
reporter = new reporters.JUnitXmlReporter(ropts.junit);
reporter.name = 'JUnit XML Reporter';
addReporter(reporter);
}
if (ropts.nunit) {
reporter = new reporters.NUnitXmlReporter(ropts.nunit);
reporter.name = 'NUnit XML Reporter';
addReporter(reporter);
}
// We will not allow reporters producing command-line output to run at
// the same time, to prevent puzzled outputs.
var conflict = Boolean(ropts.console);
if (!conflict && ropts.terminal) {
conflict = true;
reporter = new reporters.TerminalReporter(ropts.terminal);
reporter.name = 'Terminal Reporter';
onPrepare: function () {
const jasmineReporters = require('jasmine-reporters')
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
savePath: 'build/reports/e2e_results'
}))
// Get all banners out of the way
browser.get('/#')
const expiry = new Date()
expiry.setFullYear(expiry.getFullYear() + 1)
browser.manage().addCookie({ name: 'cookieconsent_status', value: 'dismiss', expiry })
browser.manage().addCookie({ name: 'welcomebanner_status', value: 'dismiss', expiry })
// Ensure score board shows all challenges (by default only 1-star challenges are shown)
browser.get('/#/score-board')
element(by.id('btnToggleAllDifficulties')).click()
}
}
import Jasmine from 'jasmine';
import jasmineReporters from 'jasmine-reporters';
var jasmine = new Jasmine();
var junitReporter = new jasmineReporters.JUnitXmlReporter({
savePath: 'target/junit-report',
consolidateAll: false
});
jasmine.loadConfigFile('test/spec/support/jasmine.json');
jasmine.addReporter(junitReporter);
jasmine.execute();
jasmine = new Jasmine(),
SpecReporter = require('jasmine-spec-reporter'),
jasmineReporters = require('jasmine-reporters');
jasmine.loadConfigFile('spec/support/jasmine_server.json');
jasmine.onComplete(function(passed) {
if (passed) {
console.log('All specs have passed');
} else {
console.log('At least one spec has failed');
}
});
jasmine.addReporter(new SpecReporter());
jasmine.addReporter(new jasmineReporters.JUnitXmlReporter({
savePath: './reports/',
filePrefix: 'server'
}));
jasmine.execute();
onPrepare: function() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
//HTML report
jasmine.getEnv().addReporter(new Jasmine2HtmlReporter({
//takeScreenshots: true,
//takeScreenshotsOnlyOnFailures: true,
//fixedScreenshotName: true,
consolidateAll: true,
savePath: './e2e/reports/',
filePrefix: 'html-report'
}));
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
savePath: './e2e/reports',
filePrefix: 'xmlresults'
}))
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
},
const reporters = require('jasmine-reporters');
const path = require('path');
const savePath = path.resolve(__dirname, '..', '..', '..', 'results', 'javascript-tests');
const reporter = new reporters.JUnitXmlReporter({ savePath: savePath, consolidateAll: false, filePrefix: 'javascript-' });
jasmine
.getEnv()
.addReporter(reporter);
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const reporters = require('jasmine-reporters');
const reporter = new reporters.JUnitXmlReporter({
consolidateAll: false,
filePrefix: 'jest-junit-result-',
savePath: __dirname + '/target/surefire-reports/',
});
jasmine.getEnv().addReporter(reporter);
function setupJasmineXmlReporters() {
jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
consolidateAll: true,
savePath: './test-reports',
filePrefix: 'xmloutput'
}));
}
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
jasmine.getEnv().addReporter(new JasmineReporters.JUnitXmlReporter({
consolidateAll: false,
savePath: './reports/e2e',
filePrefix: '',
modifyReportFileName: (generatedFileName, suite) => 'test-results'
}));
}
};