Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(template): python use binary test tool #13098

Merged
merged 5 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/fx-core/resource/yaml-schema/v1.8/yaml.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,10 @@
"symlinkDir": {
"type": "string",
"description": "The path of the symlink target for the folder containing Teams App Test Tool binaries."
},
"releaseType": {
"type": "string",
"description": "The release type of Teams App Test Tool: binary or npm. Default to 'npm'."
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions packages/fx-core/resource/yaml-schema/yaml.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"version": {
"type": "string",
"description": "The version of the yaml file schema",
"const": "v1.7"
"const": "v1.8"
},
"additionalMetadata": {
"type": "object",
Expand Down Expand Up @@ -1277,10 +1277,6 @@
"symlinkDir": {
"type": "string",
"description": "The path of the symlink target for the folder containing Azure Functions Core Tools binaries."
},
"releaseType": {
"type": "string",
"description": "The release type of Teams App Test Tool: binary or npm. Default to 'npm'."
}
}
},
Expand Down Expand Up @@ -1308,6 +1304,10 @@
"symlinkDir": {
"type": "string",
"description": "The path of the symlink target for the folder containing Teams App Test Tool binaries."
},
"releaseType": {
"type": "string",
"description": "The release type of Teams App Test Tool: binary or npm. Default to 'npm'."
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 4
},
"internalConsoleOptions": "neverOpen"
Expand All @@ -18,7 +18,7 @@
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 5
},
"internalConsoleOptions": "neverOpen"
Expand All @@ -29,7 +29,7 @@
"request": "launch",
"preLaunchTask": "Start Teams App in Desktop Client (Remote)",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 6
},
"internalConsoleOptions": "neverOpen"
Expand Down Expand Up @@ -63,18 +63,6 @@
"program": "${workspaceFolder}/src/app.py",
"cwd": "${workspaceFolder}/src",
"console": "integratedTerminal"
},
{
"name": "Start Test Tool",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/devTools/teamsapptester/node_modules/@microsoft/teams-app-test-tool/cli.js",
"args": [
"start"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
{{#CEAEnabled}}
},
{
Expand Down Expand Up @@ -150,7 +138,7 @@
"cascadeTerminateToConfigurations": ["Start Python"],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 1
},
"stopAll": true
Expand All @@ -161,7 +149,7 @@
"cascadeTerminateToConfigurations": ["Start Python"],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 2
},
"stopAll": true
Expand All @@ -171,7 +159,7 @@
"configurations": ["Start Python"],
"preLaunchTask": "Start Teams App in Desktop Client",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 3
},
"stopAll": true
Expand All @@ -180,14 +168,10 @@
"name": "Debug in Test Tool",
"configurations": [
"Start Python",
"Start Test Tool"
],
"cascadeTerminateToConfigurations": [
"Start Test Tool"
],
"preLaunchTask": "Deploy (Test Tool)",
"preLaunchTask": "Test Tool",
"presentation": {
"group": "2-local",
"group": "1-local",
"order": 1
},
"stopAll": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Test Tool",
"dependsOn": ["Validate prerequisites (Test Tool)", "Deploy (Test Tool)", "Start Test Tool"],
"dependsOrder": "sequence",
"presentation": {
"reveal": "never"
},
},
{
// Check all required prerequisites.
// See https://aka.ms/teamsfx-tasks/check-prerequisites to know the details and how to customize the args.
Expand Down Expand Up @@ -34,6 +42,31 @@
"env": "testtool",
}
},
{
"label": "Start Test Tool",
"type": "shell",
"command": "${workspaceFolder}/devTools/teamsapptester/teamsapptester.exe",
"args": [
"start"
],
"isBackground": true,
"problemMatcher": {
"owner": "custom",
"pattern": {
"regexp": ".*InternalServiceError: (.*)",
"message": 1
},
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": ".*Teams App Test Tool"
},
"endsPattern": {
"regexp": ".*started web socket client"
}
},
}
},
{
"label": "Start Teams App Locally",
"dependsOn": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.7/yaml.schema.json
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.8/yaml.schema.json
# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This link should be published later.

# Visit https://aka.ms/teamsfx-actions for details on actions
version: v1.7
version: v1.8

deploy:
# Install development tool(s)
Expand All @@ -10,6 +10,7 @@ deploy:
testTool:
version: ~0.2.1
symlinkDir: ./devTools/teamsapptester
releaseType: binary

# Generate runtime environment variables
- uses: file/createOrUpdateEnvironmentFile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 4
},
"internalConsoleOptions": "neverOpen"
Expand All @@ -18,7 +18,7 @@
"request": "launch",
"url": "https://teams.microsoft.com/l/app/${{TEAMS_APP_ID}}?installAppPackage=true&webjoin=true&${account-hint}",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 5
},
"internalConsoleOptions": "neverOpen"
Expand All @@ -29,7 +29,7 @@
"request": "launch",
"preLaunchTask": "Start Teams App in Desktop Client (Remote)",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 6
},
"internalConsoleOptions": "neverOpen"
Expand Down Expand Up @@ -63,18 +63,6 @@
"program": "${workspaceFolder}/src/app.py",
"cwd": "${workspaceFolder}/src",
"console": "integratedTerminal"
},
{
"name": "Start Test Tool",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/devTools/teamsapptester/node_modules/@microsoft/teams-app-test-tool/cli.js",
"args": [
"start"
],
"cwd": "${workspaceFolder}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
{{#CEAEnabled}}
},
{
Expand Down Expand Up @@ -150,7 +138,7 @@
"cascadeTerminateToConfigurations": ["Start Python"],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 1
},
"stopAll": true
Expand All @@ -161,7 +149,7 @@
"cascadeTerminateToConfigurations": ["Start Python"],
"preLaunchTask": "Start Teams App Locally",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 2
},
"stopAll": true
Expand All @@ -171,7 +159,7 @@
"configurations": ["Start Python"],
"preLaunchTask": "Start Teams App in Desktop Client",
"presentation": {
"group": "1-Teams",
"group": "2-Teams",
"order": 3
},
"stopAll": true
Expand All @@ -180,14 +168,10 @@
"name": "Debug in Test Tool",
"configurations": [
"Start Python",
"Start Test Tool"
],
"cascadeTerminateToConfigurations": [
"Start Test Tool"
],
"preLaunchTask": "Deploy (Test Tool)",
"preLaunchTask": "Test Tool",
"presentation": {
"group": "2-local",
"group": "1-local",
"order": 1
},
"stopAll": true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Test Tool",
"dependsOn": ["Validate prerequisites (Test Tool)", "Deploy (Test Tool)", "Start Test Tool"],
"dependsOrder": "sequence",
"presentation": {
"reveal": "never"
},
},
{
// Check all required prerequisites.
// See https://aka.ms/teamsfx-tasks/check-prerequisites to know the details and how to customize the args.
Expand Down Expand Up @@ -34,6 +42,31 @@
"env": "testtool",
}
},
{
"label": "Start Test Tool",
"type": "shell",
"command": "${workspaceFolder}/devTools/teamsapptester/teamsapptester.exe",
"args": [
"start"
],
"isBackground": true,
"problemMatcher": {
"owner": "custom",
"pattern": {
"regexp": ".*InternalServiceError: (.*)",
"message": 1
},
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": ".*Teams App Test Tool"
},
"endsPattern": {
"regexp": ".*started web socket client"
}
},
}
},
{
"label": "Start Teams App Locally",
"dependsOn": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.7/yaml.schema.json
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.8/yaml.schema.json
# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
# Visit https://aka.ms/teamsfx-actions for details on actions
version: v1.7
version: v1.8

deploy:
# Install development tool(s)
Expand All @@ -10,6 +10,7 @@ deploy:
testTool:
version: ~0.2.1
symlinkDir: ./devTools/teamsapptester
releaseType: binary

# Generate runtime environment variables
- uses: file/createOrUpdateEnvironmentFile
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.7/yaml.schema.json
# yaml-language-server: $schema=https://aka.ms/teams-toolkit/v1.8/yaml.schema.json
# Visit https://aka.ms/teamsfx-v5.0-guide for details on this file
# Visit https://aka.ms/teamsfx-actions for details on actions
version: v1.7
version: v1.8

deploy:
# Install development tool(s)
Expand Down
Loading
Loading