Table of Contents

Class ClientRound

Namespace
Valheim.Testing.Game
Assembly
Valheim.Testing.Game.dll

One round of ClientRounds, handed to the mod's measurement and after-restart check.

public sealed class ClientRound
Inheritance
object
ClientRound

Properties

Client

The joined client's actor, strictly pinned to the server's world.

public GameActor Client { get; }

Property Value

GameActor

Index

The round's position, from 0.

public int Index { get; }

Property Value

int

Last

Whether this is the last round: the client leaves after it and the server is not restarted.

public bool Last { get; }

Property Value

bool

Name

The round's name, which prefixes its steps and evidence files.

public string Name { get; }

Property Value

string

Output

public string Output { get; }

Property Value

string

Report

public ScenarioReport Report { get; }

Property Value

ScenarioReport

Server

The server's actor in this round (a new one after each restart).

public GameActor Server { get; }

Property Value

GameActor

WorldUid

The world UID the rounds run in, which every evidence file of this round names.

public string WorldUid { get; }

Property Value

string

Methods

Step(string, Action)

Records a Scenario step named {round}: {name} and rethrows its failure.

public void Step(string name, Action action)

Parameters

name string
action Action

Step(StepPhase, string, Action)

Records a step in phase named {round}: {name} and rethrows its failure.

public void Step(StepPhase phase, string name, Action action)

Parameters

phase StepPhase
name string
action Action

Write(string, object)

Writes value as indented JSON to {round}-{name}.json in the output directory, links it from result.json (Attach(EvidenceReference): kind name, site the round's name) and returns the path. name is an evidence kind: 1-40 lower-case letters, digits or hyphens. Refuses a file that already exists: evidence is never overwritten.

public string Write(string name, object value)

Parameters

name string
value object

Returns

string