File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -166,15 +166,24 @@ jobs:
166
166
subscription-id : ${{secrets.DEVOPS_SUB_ID}}
167
167
enable-AzPSSession : true
168
168
169
+ - name : Fetch test cases from Azure DevOps for scheduled runs
170
+ if : ${{ github.event.schedule == '0 17 * * *' }}
171
+ working-directory : packages/tests
172
+ env :
173
+ AZURE_DEVOPS_ORG_URL : " https://dev.azure.com/msazure/"
174
+ AZURE_DEVOPS_PROJECT : " Microsoft Teams Extensibility"
175
+ AZURE_DEVOPS_TEST_PLAN_ID : " 33256964"
176
+ run : npx ts-node ./scripts/fetch-test-plan-test-cases.ts vscuse/agent_cases true
177
+
169
178
- name : Fetch test cases from Azure DevOps
179
+ if : ${{ github.event_name == 'workflow_dispatch' }}
170
180
working-directory : packages/tests
171
181
env :
172
182
AZURE_DEVOPS_ORG_URL : " https://dev.azure.com/msazure/"
173
183
AZURE_DEVOPS_PROJECT : " Microsoft Teams Extensibility"
174
184
AZURE_DEVOPS_TEST_PLAN_ID : " 33256964"
175
185
run : npx ts-node ./scripts/fetch-test-plan-test-cases.ts vscuse/agent_cases
176
186
177
-
178
187
- name : Generate file list
179
188
shell : pwsh
180
189
run : |
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import * as fs from "fs";
6
6
import * as path from "path" ;
7
7
8
8
const outputDir = process . argv [ 2 ] ;
9
+ const onlyTestAutomatedCases = process . argv [ 3 ] ;
9
10
if ( ! outputDir ) {
10
11
console . error ( "Please provide an output directory as the first argument." ) ;
11
12
process . exit ( 1 ) ;
@@ -83,6 +84,19 @@ async function run() {
83
84
} ;
84
85
const workItem = ( await response . json ( ) ) as WorkItem ;
85
86
87
+ // Get the automation status of the work item
88
+ // If onlyTestAutomatedCases is true, skip test cases that are not automated
89
+ const automationStatus =
90
+ workItem . fields ?. [ "Microsoft.VSTS.TCM.AutomationStatus" ] ;
91
+ if ( onlyTestAutomatedCases && onlyTestAutomatedCases === "true" ) {
92
+ if ( automationStatus !== "Planned" ) {
93
+ console . log (
94
+ `Skipping test case ${ tc . testCase . id } as it is not automated.`
95
+ ) ;
96
+ continue ; // Skip non-automated test cases
97
+ }
98
+ }
99
+
86
100
// The content fianlly to write into the file
87
101
const outputLines : string [ ] = [ ] ;
88
102
You can’t perform that action at this time.
0 commit comments