Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.0.0 to 4.1.3. - [Release notes](https://github.com/salesforce/tough-cookie/releases) - [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md) - [Commits](https://github.com/salesforce/tough-cookie/compare/v4.0.0...v4.1.3) --- updated-dependencies: - dependency-name: tough-cookie dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Integration tests
This extension is for running tests against specific features that require a connection to an actual server.
Unit tests that don't require this should be added as tests to the extensions or core directly.
Tests that require user interaction should be added to the smoke tests - see https://github.com/microsoft/azuredatastudio/blob/main/test/smoke/README.md for more information.
Folders
extensionInstallersfolder: VSIX packages of non-builtin extensions should be put here for the tests to run with, they will be installed upon startup of the tests.src/testfolder: This is where the test files for features should be added, name the file like this:feature.test.tse.g.objectExplorer.test.ts
How to run the test
When these tests are ran, Azure Data Studio will be launched using new temp folders for installed extensions and data so that your local dev environment won't be changed.
-
In the build pipeline: The integration test suite has been added to ADS windows pipeline to run the test and report the results, you can find the test results under the test tab.
-
Local environment:
- Install Azure CLI
- Close all currently active VS Code windows
- Open a terminal window/command line window
- Run
az loginto login with your Microsoft AAD account. - Navigate to this folder and then run
node setEnvironmentVariables.js, there are different options, by default VS Code will be opened.- Terminal(Mac)/CMD(Windows):
node setEnvironmentVariables.js Terminal - Git-Bash on Windows:
node setEnvironmentVariables.js BashWin
- Terminal(Mac)/CMD(Windows):
- A new window will be opened based on your selection and the new window will have the required environment variables set.
- In the new window navigate to the scripts folder and run sql-test-integration.[bat|sh]
Skipping Python Installation Tests
The integration tests contain some tests that test the Python installation for Notebooks. This can take a long time to run and so if you do not need to run them you can skip them by setting the SKIP_PYTHON_INSTALL_TEST environment variable to 1
How to debug the tests
- Set the debug target to
Attach to Extension Host - Run the script to start the tests
- Wait for the Window to reload (it does this after installing and activating the extensions)
- Run the debug target - it should now attach to the Extension Host process and hit breakpoints set in the integration tests
Code Coverage
Code coverage is enabled by default. After running the tests you can find the results in the coverage folder at the root of this extension.
This code coverage covers extension code only - it will not instrument code from the core.