.NET Core test step

The .NET Core test step executes arbitrary code using the set .NET Core version. Currently, .NET Core 3.1.x is the only supported version. The maximum length of the script is 10240 characters.

The step fails if the program fails to compile or if it ends with an exception or 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

.NET core step UI settings
Figure 1. .NET 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 .NET Core that executes the program

4

Arbitrary .NET program that gets executed

JSON

{
  "displayName": ".Net v3.1 test", 1
  "type": "dotnetcore", 2
  "id": "81dc12f2-1661-4481-998f-fe0416663434", 3
  "version": "3.1.x", 4
  "code": "using System;\r\nusing System.IO;\r\n\r\nnamespace HelloWorld {\r\n    class Program {\r\n        static void Main(string[] args) {\r\n            Console.WriteLine(\"Hello World!\");\r\n            Console.WriteLine(Environment.Version);\r\n            Console.WriteLine(Directory.GetCurrentDirectory());\r\n        }\r\n    }\r\n}", 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 'dotnetcore'
3 Version 4 unique identifier of the test step, must be unique within the test scenario
4 Version of .NET Core that executes the program
5 Arbitrary .NET program that gets executed
6 Agent object defining the agent that will execute the test step

Available modules, commands and libraries

.NET Core 3.1.101

Name Type Version

Newtonsoft.Json

package

13.0.1

Newtonsoft.Json.Bson

package

1.0.2

NUnit

package

3.13.2

xunit

package

2.4.1

AutoMapper

package

10.1.1

Serilog

package

2.10.0

Castle.Core

package

4.4.1

Moq

package

4.16.1

Swashbuckle.AspNetCore.Swagger

package

6.1.4

CacheManager.Core

package

2.0.0-beta-1629

Dapper

package

2.0.90

NLog

package

4.7.9