AgentAttribute
Namespace: E2E
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = false)]public sealed class AgentAttribute : AttributePins the agent that the calls of a test, or of every test in a class, use when they name none. Upstream’s
agent option of test and describe. The closest pin wins: a call’s Agent,
then the method, then the class, then an enclosing or base class, then the E2E_AGENT environment variable. Base and enclosing classes count although
the attribute is not inherited: TestAgentOptions reads each layer itself.
An unknown name fails the test with INVALID_ARGUMENT.
Inheritance: object → Attribute
Constructors
Section titled “Constructors”AgentAttribute(string)
Section titled “AgentAttribute(string)”public AgentAttribute(string name)Pins the agent that the calls of a test, or of every test in a class, use when they name none. Upstream’s
agent option of test and describe. The closest pin wins: a call’s Agent,
then the method, then the class, then an enclosing or base class, then the E2E_AGENT environment variable. Base and enclosing classes count although
the attribute is not inherited: TestAgentOptions reads each layer itself.
An unknown name fails the test with INVALID_ARGUMENT.
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
Properties
Section titled “Properties”public string Name { get; }The name of an agents.<name> entry.
Value: string