mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-22 01:25:38 -05:00
* add an extension for integration tests * setup ads before running test * test setup * test cases * bash script * shorter temp folder name * code cleanup * add commented out original code * fix test error * test result path * rename results file * change file path * report smoke test results * test stablize * test stablization and configurable test servers * fix smoke test error * connection provider * simplify the integration test script * add comment * fix tslint error * address PR comments * add temp log to check whether the environment variable is already set * remove temp log * move api definition to testapi typing file * exclude integration tests extension * address comments
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
import * as vscode from 'vscode';
|
|
import { context } from './testContext';
|
|
|
|
const path = require('path');
|
|
const testRunner = require('vscode/lib/testrunner');
|
|
|
|
const suite = 'Integration Tests';
|
|
|
|
const options: any = {
|
|
ui: 'tdd',
|
|
useColors: true,
|
|
timeout: 600000
|
|
};
|
|
|
|
if (process.env.BUILD_ARTIFACTSTAGINGDIRECTORY) {
|
|
options.reporter = 'mocha-multi-reporters';
|
|
options.reporterOptions = {
|
|
reporterEnabled: 'spec, mocha-junit-reporter',
|
|
mochaJunitReporterReporterOptions: {
|
|
testsuitesTitle: `${suite} ${process.platform}`,
|
|
mochaFile: path.join(process.env.BUILD_ARTIFACTSTAGINGDIRECTORY, `test-results/${process.platform}-${suite.toLowerCase().replace(/[^\w]/g, '-')}-results.xml`)
|
|
}
|
|
};
|
|
}
|
|
|
|
if (!vscode.workspace.getConfiguration('test')['testSetupCompleted']) {
|
|
context.RunTest = false;
|
|
}
|
|
|
|
testRunner.configure(options);
|
|
|
|
export = testRunner;
|