RunVisualStudioTestsusingTestAgent@1 - 기능 테스트 v1 작업 실행

RunVisualStudioTestsusingTestAgent@1 및 해당 도우미 작업(Visual Studio 테스트 에이전트 배포)은 더 이상 사용되지 않습니다. 대신 Visual Studio 테스트 작업을 사용합니다. VSTest 작업은 기능 테스트뿐만 아니라 단위를 실행할 수 있습니다. 다중 에이전트 작업 설정을 사용하여 하나 이상의 에이전트에서 테스트를 실행합니다. 에이전트에서 Visual Studio 없이 Visual Studio 테스트 플랫폼 작업을 사용하여 테스트를 실행합니다. 또한 VSTest 작업은 실패한 테스트를 자동으로 다시 실행과 같은 새로운 기능을 제공합니다.

Syntax

# Run functional tests v1
# Deprecated: This task and it’s companion task (Visual Studio Test Agent Deployment) are deprecated. Use the 'Visual Studio Test' task instead. The VSTest task can run unit as well as functional tests. Run tests on one or more agents using the multi-agent job setting. Use the 'Visual Studio Test Platform' task to run tests without needing Visual Studio on the agent. VSTest task also brings new capabilities such as automatically rerunning failed tests.
- task: RunVisualStudioTestsusingTestAgent@1
  inputs:
  # Setup Options
    testMachineGroup: # string. Required. Machines. 
    dropLocation: # string. Required. Test Drop Location. 
  # Execution Options
    testSelection: 'testAssembly' # 'testAssembly' | 'testPlan'. Required. Test Selection. Default: testAssembly.
    #testPlan: # string. Required when testSelection = testPlan. Test Plan. 
    #testSuite: # string. Required when testSelection = testPlan. Test Suite. 
    #testConfiguration: # string. Required when testSelection = testPlan. Test Configuration. 
    sourcefilters: '**\*test*.dll' # string. Required when testSelection = testAssembly. Test Assembly. Default: **\*test*.dll.
    #testFilterCriteria: # string. Optional. Use when testSelection = testAssembly. Test Filter criteria. 
    #runSettingsFile: # string. Run Settings File. 
    #overrideRunParams: # string. Override Test Run Parameters. 
    #codeCoverageEnabled: false # boolean. Code Coverage Enabled. Default: false.
    #customSlicingEnabled: false # boolean. Distribute tests by number of machines. Default: false.
  # Reporting Options
    #testRunTitle: # string. Test Run Title. 
    #platform: # string. Platform. 
    #configuration: # string. Configuration. 
    #testConfigurations: # string. Test Configurations. 
    #autMachineGroup: # string. Application Under Test Machines.
# Run Functional Tests v1
# Deprecated: This task and it’s companion task (Visual Studio Test Agent Deployment) are deprecated. Use the 'Visual Studio Test' task instead. The VSTest task can run unit as well as functional tests. Run tests on one or more agents using the multi-agent job setting. Use the 'Visual Studio Test Platform' task to run tests without needing Visual Studio on the agent. VSTest task also brings new capabilities such as automatically rerunning failed tests.
- task: RunVisualStudioTestsusingTestAgent@1
  inputs:
  # Setup Options
    testMachineGroup: # string. Required. Machines. 
    dropLocation: # string. Required. Test Drop Location. 
  # Execution Options
    testSelection: 'testAssembly' # 'testAssembly' | 'testPlan'. Required. Test Selection. Default: testAssembly.
    #testPlan: # string. Required when testSelection = testPlan. Test Plan. 
    #testSuite: # string. Required when testSelection = testPlan. Test Suite. 
    #testConfiguration: # string. Required when testSelection = testPlan. Test Configuration. 
    sourcefilters: '**\*test*.dll' # string. Required when testSelection = testAssembly. Test Assembly. Default: **\*test*.dll.
    #testFilterCriteria: # string. Optional. Use when testSelection = testAssembly. Test Filter criteria. 
    #runSettingsFile: # string. Run Settings File. 
    #overrideRunParams: # string. Override Test Run Parameters. 
    #codeCoverageEnabled: false # boolean. Code Coverage Enabled. Default: false.
    #customSlicingEnabled: false # boolean. Distribute tests by number of machines. Default: false.
  # Reporting Options
    #testRunTitle: # string. Test Run Title. 
    #platform: # string. Platform. 
    #configuration: # string. Configuration. 
    #testConfigurations: # string. Test Configurations. 
    #autMachineGroup: # string. Application Under Test Machines.

입력

testMachineGroup - 기계
string. 필수 요소.

포트 번호를 포함할 수 있는 컴퓨터 FQDN 또는 IP 주소의 쉼표로 구분된 목록입니다. 최대값은 32대의 컴퓨터 또는 32개의 에이전트입니다. 목록 항목은 다음과 같습니다.

  • Azure 리소스 그룹의 이름입니다.
  • 쉼표로 구분된 컴퓨터 이름 목록입니다. 예: dbserver.fabrikam.com,dbserver_int.fabrikam.com:5986,192.168.34:5986
  • 이전 작업의 출력 변수입니다.

dropLocation - 테스트 삭제 위치
string. 필수 요소.

테스트 이진 파일이 Windows 컴퓨터 파일 복사 또는 Azure 파일 복사 작업에 의해 복사된 테스트 머신의 위치를 지정합니다. 테스트 에이전트 컴퓨터의 시스템 단계 변수를 사용하여 삭제 위치를 지정할 수 있습니다. 예를 들어 c:\tests%systemdrive%\Tests가 있습니다.


testSelection - 테스트 선택
string. 필수 요소. 허용되는 값: testAssembly (테스트 어셈블리), testPlan (테스트 계획). 기본값은 testAssembly입니다.

테스트 어셈블리 또는 테스트 계획을 사용하여 테스트를 실행하는 방법을 지정합니다.


testPlan - 테스트 계획
string. 필요한 경우 testSelection = testPlan입니다.

이 organization 대해 이미 구성된 테스트 계획을 지정합니다.


testSuite - 테스트 도구 모음
string. 필요한 경우 testSelection = testPlan입니다.

선택한 테스트 계획에서 테스트 도구 모음을 지정합니다.


testConfiguration - 테스트 구성
string. 필요한 경우 testSelection = testPlan입니다.

선택한 테스트 계획에서 테스트 구성을 지정합니다.


sourcefilters - 테스트 어셈블리
string. 필요한 경우 testSelection = testAssembly입니다. 기본값은 **\*test*.dll입니다.

테스트를 실행할 테스트 이진 파일을 지정합니다. 와일드카드를 사용할 수 있습니다. 예를 들어 파일 **\*test*.dll; 이름에 포함된 test 모든 .dll 파일의 경우 입니다.


testFilterCriteria - 테스트 필터 조건
string. 선택 사항입니다. 를 사용하는 경우 testSelection = testAssembly를 사용합니다.

테스트 어셈블리 파일 내에서 실행할 테스트를 반사하는 필터입니다. 의 옵션vstest.console.exe/TestCaseFilter 동일한 방식으로 작동합니다. 예: Owner=james&Priority=1.


runSettingsFile - 설정 파일 실행
string.

테스트에 사용할 또는 testsettings 파일의 runsettings 파일 경로를 지정합니다.


overrideRunParams - 테스트 실행 매개 변수 재정의
string.

파일의 섹션 또는 파일의 섹션에 TestRunParameters 정의된 재정의 runsettings 매개 변수를 Properties 지정합니다 testsettings . 예: AppURL=$(DeployURL);Port=8080.

참고

파일에 지정된 testsettings 속성은 테스트 에이전트 2017 업데이트 4 이상을 사용하여 TestContext 액세스할 수 있습니다.


codeCoverageEnabled - 코드 검사 사용
boolean. 기본값은 false입니다.

작업에 대해 코드 검사를 사용할 수 있는지를 지정합니다.


customSlicingEnabled - 컴퓨터 수별로 테스트 배포
boolean. 기본값은 false입니다.

이 부울의 값을 로 설정 true하면 테스트 컨테이너 수 대신 제공된 컴퓨터 수에 따라 테스트가 분산됩니다.

참고

.dll 의 테스트는 여러 컴퓨터에 배포될 수도 있습니다.


testRunTitle - 실행 타이틀 테스트
string.

테스트 실행의 이름을 지정합니다.


platform - 플랫폼
string.

테스트를 보고할 플랫폼을 지정합니다. 빌드 작업에서 에 대한 변수를 platform 정의한 경우 변수를 값으로 사용합니다.


configuration - 구성
string.

테스트를 보고할 구성을 지정합니다. 빌드 작업에서 에 대한 변수를 configuration 정의한 경우 변수를 값으로 사용합니다.


testConfigurations - 테스트 구성
string.

선택 사항입니다. 테스트 사례 필터를 테스트 구성 ID에 연결된다. 구문: <Filter1>:<Id1>;DefaultTestConfiguration:<Id3>. 예: FullyQualifiedName~Chrome:12.


autMachineGroup - 테스트 머신 아래의 애플리케이션
string.

와 같은 서버 프로세스가 실행 중인 컴퓨터, 출력 변수 또는 컴퓨터 그룹 이름의 쉼표로 W3WP.exe구분된 목록입니다.


작업 제어 옵션

모든 작업에는 작업 입력 외에 제어 옵션이 있습니다. 자세한 내용은 컨트롤 옵션 및 일반적인 작업 속성을 참조하세요.

출력 변수

없음

요구 사항

요구 사항 Description
파이프라인 유형 YAML, 클래식 빌드, 클래식 릴리스
실행 중 에이전트
요청 없음
Capabilities 이 작업은 작업의 후속 작업에 대한 요구를 충족하지 않습니다.
명령 제한 사항 모두
Settable 변수 모두
에이전트 버전 1.104.0 이상
작업 범주 테스트