RunVisualStudioTestsusingTestAgent@1 - Eseguire test funzionali v1 attività

RunVisualStudioTestsusingTestAgent@1 e l'attività complementare (distribuzione dell'agente di test di Visual Studio) sono deprecate. Usare invece l'attività Test di Visual Studio. L'attività VSTest può eseguire unit test, nonché test funzionali. Eseguire test su uno o più agenti usando l'impostazione del processo multi-agente. Usare l'attività Piattaforma di test di Visual Studio per eseguire test senza la necessità di Visual Studio nell'agente. L'attività VSTest offre anche nuove funzionalità, ad esempio la ripetizione automatica dei test non superati.

Sintassi

# 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.

Input

testMachineGroup - Macchine
string. Obbligatorio.

Elenco delimitato da virgole di FQDN o indirizzi IP del computer, che può includere il numero di porta. Il valore massimo è 32 computer o 32 agenti. Le voci di elenco possono essere:

  • Nome di un gruppo di risorse di Azure.
  • Elenco delimitato da virgole di nomi di computer. Esempio: dbserver.fabrikam.com,dbserver_int.fabrikam.com:5986,192.168.34:5986
  • Variabile di output di un'attività precedente.

dropLocation - Percorso rilascio test
string. Obbligatorio.

Specifica il percorso nei computer di test in cui i file binari di test sono stati copiati da una copia file di computer Windows o da un'attività Copia file di Azure . Le variabili di fase di sistema dai computer dell'agente di test possono essere usate per specificare il percorso di rilascio. Esempi: c:\tests e %systemdrive%\Tests.


testSelection - Selezione test
string. Obbligatorio. Valori consentiti: testAssembly (Assembly di test), testPlan (Piano di test). Valore predefinito: testAssembly.

Specifica il modo in cui vengono eseguiti i test: usando assembly di test o piano di test.


testPlan - Piano di test
string. Obbligatorio quando testSelection = testPlan.

Specifica un piano di test già configurato per questa organizzazione.


testSuite - Gruppo di test
string. Obbligatorio quando testSelection = testPlan.

Specifica un gruppo di test dal piano di test selezionato.


testConfiguration - Configurazione di test
string. Obbligatorio quando testSelection = testPlan.

Specifica una configurazione di test dal piano di test selezionato.


sourcefilters - Test Assembly
string. Obbligatorio quando testSelection = testAssembly. Valore predefinito: **\*test*.dll.

Specifica i file binari di test in cui eseguire i test. È possibile usare caratteri jolly. Ad esempio, **\*test*.dll; per tutti i .dll file contenenti test il nome del file.


testFilterCriteria - Criteri di filtro dei test
string. facoltativo. Usare quando testSelection = testAssembly.

Filtro che specifica i test da eseguire all'interno dei file di assembly di test. Funziona allo stesso modo dell'opzione /TestCaseFilter in vstest.console.exe. Esempio: Owner=james&Priority=1.


runSettingsFile - File delle impostazioni di esecuzione
string.

Specifica il percorso del runsettings file o testsettings da usare con i test.


overrideRunParams - Eseguire l'override dei parametri di esecuzione dei test
string.

Specifica i parametri di override definiti nella TestRunParameters sezione del runsettings file o nella Properties sezione del testsettings file. Esempio: AppURL=$(DeployURL);Port=8080.

Nota

È possibile accedere alle proprietà specificate nel testsettings file tramite TestContext Test Agent 2017 Update 4 o versione successiva.


codeCoverageEnabled - Code Coverage abilitato
boolean. Valore predefinito: false.

Specifica se code coverage è abilitato per l'attività.


customSlicingEnabled - Distribuire i test in base al numero di computer
boolean. Valore predefinito: false.

Quando il valore di questo valore booleano è impostato su true, i test vengono distribuiti in base al numero di computer forniti anziché al numero di contenitori di test.

Nota

I test all'interno di un .dll possono anche essere distribuiti a più computer.


testRunTitle - Titolo esecuzione test
string.

Specifica un nome per l'esecuzione del test.


platform - Piattaforma
string.

Specifica la piattaforma in base alla quale devono essere segnalati i test. Se è stata definita una variabile per platform nell'attività di compilazione, usare la variabile come valore.


configuration - Configurazione
string.

Specifica la configurazione in base alla quale devono essere segnalati i test. Se è stata definita una variabile per configuration nell'attività di compilazione, usare la variabile come valore.


testConfigurations - Configurazioni di test
string.

facoltativo. Associa un filtro del test case a un ID di configurazione di test. Sintassi: <Filter1>:<Id1>;DefaultTestConfiguration:<Id3>. Esempio: FullyQualifiedName~Chrome:12.


autMachineGroup - Applicazione in computer di test
string.

Elenco delimitato da virgole di computer, variabili di output o nomi di gruppi di computer in cui vengono eseguiti i processi del server, ad esempio W3WP.exe, .


Opzioni di controllo delle attività

Tutte le attività dispongono di opzioni di controllo oltre ai relativi input attività. Per altre informazioni, vedere Opzioni di controllo e proprietà comuni delle attività.

Variabili di output

Nessuno.

Requisiti

Requisito Descrizione
Tipi di pipeline YAML, build classica, versione classica
Viene eseguito in Agente
Richieste Nessuno
Capabilities Questa attività non soddisfa le richieste per le attività successive nel processo.
Restrizioni dei comandi Qualsiasi
Variabili impostabili Qualsiasi
Versione agente 1.104.0 o versione successiva
Categoria attività Test