@@ -24,7 +24,6 @@ import {
2424 TensorBoardSessionStartResult ,
2525 TensorBoardEntrypoint ,
2626} from '../tensorBoard/constants' ;
27- import { TestProvider } from '../testing/types' ;
2827import { EventName , PlatformErrors } from './constants' ;
2928import type { LinterTrigger , TestTool } from './types' ;
3029import { JupyterNotInstalledOrigin } from '../jupyter/types' ;
@@ -1507,65 +1506,53 @@ export interface IEventNamePropertyMapping {
15071506 interpreterType ?: EnvironmentType ;
15081507 } ;
15091508 /**
1510- * Telemetry event sent with details about discovering tests
1509+ * Telemetry event sent indicating the trigger source for discovery.
15111510 */
1512- [ EventName . UNITTEST_DISCOVER ] : {
1513- /**
1514- * The test framework used to discover tests
1515- *
1516- * @type {TestTool }
1517- */
1518- tool : TestTool ;
1511+ [ EventName . UNITTEST_DISCOVERY_TRIGGER ] : {
15191512 /**
15201513 * Carries the source which triggered discovering of tests
15211514 *
1522- * @type {('ui' | 'commandpalette') }
1515+ * @type {('auto' | 'ui' | 'commandpalette' | 'watching' | 'interpreter') }
1516+ * auto : Triggered by VS Code editor.
1517+ * ui : Triggered by clicking a button.
1518+ * commandpalette : Triggered by running the command from the command palette.
1519+ * watching : Triggered by filesystem or content changes.
1520+ * interpreter : Triggered by interpreter change.
15231521 */
1524- trigger : 'ui' | 'commandpalette' ;
1525- /**
1526- * Carries `true` if discovering tests failed, `false` otherwise
1527- *
1528- * @type {boolean }
1529- */
1530- failed : boolean ;
1522+ trigger : 'auto' | 'ui' | 'commandpalette' | 'watching' | 'interpreter' ;
15311523 } ;
15321524 /**
1533- * Telemetry event is sent if we are doing test discovery using python code
1534- */
1535- [ EventName . UNITTEST_DISCOVER_WITH_PYCODE ] : never | undefined ;
1536- /**
1537- * Telemetry event sent when user clicks a file, function, or suite in test explorer.
1525+ * Telemetry event sent with details about discovering tests
15381526 */
1539- [ EventName . UNITTEST_NAVIGATE ] : {
1527+ [ EventName . UNITTEST_DISCOVERING ] : {
15401528 /**
1541- * Carries `true` if user clicks a file, `false` otherwise
1542- *
1543- * @type {boolean }
1544- */
1545- byFile ?: boolean ;
1546- /**
1547- * Carries `true` if user clicks a function, `false` otherwise
1529+ * The test framework used to discover tests
15481530 *
1549- * @type {boolean }
1531+ * @type {TestTool }
15501532 */
1551- byFunction ?: boolean ;
1533+ tool : TestTool ;
1534+ } ;
1535+ /**
1536+ * Telemetry event sent with details about discovering tests
1537+ */
1538+ [ EventName . UNITTEST_DISCOVERY_DONE ] : {
15521539 /**
1553- * Carries `true` if user clicks a suite, `false` otherwise
1540+ * The test framework used to discover tests
15541541 *
1555- * @type {boolean }
1542+ * @type {TestTool }
15561543 */
1557- bySuite ?: boolean ;
1544+ tool : TestTool ;
15581545 /**
1559- * Carries `true` if we are changing focus to the suite/file/function , `false` otherwise
1546+ * Carries `true` if discovering tests failed , `false` otherwise
15601547 *
15611548 * @type {boolean }
15621549 */
1563- focusCode ? : boolean ;
1550+ failed : boolean ;
15641551 } ;
15651552 /**
1566- * Tracks number of workspace folders shown in test explorer
1553+ * Telemetry event sent when cancelling discovering tests
15671554 */
1568- [ EventName . UNITTEST_EXPLORER_WORK_SPACE_COUNT ] : { count : number } ;
1555+ [ EventName . UNITTEST_DISCOVERING_STOP ] : never | undefined ;
15691556 /**
15701557 * Telemetry event sent with details about running the tests, what is being run, what framework is being used etc.
15711558 */
@@ -1574,45 +1561,23 @@ export interface IEventNamePropertyMapping {
15741561 * Framework being used to run tests
15751562 */
15761563 tool : TestTool ;
1577- /**
1578- * Carries info what is being run
1579- */
1580- scope : 'currentFile' | 'all' | 'file' | 'class' | 'function' | 'failed' ;
15811564 /**
15821565 * Carries `true` if debugging, `false` otherwise
15831566 */
15841567 debugging : boolean ;
1585- /**
1586- * Carries what triggered the execution of the tests
1587- */
1588- triggerSource : 'ui' | 'codelens' | 'commandpalette' | 'auto' | 'testExplorer' ;
1589- /**
1590- * Carries `true` if running tests failed, `false` otherwise
1591- */
1592- failed : boolean ;
15931568 } ;
15941569 /**
1595- * Telemetry event sent when cancelling running or discovering tests
1570+ * Telemetry event sent when cancelling running tests
15961571 */
1597- [ EventName . UNITTEST_STOP ] : never | undefined ;
1572+ [ EventName . UNITTEST_RUN_STOP ] : never | undefined ;
15981573 /**
1599- * Telemetry event sent when disabling all test frameworks
1574+ * Telemetry event sent when run all failed test command is triggered
16001575 */
1601- [ EventName . UNITTEST_DISABLE ] : never | undefined ;
1576+ [ EventName . UNITTEST_RUN_ALL_FAILED ] : never | undefined ;
16021577 /**
1603- * Telemetry event sent when viewing Python test log output
1604- */
1605- [ EventName . UNITTEST_VIEW_OUTPUT ] : never | undefined ;
1606- /**
1607- * Tracks which testing framework has been enabled by the user.
1608- * Telemetry is sent when settings have been modified by the user.
1609- * Values sent include:
1610- * unittest - If this value is `true`, then unittest has been enabled by the user.
1611- * pytest - If this value is `true`, then pytest has been enabled by the user.
1612- * @type {(never | undefined) }
1613- * @memberof IEventNamePropertyMapping
1578+ * Telemetry event sent when testing is disabled for a workspace.
16141579 */
1615- [ EventName . UNITTEST_ENABLED ] : Partial < Record < TestProvider , undefined | boolean > > ;
1580+ [ EventName . UNITTEST_DISABLED ] : never | undefined ;
16161581 /**
16171582 * Telemetry sent when building workspace symbols
16181583 */
0 commit comments