TestElement Class

Definition

Provides a base class for all tests.

public ref class TestElement abstract : ICloneable, Microsoft::VisualStudio::TestTools::Common::IHostedTest, Microsoft::VisualStudio::TestTools::Common::ITestElement, Microsoft::VisualStudio::TestTools::Common::ITestElementResultTestPropertyProvider, Microsoft::VisualStudio::TestTools::Common::Xml::IXmlTestStore
[System.Serializable]
public abstract class TestElement : ICloneable, Microsoft.VisualStudio.TestTools.Common.IHostedTest, Microsoft.VisualStudio.TestTools.Common.ITestElement, Microsoft.VisualStudio.TestTools.Common.ITestElementResultTestPropertyProvider, Microsoft.VisualStudio.TestTools.Common.Xml.IXmlTestStore
[<System.Serializable>]
type TestElement = class
    interface ITestElement
    interface ICloneable
    interface IVerifiable
    interface IVisiblePropertyProvider
    interface ITestElementResultTestPropertyProvider
    interface IXmlTestStore
    interface IHostedTest
Public MustInherit Class TestElement
Implements ICloneable, IHostedTest, ITestElement, ITestElementResultTestPropertyProvider, IXmlTestStore
Inheritance
TestElement
Derived
Attributes
Implements

Constructors

TestElement()

Initializes a new instance of the TestElement class.

TestElement(SerializationInfo, StreamingContext)

Initializes a new instance of the TestElement class from serialized data.

TestElement(String, String)

Initializes a new instance of the TestElement class by using the provided name and description.

TestElement(String, String, String)

Initializes a new instance of the TestElement class by using the provided name, description, and storage.

TestElement(TestElement)

Initializes a new instance of the TestElement class by using the provided copy of a test element.

TestElement(TestId, String, String)

Initializes a new instance of the TestElement class.

TestElement(TestId, String, String, String)

Initializes a new instance of the TestElement class.

Fields

CanBeAggregatedPropertyName

Returns "CanBeAggregated".

CreatedByUIPropertyName

Returns "CreatedByUI".

CssIterationPropertyName

Returns "CssIteration".

CssProjectStructurePropertyName

Returns "CssProjectStructure".

DeploymentItemSeparator

Returns "|".

DescriptionPropertyName

Returns "Description".

EnabledPropertyName

Returns "Enabled".

EnabledPropName

Returns "Enabled".

ErrorMessageForNonRunnablePropertyName

Returns "ErrorMessageForNonRunnable".

HostTypePropertyName

Returns "HostTypePropertyName".

HumanReadableIdPropertyName

Returns "HumanReadableId".

InfiniteTimeout

Returns the int.MaxValue.

IsAutomatedPropertyName

Returns "IsAutomated".

IsRunnablePropertyName

Returns "IsRunnable".

m_abortRunOnAgentFailure

Returns the value of the AbortRunOnAgentFailure property.

m_agentAttributes

Returns the value of the AgentAttributes property.

m_cssIteration

Returns the value of the CssIteration property.

m_cssProjectStructure

Returns the value of the CssProjectStructure property.

m_deploymentItems

Returns the value of the DeploymentItems property.

m_description

Returns the value of the Description property.

m_enabled

Returns the value of the Enabled property.

m_executionId

Returns the value of the ExecutionId property.

m_hostData

Returns the internal host data.

m_hostType

Returns the internal value of the HostType.

m_id

Returns the value of the Id property.

m_isGroupable

Returns the value of the IsGroupable property.

m_isRunOnRestart

Returns the value of the IsRunOnRestart property.

m_name

Returns the value of the Name property.

m_nonRunnableReason

Returns the value of the ErrorMessageForNonRunnable property.

m_owner

Returns the value of the Owner property.

m_parentExecutionId

Returns the value of the ParentExecId property.

m_priority

Returns the value of the Priority property.

m_projectData

Returns the value of the ProjectData property.

m_properties

Returns the value of the Properties property.

m_storage

Returns the value of the Storage property.

m_testCategories

Returns the value of the TestCategories property.

m_timeout

Returns the value of the Timeout property.

m_userData

Returns the value of the UserData property.

m_workItemIds

Returns the value of the WorkItemIds property.

NamePropertyName

Returns "Name".

ObjectColumnName

Returns "ObjectColumnName".

OwnerPropertyName

Returns "Owner".

PriorityPropertyName

Returns "Priority".

ProjectDataPropertyName

Returns "ProjectData".

ProjectNamePropertyName

Returns "ProjectName".

ProjectRelativePathPropertyName

Returns "ProjectRelativePath".

SolutionNamePropertyName

Returns "SolutionName".

SourceFileNamePropertyName

Returns "SourceFileName".

StoragePropertyName

Returns "Storage".

TestCategoryPropertyName

Returns "TestCategory".

TestTypePropertyName

Returns "TestType".

TimeoutVisiblePropertyName

Returns "TimeoutVisible".

WorkItemIdsViewablePropertyName

Returns "WorkItemIdsViewable".

Properties

AbortRunOnAgentFailure

Gets or sets a value that indicates whether the test run will be aborted if a test agent fails.

Adapter

When overridden in a derived class, gets the associated diagnostic data adapter.

AgentAttributes

Gets a dictionary of agent attributes.

CanBeAggregated

When overridden in a derived class, gets a value that indicates whether this test element can be aggregated.

CategoryId

Gets or sets the test category ID for this test element.

ControllerPlugin

When overridden in a derived class, gets a custom controller extension object.

Copy

Gets a copy of this test element.

CreatedByUI

Gets or sets a value that indicates whether this element was created by the user interface.

CssIteration

Gets or sets the iteration path for an associated work item.

CssProjectStructure

Gets or sets the area path of an associated work item.

DeploymentItems

Gets a collection of items to be deployed together with this test.

DeploymentItemsEditable

Gets an array of the file names for those deployment items that are editable.

Description

Gets or sets a description of this test element.

Enabled

Gets or sets a value that indicates whether this test element is enabled.

ErrorMessageForNonRunnable

Gets the error message to use if the test element is not runnable.

ExecutionId

Gets or sets the execution ID

Groups

Gets a collection of property descriptors that represents the groups to which the properties of this test element belong, and also determines how the descriptors will be grouped in the properties window of the user interface.

HostData

Gets or sets data to be used by the custom host that is identified by the HostType property.

HostType

Gets or sets the type name for the custom host to use for the test instead of the default host.

HumanReadableId

Gets the ID of this test element as it appears in the user interface.

Id

Gets the ID for this test element.

IsAutomated

Gets a value that indicates whether this test element is automated.

IsGroupable

Gets or sets a value that indicates whether this test element can be grouped.

IsLoadTestCandidate

Gets a value that indicates whether this test element will be included in a list of possible load tests in the UI.

IsModified

Gets or sets a value that indicates whether this test element has been modified.

IsRunnable

Gets or sets a value that indicates whether this test element is runnable.

IsRunOnRestart

Gets or sets a value that indicates whether this test element is to be run if the test run is restarted.

Link

Gets a link to this test element.

Name

Gets or sets the name of this test element.

Owner

Gets or sets the name of the owner of this test element.

ParentExecId

Gets or sets the TestExecId of the parent test element.

Priority

Gets or sets the relative priority of this test element.

ProjectData

Gets or sets the data for the test project that contains this test element.

ProjectName

Gets the name of the test project that contains this test element.

ProjectRelativePath

Gets the relative path of the test project that contains this test element.

Properties

Gets a collection of the properties for this test element.

ReadOnly

When overridden in a derived class, gets or sets a value that indicates whether this test element is read-only.

SolutionName

Gets the name of the solution that contains this test element.

SourceFileName

Gets the path and file name for the test that contains this element.

Storage

Gets or sets the path of the storage location of the deployment items for this element.

TestCategories

Gets a collection of test category items that is assigned to this test element by the user in the user interface.

TestType

When overridden in a derived class, gets the type of this test.

TestTypeName

Gets the type of the test element as a string.

Timeout

Gets or sets the number of seconds before the execution of this test element times out.

UserData

Gets or sets an object that contains nonpersistable arbitrary data for a custom test element.

VisibleProperties

Gets a collection of the properties of this test element that is visible in the user interface.

WorkItemIds

Gets or sets a list of work item IDs that is associated with this test element.

WorkItemIdsViewable

Gets or sets a list of work item IDs for viewable work items.

Methods

AssignIsRunnable(Boolean, String)

Assigns values for the IsRunnable and ErrorMessageForNonRunnable properties.

Clone()

When overridden in a derived class, returns a copy of this test element.

Equals(Object)

Returns a value that indicates whether the provided object is equal to this test element object.

FillDataRow(DataRow, String)

Fills the provided data row object by using test data results from visible properties of this test element.

GetDeploymentItemsFromEditableItems(String[])

Returns a collection of deployment items that is generated from the provided array of the names of those items that are associated with this test that are editable.

GetEditableItemsFromDeploymentItems(DeploymentItemCollection)

Returns an array of the names of editable items that is generated from a collection of deployment items.

GetHashCode()
GetObjectData(SerializationInfo, StreamingContext)

Populates a SerializationInfo by using the data that is required to serialize this object.

IsValid()

Returns a value that indicates whether this test element is valid.

Load(XmlElement, XmlTestStoreParameters)

Loads the current object from the provided XML element by using the provided parameters.

Save(XmlElement, XmlTestStoreParameters)

Saves the current object to the provided XML element by using the provided parameters.

ToString()

Returns a string representation of this test element.

Applies to