Run the Google Workspace Live Tests
Edit on GitHubRun the opt-in Google Docs, Sheets, Slides, Drive, shared-drive and change-feed tests for OfficeIMO against a disposable Drive folder.
- Packages
- OfficeIMO.GoogleWorkspace
dotnet add package OfficeIMO.GoogleWorkspace
- OfficeIMO.GoogleWorkspace
- Works with
- .NET
- Target frameworks
- netstandard2.0, net8.0, net10.0, net472
Live tests are for contributors working on the OfficeIMO Google Workspace packages. They are opt-in and create disposable resources in one dedicated folder.
Configure the test account
Set these environment variables:
$env:OFFICEIMO_RUN_GOOGLE_WORKSPACE_LIVE = "1"
$env:GOOGLE_WORKSPACE_ACCESS_TOKEN = "<short-lived-token>"
$env:GOOGLE_WORKSPACE_FOLDER_ID = "<disposable-test-folder-id>"
$env:GOOGLE_WORKSPACE_DRIVE_ID = "<optional-shared-drive-id>"
Run the tests
Run the format partitions:
dotnet test OfficeIMO.Word.Tests -c Release -f net10.0 --filter Category=GoogleWorkspaceLive
dotnet test OfficeIMO.Excel.Tests -c Release -f net10.0 --filter Category=GoogleWorkspaceLive
dotnet test OfficeIMO.PowerPoint.Tests -c Release -f net10.0 --filter Category=GoogleWorkspaceLive
dotnet test OfficeIMO.GoogleWorkspace.Tests -c Release -f net10.0 --filter Category=GoogleWorkspaceLive
Each test creates, reads/imports, exports where applicable, and deletes its file in a finally path. The change-feed test also verifies that the disposable item becomes visible. Use a non-production folder and principal with only the scopes needed by the lane. If a cleanup failure is reported, remove that named disposable item before rerunning.