Skip to content

Commit 5fadf2f

Browse files
roblourenspierceboggan
authored andcommitted
Make agent stests optional (#514)
* Make agent stests optional * And this * Marked as optional
1 parent 3afc0cb commit 5fadf2f

File tree

6 files changed

+28
-5
lines changed

6 files changed

+28
-5
lines changed

test/e2e/edit.stest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ import { IReadFileParamsV1 } from '../../src/extension/tools/node/readFileTool';
1111
import { deserializeWorkbenchState } from '../../src/platform/test/node/promptContextModel';
1212
import { ssuite, stest } from '../base/stest';
1313
import { generateToolTestRunner } from './toolSimTest';
14+
import { shouldSkipAgentTests } from './tools.stest';
1415

1516

16-
ssuite({ title: 'edit', subtitle: 'toolCalling', location: 'panel' }, () => {
17+
ssuite.optional(shouldSkipAgentTests, { title: 'edit', subtitle: 'toolCalling', location: 'panel' }, () => {
1718
const scenarioFolder = path.join(__dirname, '..', 'test/scenarios/test-tools');
1819
const getState = () => deserializeWorkbenchState(scenarioFolder, path.join(scenarioFolder, 'chatSetup.state.json'));
1920

test/e2e/fetchWebPageTool.stest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ import { ToolName } from '../../src/extension/tools/common/toolNames';
99
import { deserializeWorkbenchState } from '../../src/platform/test/node/promptContextModel';
1010
import { ssuite, stest } from '../base/stest';
1111
import { generateToolTestRunner } from './toolSimTest';
12+
import { shouldSkipAgentTests } from './tools.stest';
1213

1314
interface IFetchWebPageToolParams {
1415
urls: string[];
1516
query?: string;
1617
}
1718

18-
ssuite({ title: 'fetchWebPageTool', subtitle: 'toolCalling', location: 'panel' }, () => {
19+
ssuite.optional(shouldSkipAgentTests, { title: 'fetchWebPageTool', subtitle: 'toolCalling', location: 'panel' }, () => {
1920
const scenarioFolder = path.join(__dirname, '..', 'test/scenarios/test-tools');
2021
const getState = () => deserializeWorkbenchState(scenarioFolder, path.join(scenarioFolder, 'tools.state.json'));
2122

test/e2e/findFilesTool.stest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import { IFindFilesToolParams } from '../../src/extension/tools/node/findFilesTo
1010
import { deserializeWorkbenchState } from '../../src/platform/test/node/promptContextModel';
1111
import { ssuite, stest } from '../base/stest';
1212
import { generateToolTestRunner } from './toolSimTest';
13+
import { shouldSkipAgentTests } from './tools.stest';
1314

14-
ssuite({ title: 'findFilesTool', subtitle: 'toolCalling', location: 'panel' }, () => {
15+
ssuite.optional(shouldSkipAgentTests, { title: 'findFilesTool', subtitle: 'toolCalling', location: 'panel' }, () => {
1516
const scenarioFolder = path.join(__dirname, '..', 'test/scenarios/test-tools');
1617
const getState = () => deserializeWorkbenchState(scenarioFolder, path.join(scenarioFolder, 'tools.state.json'));
1718

test/e2e/notebookTools.stest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ import { getCellId } from '../../src/platform/notebook/common/helpers';
1010
import { deserializeWorkbenchState } from '../../src/platform/test/node/promptContextModel';
1111
import { ssuite, stest } from '../base/stest';
1212
import { generateToolTestRunner } from './toolSimTest';
13+
import { shouldSkipAgentTests } from './tools.stest';
1314

14-
ssuite({
15+
ssuite.optional(shouldSkipAgentTests, {
1516
title: 'notebooks', subtitle: 'toolCalling', location: 'panel', configurations: []
1617
}, (inputPath) => {
1718
const scenarioFolder = inputPath ?? path.join(__dirname, '..', 'test/scenarios/test-notebook-tools');

test/e2e/tools.stest.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ import path from 'path';
88
import { ssuite, stest } from '../base/stest';
99
import { fetchToolScenarios, generateToolTestRunner } from './toolSimTest';
1010

11-
ssuite({ title: 'toolCalling', location: 'panel' }, (inputPath) => {
11+
export function shouldSkipAgentTests(): boolean {
12+
return process.env.AGENT_TESTS !== '1';
13+
}
14+
15+
ssuite.optional(shouldSkipAgentTests, { title: 'toolCalling', location: 'panel' }, (inputPath) => {
1216
const scenarioFolder = inputPath ?? path.join(__dirname, '..', 'test/scenarios/test-tools');
1317
const scenarios = fetchToolScenarios(scenarioFolder);
1418

test/simulation/baseline.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,7 @@
939939
},
940940
{
941941
"name": "edit (toolCalling) [panel] - does not read",
942+
"optional": true,
942943
"contentFilterCount": 0,
943944
"passCount": 6,
944945
"failCount": 4,
@@ -1711,34 +1712,39 @@
17111712
},
17121713
{
17131714
"name": "fetchWebPageTool (toolCalling) [panel] - multiple URLs boundary test with 6 URLs",
1715+
"optional": true,
17141716
"contentFilterCount": 0,
17151717
"passCount": 0,
17161718
"failCount": 10,
17171719
"score": 0
17181720
},
17191721
{
17201722
"name": "fetchWebPageTool (toolCalling) [panel] - multiple URLs handling",
1723+
"optional": true,
17211724
"contentFilterCount": 0,
17221725
"passCount": 0,
17231726
"failCount": 10,
17241727
"score": 0
17251728
},
17261729
{
17271730
"name": "fetchWebPageTool (toolCalling) [panel] - proper URL validation and query handling",
1731+
"optional": true,
17281732
"contentFilterCount": 0,
17291733
"passCount": 0,
17301734
"failCount": 10,
17311735
"score": 0
17321736
},
17331737
{
17341738
"name": "fetchWebPageTool (toolCalling) [panel] - query parameter extraction",
1739+
"optional": true,
17351740
"contentFilterCount": 0,
17361741
"passCount": 0,
17371742
"failCount": 10,
17381743
"score": 0
17391744
},
17401745
{
17411746
"name": "findFilesTool (toolCalling) [panel] - proper glob patterns",
1747+
"optional": true,
17421748
"contentFilterCount": 0,
17431749
"passCount": 5,
17441750
"failCount": 5,
@@ -9487,48 +9493,55 @@
94879493
},
94889494
{
94899495
"name": "notebooks (toolCalling) [panel] - Edit cell tool",
9496+
"optional": true,
94909497
"contentFilterCount": 0,
94919498
"passCount": 0,
94929499
"failCount": 10,
94939500
"score": 0
94949501
},
94959502
{
94969503
"name": "notebooks (toolCalling) [panel] - New Notebook Tool with EditFile and EditNotebook",
9504+
"optional": true,
94979505
"contentFilterCount": 0,
94989506
"passCount": 0,
94999507
"failCount": 10,
95009508
"score": 0
95019509
},
95029510
{
95039511
"name": "notebooks (toolCalling) [panel] - New Notebook Tool without EditFile and with EditNotebook",
9512+
"optional": true,
95049513
"contentFilterCount": 0,
95059514
"passCount": 0,
95069515
"failCount": 10,
95079516
"score": 0
95089517
},
95099518
{
95109519
"name": "notebooks (toolCalling) [panel] - New Notebook Tool without EditFile and without EditNotebook",
9520+
"optional": true,
95119521
"contentFilterCount": 0,
95129522
"passCount": 0,
95139523
"failCount": 10,
95149524
"score": 0
95159525
},
95169526
{
95179527
"name": "notebooks (toolCalling) [panel] - Run cell at a specific index",
9528+
"optional": true,
95189529
"contentFilterCount": 0,
95199530
"passCount": 0,
95209531
"failCount": 10,
95219532
"score": 0
95229533
},
95239534
{
95249535
"name": "notebooks (toolCalling) [panel] - Run cell tool",
9536+
"optional": true,
95259537
"contentFilterCount": 0,
95269538
"passCount": 0,
95279539
"failCount": 10,
95289540
"score": 0
95299541
},
95309542
{
95319543
"name": "notebooks (toolCalling) [panel] - Run cell tool should avoid running markdown cells",
9544+
"optional": true,
95329545
"contentFilterCount": 0,
95339546
"passCount": 0,
95349547
"failCount": 10,
@@ -11825,13 +11838,15 @@
1182511838
},
1182611839
{
1182711840
"name": "toolCalling [panel] - find all phone numbers in markdown files in the codebase",
11841+
"optional": true,
1182811842
"contentFilterCount": 0,
1182911843
"passCount": 0,
1183011844
"failCount": 10,
1183111845
"score": 0
1183211846
},
1183311847
{
1183411848
"name": "toolCalling [panel] - I'm using git, create a new branch called issue-9876",
11849+
"optional": true,
1183511850
"contentFilterCount": 0,
1183611851
"passCount": 10,
1183711852
"failCount": 0,

0 commit comments

Comments
 (0)