Code refactoring for extension testing (#10529)

* Setting up tests on import extension

* -Added API wrappers for all the azdata and vscode APIs to make them easily mockable
-Added some unit tests for the import extension
-Some code logic separations

* -added code report for the import extension in ci

* Did some more code refractoring

* -Added json report generation

* updated vscodetestcoverage to latest version in import extension.

* -remove duplicate codecoverageConfig.json
This commit is contained in:
Aasim Khan
2020-06-16 13:24:48 -07:00
committed by GitHub
parent 94bc0d9559
commit f725ee96b9
22 changed files with 1356 additions and 231 deletions

View File

@@ -22,6 +22,7 @@ if "%INTEGRATION_TEST_ELECTRON_PATH%"=="" (
call yarn gulp compile-extension:azurecore
call yarn gulp compile-extension:cms
call yarn gulp compile-extension:dacpac
call yarn gulp compile-extension:import
call yarn gulp compile-extension:schema-compare
call yarn gulp compile-extension:mssql
call yarn gulp compile-extension:notebook
@@ -66,6 +67,11 @@ echo *** starting dacpac tests ***
echo *****************************
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\dacpac --extensionTestsPath=%~dp0\..\extensions\dacpac\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222 --disable-telemetry --disable-crash-reporter --disable-updates --nogpu
echo *****************************
echo *** starting import tests ***
echo *****************************
call "%INTEGRATION_TEST_ELECTRON_PATH%" --extensionDevelopmentPath=%~dp0\..\extensions\import --extensionTestsPath=%~dp0\..\extensions\import\out\test --user-data-dir=%VSCODEUSERDATADIR% --extensions-dir=%VSCODEEXTENSIONSDIR% --remote-debugging-port=9222 --disable-telemetry --disable-crash-reporter --disable-updates --nogpu
echo *************************************
echo *** starting schema compare tests ***
echo *************************************

View File

@@ -15,6 +15,7 @@ const extensionList = [
'azurecore',
'cms',
'dacpac',
'import',
'schema-compare',
//'mssql',
'notebook',

View File

@@ -64,6 +64,11 @@ echo *** starting dacpac tests ***
echo *****************************
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_NO_SANDBOX --extensionDevelopmentPath=$ROOT/extensions/dacpac --extensionTestsPath=$ROOT/extensions/dacpac/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR --disable-telemetry --disable-crash-reporter --disable-updates --nogpu
echo *****************************
echo *** starting import tests ***
echo *****************************
"$INTEGRATION_TEST_ELECTRON_PATH" $LINUX_NO_SANDBOX --extensionDevelopmentPath=$ROOT/extensions/import --extensionTestsPath=$ROOT/extensions/import/out/test --user-data-dir=$VSCODEUSERDATADIR --extensions-dir=$VSCODEEXTDIR --disable-telemetry --disable-crash-reporter --disable-updates --nogpu
echo *************************************
echo *** starting schema compare tests ***
echo *************************************