본문으로 건너뛰기
Skillpedia
테스트48k · #3976

azure-resource-manager-playwright-dotnet

하는 일

이 코드는 Azure에서 Playwright로 웹 애플리케이션을 테스트하기 위한 작업 공간을 만들고 관리하도록 돕습니다. 이 공간을 설정하고, 이름 사용 가능 여부를 확인하고, 사용 한도를 확인할 수 있습니다.

사용하는 경우

  • ✓클라우드에서 자동화된 Playwright 테스트를 실행할 새 환경이 필요할 때.
  • ✓새 작업 공간 이름이 이미 사용 중인지 확인하고 싶을 때.
  • ✓아직 만들 수 있는 리소스가 얼마나 남았는지 확인할 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-resource-manager-playwright-dotnet/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-resource-manager-playwright-dotnet/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“West US 3 지역에 'my-test-workspace'라는 Playwright 작업 공간을 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

Azure SDK를 사용해 계정에 연결하고, 작업 공간을 만들거나 수정하는 명령을 보냅니다. 어디에서 작업할지 알 수 있도록 ID와 Azure 구독 정보를 설정해야 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Azure.ResourceManager.Playwright (.NET)

Management plane SDK for provisioning and managing Microsoft Playwright Testing workspaces via Azure Resource Manager.

⚠️ Management vs Test Execution

  • This SDK (Azure.ResourceManager.Playwright): Create workspaces, manage quotas, check name availability
  • Test Execution SDK (Azure.Developer.MicrosoftPlaywrightTesting.NUnit): Run Playwright tests at scale on cloud browsers

Installation

dotnet add package Azure.ResourceManager.Playwright
dotnet add package Azure.Identity

Current Versions: Stable v1.0.0, Preview v1.0.0-beta.1

Environment Variables

AZURE_SUBSCRIPTION_ID=<your-subscription-id>
# For service principal auth (optional)
AZURE_TENANT_ID=<tenant-id>
AZURE_CLIENT_ID=<client-id>
AZURE_CLIENT_SECRET=<client-secret>

Authentication

using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.Playwright;

// Always use DefaultAzureCredential
var credential = new DefaultAzureCredential();
var armClient = new ArmClient(credential);

// Get subscription
var subscriptionId = Environment.GetEnvironmentVariable("AZURE_SUBSCRIPTION_ID");
var subscription = armClient.GetSubscriptionResource(
    new ResourceIdentifier($"/subscriptions/{subscriptionId}"));

Resource Hierarchy

ArmClient
└── SubscriptionResource
    ├── PlaywrightQuotaResource (subscription-level quotas)
    └── ResourceGroupResource
        └── PlaywrightWorkspaceResource
            └── PlaywrightWorkspaceQuotaResource (workspace-level quotas)

Core Workflow

1. Create Playwright Workspace

using Azure.ResourceManager.Playwright;
using Azure.ResourceManager.Playwright.Models;

// Get resource group
var resourceGroup = await subscription
    .GetResourceGroupAsync("my-resource-group");

// Define workspace
var workspaceData = new PlaywrightWorkspaceData(AzureLocation.WestUS3)
{
    // Optional: Configure regional affinity and local auth
    RegionalAffinity = PlaywrightRegionalAffinity.Enabled,
    LocalAuth = PlaywrightLocalAuth.Enabled,
    Tags =
    {
        ["Team"] = "Dev Exp",
        ["Environment"] = "Production"
    }
};

// Create workspace (long-running operation)
var workspaceCollection = resourceGroup.Value.GetPlaywrightWorkspaces();
var operation = await workspaceCollection.CreateOrUpdateAsync(
    WaitUntil.Completed,
    "my-playwright-workspace",
    workspaceData);

PlaywrightWorkspaceResource workspace = operation.Value;

// Get the data plane URI for running tests
Console.WriteLine($"Data Plane URI: {workspace.Data.DataplaneUri}");
Console.WriteLine($"Workspace ID: {workspace.Data.WorkspaceId}");

2. Get Existing Workspace

// Get by name
var workspace = await workspaceCollection.GetAsync("my-playwright-workspace");

// Or check if exists first
bool exists = await workspaceCollection.ExistsAsync("my-playwright-workspace");
if (exists)
{
    var existingWorkspace = await workspaceCollection.GetAsync("my-playwright-workspace");
    Console.WriteLine($"Workspace found: {existingWorkspace.Value.Data.Name}");
}

3. List Workspaces

// List in resource group
await foreach (var workspace in workspaceCollection.GetAllAsync())
{
    Console.WriteLine($"Workspace: {workspace.Data.Name}");
    Console.WriteLine($"  Location: {workspace.Data.Location}");
    Console.WriteLine($"  State: {workspace.Data.ProvisioningState}");
    Console.WriteLine($"  Data Plane URI: {workspace.Data.DataplaneUri}");
}

// List across subscription
await foreach (var workspace in subscription.GetPlaywrightWorkspacesAsync())
{
    Console.WriteLine($"Workspace: {workspace.Data.Name}");
}

4. Update Workspace

var patch = new PlaywrightWorkspacePatch
{
    Tags =
    {
        ["Team"] = "Dev Exp",
        ["Environment"] = "Staging",
        ["UpdatedAt"] = DateTime.UtcNow.ToString("o")
    }
};

var updatedWorkspace = await workspace.Value.UpdateAsync(patch);

5. Check Name Availability

using Azure.ResourceManager.Playwright.Models;

var checkRequest = new PlaywrightCheckNameAvailabilityContent
{
    Name = "my-new-workspace",
    ResourceType = "Microsoft.LoadTestService/playwrightWorkspaces"
};

var result = await subscription.CheckPlaywrightNameAvailabilityAsync(checkRequest);

if (result.Value.IsNameAvailable == true)
{
    Console.WriteLine("Name is available!");
}
else
{

…
자주 묻는 질문

이 코드와 테스트를 실행하는 SDK의 차이는 무엇인가요?

이 코드는 테스트가 실행될 공간을 설정하고 관리하기 위한 것입니다. 다른 SDK는 그 공간 안에서 실제로 테스트를 실행하기 위한 것입니다.

코드는 어떤 Azure 계정을 사용할지 어떻게 알까요?

「DefaultAzureCredential」을 사용합니다. 이 방식은 환경 변수나 대화형 로그인 등 여러 인증 방법을 시도해 Azure 계정에 연결합니다.

작업 공간은 아무 곳에나 만들 수 있나요?

특정 Azure 지역에 작업 공간을 만들 수 있습니다. 이 코드로 원하는 지역을 선택할 수 있습니다.

상세 정보

작성자의 원본 설명

Azure Resource Manager SDK for Microsoft Playwright Testing in .NET.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#3976
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬