mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 18:22:34 -05:00
Alanren/integration test (#3657)
* 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
This commit is contained in:
19
test/smoke/src/sql/profiler/profiler.test.ts
Normal file
19
test/smoke/src/sql/profiler/profiler.test.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application } from '../../application';
|
||||
import { getDefaultTestingServer } from '../testConfig';
|
||||
|
||||
export function setup() {
|
||||
describe('profiler test suite', () => {
|
||||
it('Launch profiler test', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.profiler.launchProfiler();
|
||||
await app.workbench.connectionDialog.waitForConnectionDialog();
|
||||
await app.workbench.connectionDialog.connect(await getDefaultTestingServer());
|
||||
await app.workbench.profiler.waitForNewSessionDialogAndStart();
|
||||
});
|
||||
});
|
||||
}
|
||||
28
test/smoke/src/sql/profiler/profiler.ts
Normal file
28
test/smoke/src/sql/profiler/profiler.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { QuickOpen } from '../../areas/quickopen/quickopen';
|
||||
import { waitForNewDialog, clickDialogButton } from '../sqlutils';
|
||||
|
||||
const NEW_SESSION_DIALOG_TITLE: string = 'Start New Profiler Session';
|
||||
|
||||
export class Profiler {
|
||||
|
||||
constructor(private code: Code, private quickopen: QuickOpen) { }
|
||||
|
||||
async launchProfiler(): Promise<void> {
|
||||
await this.quickopen.runCommand('Profiler: Launch Profiler');
|
||||
}
|
||||
|
||||
async waitForNewSessionDialog() {
|
||||
await waitForNewDialog(this.code, NEW_SESSION_DIALOG_TITLE);
|
||||
}
|
||||
|
||||
async waitForNewSessionDialogAndStart() {
|
||||
await this.waitForNewSessionDialog();
|
||||
await clickDialogButton(this.code, 'Start');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user