PowerShell Core test step

The PowerShell Core test step executes arbitrary code using the set PowerShell Core version. PowerShell Core version 6 and 7 are supported. The maximum length of the script is 10240 characters.

The step fails if there is an error in the script or if it exits with a non-zero exit code. The content of the standard output and standard error is recorded as the result of the test step and can be viewed using the Wenenu UI or accessed using the Wenenu API. The maximum combined length of the standard output and error is 20000 characters. The output is truncated if it exceeds the maximum length.

Note The variables of the test scenario are available as environment variables during the execution.
Note Filesystem operations are available. Every test step runs in separate docker containers. Test steps in the same test scenario have a common directory mounted into the container, sharing files between test steps is possible. The mounted directory is under /tests which is the current directory when the test execution starts.
Warning For security reasons, do not display any sensitive information in the step result.

UI settings

PowerShell core step UI settings
Figure 1. PowerShell core step UI settings

1

Arbitrary name of the test step up to 64 characters

2

Test agent that is going to execute the test step

3

Version of PowerShell Core that executes the script

4

Arbitrary code that gets executed

JSON

{
  "displayName": "PowerShell test", 1
  "type": "pscore", 2
  "id": "299d0b46-d86d-4a97-9a45-bea6408b54fe", 3
  "version": "7", 4
  "code": "$PSVersionTable.PSVersion", 5
  "agent": { 6
    "type": "standard",
    "id": "162dff466f92c372005cf7055d006b77ac377e01c60ae59f942d74680f2496d1"
  }
}
1 Arbitrary name of the test step up to 64 characters
2 Type of the test step, must be 'pscore'
3 Version 4 unique identifier of the test step, must be unique within the test scenario
4 Version of PowerShell Core that executes the script
5 Arbitrary code that gets executed
6 Agent object defining the agent that will execute the test step

Available modules, commands and libraries

Base packages and tools

The following command-line tools are available in addition to common GNU/Linux tools:

Name Type Version

sudo

admin tool

-

git

vcs

2.17.1

az

(azure cli) cloud tools

2.12.0

wget

http tool

1.19.4

curl

http tool

7.58.0

gpg

cryptography

1.8.1

python3

programming

3.6.9

php

programming

7.2.24

bash

scripting

4.4.20

PowerShell Core 7.0.3

Name Type Version

Az

module

4.7.0

Az.Accounts

module

2.2.8

Az.Advisor

module

1.1.1

Az.Aks

module

1.3.0

Az.AnalysisServices

module

1.1.4

Az.ApiManagement

module

2.1.0

Az.ApplicationInsights

module

1.1.0

Az.Automation

module

1.4.0

Az.Batch

module

3.1.0

Az.Billing

module

1.0.3

Az.Cdn

module

1.4.3

Az.CognitiveServices

module

1.6.0

Az.Compute

module

4.4.0

Az.ContainerInstance

module

1.0.3

Az.ContainerRegistry

module

1.1.1

Az.DataBoxEdge

module

1.1.0

Az.DataFactory

module

1.10.1

Az.DataLakeAnalytics

module

1.0.2

Az.DataLakeStore

module

1.2.8

Az.DataShare

module

1.0.0

Az.DeploymentManager

module

1.1.0

Az.DesktopVirtualization

module

1.0.0

Az.DevTestLabs

module

1.0.2

Az.Dns

module

1.1.2

Az.EventGrid

module

1.3.0

Az.EventHub

module

1.6.0

Az.FrontDoor

module

1.6.1

Az.Functions

module

1.0.2

Az.HDInsight

module

3.6.0

Az.HealthcareApis

module

1.1.0

Az.IotHub

module

2.5.0

Az.KeyVault

module

2.2.0

Az.Kusto

module

1.0.0

Az.LogicApp

module

1.3.2

Az.MachineLearning

module

1.1.3

Az.Maintenance

module

1.1.0

Az.ManagedServices

module

1.1.0

Az.MarketplaceOrdering

module

1.0.2

Az.Media

module

1.1.1

Az.Monitor

module

2.1.0

Az.Network

module

3.4.0

Az.NotificationHubs

module

1.1.1

Az.OperationalInsights

module

2.3.0

Az.PolicyInsights

module

1.3.1

Az.PowerBIEmbedded

module

1.1.2

Az.PrivateDns

module

1.0.3

Az.RecoveryServices

module

2.12.1

Az.RedisCache

module

1.2.1

Az.Relay

module

1.0.3

Az.Resources

module

2.5.1

Az.ServiceBus

module

1.4.1

Az.ServiceFabric

module

2.2.0

Az.SignalR

module

1.2.0

Az.Sql

module

2.10.0

Az.SqlVirtualMachine

module

1.1.0

Az.Storage

module

2.6.0

Az.StorageSync

module

1.3.0

Az.StreamAnalytics

module

1.0.1

Az.Support

module

1.0.0

Az.TrafficManager

module

1.0.4

Az.Websites

module

1.11.0

DSCParser

module

1.2.0

DSInternals

module

4.4.1

ImportExcel

module

7.1.1

Microsoft.PowerShell.SecretManagement

module

1.0.0

Pester

module

5.0.4

platyPS

module

0.14.0

powershell-yaml

module

0.4.2

PSFramework

module

1.4.150

PSWriteHTML

module

0.0.110

Selenium

module

3.0.1

Microsoft.PowerShell.Archive

module

1.2.5

Microsoft.PowerShell.Host

module

7.0.0

Microsoft.PowerShell.Management

module

7.0.0

Microsoft.PowerShell.Security

module

7.0.0

Microsoft.PowerShell.Utility

module

7.0.0

PackageManagement

module

1.4.7

PowerShellGet

module

2.2.4

PSDesiredStateConfiguration

module

2.0.5

PSReadLine

module

2.0.2

ThreadJob

module

2.0.3

PowerShell Core 6.2.7

Name Type Version

Az

module

4.7.0

Az.Accounts

module

2.2.8

Az.Advisor

module

1.1.1

Az.Aks

module

1.3.0

Az.AnalysisServices

module

1.1.4

Az.ApiManagement

module

2.1.0

Az.ApplicationInsights

module

1.1.0

Az.Automation

module

1.4.0

Az.Batch

module

3.1.0

Az.Billing

module

1.0.3

Az.Cdn

module

1.4.3

Az.CognitiveServices

module

1.6.0

Az.Compute

module

4.4.0

Az.ContainerInstance

module

1.0.3

Az.ContainerRegistry

module

1.1.1

Az.DataBoxEdge

module

1.1.0

Az.DataFactory

module

1.10.1

Az.DataLakeAnalytics

module

1.0.2

Az.DataLakeStore

module

1.2.8

Az.DataShare

module

1.0.0

Az.DeploymentManager

module

1.1.0

Az.DesktopVirtualization

module

1.0.0

Az.DevTestLabs

module

1.0.2

Az.Dns

module

1.1.2

Az.EventGrid

module

1.3.0

Az.EventHub

module

1.6.0

Az.FrontDoor

module

1.6.1

Az.Functions

module

1.0.2

Az.HDInsight

module

3.6.0

Az.HealthcareApis

module

1.1.0

Az.IotHub

module

2.5.0

Az.KeyVault

module

2.2.0

Az.Kusto

module

1.0.0

Az.LogicApp

module

1.3.2

Az.MachineLearning

module

1.1.3

Az.Maintenance

module

1.1.0

Az.ManagedServices

module

1.1.0

Az.MarketplaceOrdering

module

1.0.2

Az.Media

module

1.1.1

Az.Monitor

module

2.1.0

Az.Network

module

3.4.0

Az.NotificationHubs

module

1.1.1

Az.OperationalInsights

module

2.3.0

Az.PolicyInsights

module

1.3.1

Az.PowerBIEmbedded

module

1.1.2

Az.PrivateDns

module

1.0.3

Az.RecoveryServices

module

2.12.1

Az.RedisCache

module

1.2.1

Az.Relay

module

1.0.3

Az.Resources

module

2.5.1

Az.ServiceBus

module

1.4.1

Az.ServiceFabric

module

2.2.0

Az.SignalR

module

1.2.0

Az.Sql

module

2.10.0

Az.SqlVirtualMachine

module

1.1.0

Az.Storage

module

2.6.0

Az.StorageSync

module

1.3.0

Az.StreamAnalytics

module

1.0.1

Az.Support

module

1.0.0

Az.TrafficManager

module

1.0.4

Az.Websites

module

1.11.0

DSCParser

module

1.2.0

DSInternals

module

4.4.1

ImportExcel

module

7.1.1

Microsoft.PowerShell.SecretManagement

module

1.0.0

Pester

module

5.0.4

platyPS

module

0.14.0

powershell-yaml

module

0.4.2

PSFramework

module

1.4.150

PSWriteHTML

module

0.0.110

Selenium

module

3.0.1

ThreadJob

module

2.0.3

Microsoft.PowerShell.Archive

module

1.2.5

Microsoft.PowerShell.Host

module

6.1.0

Microsoft.PowerShell.Management

module

6.1.0

Microsoft.PowerShell.Security

module

6.1.0

Microsoft.PowerShell.Utility

module

6.1.0

PackageManagement

module

1.3.2

PowerShellGet

module

2.1.3

PSDesiredStateConfiguration

module

0.0.-1

PSReadLine

module

2.0.2

ThreadJob

module

1.1.2