TestElement Class
Provides a base class for all tests.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.TestTools.Common.TestElement
Microsoft.VisualStudio.TestTools.Common.TestAggregation
Namespace: Microsoft.VisualStudio.TestTools.Common
Assembly: Microsoft.VisualStudio.QualityTools.Common (in Microsoft.VisualStudio.QualityTools.Common.dll)
Syntax
'Declaration
<SerializableAttribute> _
Public MustInherit Class TestElement _
Implements ITestElement, ICloneable, IVerifiable, IVisiblePropertyProvider, _
ITestElementResultTestPropertyProvider, IXmlTestStore, IHostedTest
[SerializableAttribute]
public abstract class TestElement : ITestElement,
ICloneable, IVerifiable, IVisiblePropertyProvider, ITestElementResultTestPropertyProvider, IXmlTestStore,
IHostedTest
[SerializableAttribute]
public ref class TestElement abstract : ITestElement,
ICloneable, IVerifiable, IVisiblePropertyProvider, ITestElementResultTestPropertyProvider, IXmlTestStore,
IHostedTest
[<AbstractClass>]
[<SerializableAttribute>]
type TestElement =
class
interface ITestElement
interface ICloneable
interface IVerifiable
interface IVisiblePropertyProvider
interface ITestElementResultTestPropertyProvider
interface IXmlTestStore
interface IHostedTest
end
public abstract class TestElement implements ITestElement, ICloneable, IVerifiable, IVisiblePropertyProvider, ITestElementResultTestPropertyProvider, IXmlTestStore, IHostedTest
The TestElement type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TestElement() | Initializes a new instance of the TestElement class. | |
TestElement(TestElement) | Initializes a new instance of the TestElement class by using the provided copy of a test element. | |
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(TestId, String, String) | Initializes a new instance of the TestElement class. | |
TestElement(TestId, String, String, String) | Initializes a new instance of the TestElement class. |
Top
Properties
Name | Description | |
---|---|---|
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. | |
TestIdString | Gets the test ID for this test element as a string. | |
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. |
Top
Methods
Name | Description | |
---|---|---|
AssignIsRunnable | Assigns values for the IsRunnable and ErrorMessageForNonRunnable properties. | |
Clone | When overridden in a derived class, returns a copy of this test element. | |
Equals | Returns a value that indicates whether the provided object is equal to this test element object. (Overrides Object.Equals(Object).) | |
FillDataRow | Fills the provided data row object by using test data results from visible properties of this test element. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetDeploymentItemsFromEditableItems | 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 | Returns an array of the names of editable items that is generated from a collection of deployment items. | |
GetHashCode | Serves as a hash function for a particular type. (Overrides Object.GetHashCode().) | |
GetObjectData | Populates a SerializationInfo by using the data that is required to serialize this object. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsValid | Returns a value that indicates whether this test element is valid. | |
Load | Loads the current object from the provided XML element by using the provided parameters. | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
Save | Saves the current object to the provided XML element by using the provided parameters. | |
ToString | Returns a string representation of this test element. (Overrides Object.ToString().) |
Top
Fields
Name | Description | |
---|---|---|
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 | Infrastructure. Returns the value of the AbortRunOnAgentFailure property. | |
m_agentAttributes | Infrastructure. Returns the value of the AgentAttributes property. | |
m_cssIteration | Infrastructure. Returns the value of the CssIteration property. | |
m_cssProjectStructure | Infrastructure. Returns the value of the CssProjectStructure property. | |
m_deploymentItems | Infrastructure. Returns the value of the DeploymentItems property. | |
m_description | Infrastructure. Returns the value of the Description property. | |
m_enabled | Infrastructure. Returns the value of the Enabled property. | |
m_executionId | Infrastructure. Returns the value of the ExecutionId property. | |
m_hostData | Returns the internal host data. | |
m_hostType | Infrastructure. Returns the internal value of the HostType. | |
m_id | Infrastructure. Returns the value of the Id property. | |
m_isGroupable | Infrastructure. Returns the value of the IsGroupable property. | |
m_isRunOnRestart | Infrastructure. Returns the value of the IsRunOnRestart property. | |
m_name | Infrastructure. Returns the value of the Name property. | |
m_nonRunnableReason | Infrastructure. Returns the value of the ErrorMessageForNonRunnable property. | |
m_owner | Infrastructure. Returns the value of the Owner property. | |
m_parentExecutionId | Infrastructure. Returns the value of the ParentExecId property. | |
m_priority | Infrastructure. Returns the value of the Priority property. | |
m_projectData | Infrastructure. Returns the value of the ProjectData property. | |
m_properties | Infrastructure. Returns the value of the Properties property. | |
m_storage | Infrastructure. Returns the value of the Storage property. | |
m_testCategories | Infrastructure. Returns the value of the TestCategories property. | |
m_timeout | Infrastructure. Returns the value of the Timeout property. | |
m_userData | Infrastructure. Returns the value of the UserData property. | |
m_workItemIds | Infrastructure. Returns the value of the WorkItemIds property. | |
NamePropertyName | Infrastructure. Returns "Name". | |
ObjectColumnName | Infrastructure. Returns "ObjectColumnName". | |
OwnerPropertyName | Infrastructure. Returns "Owner". | |
PriorityPropertyName | Infrastructure. Returns "Priority". | |
ProjectDataPropertyName | Infrastructure. Returns "ProjectData". | |
ProjectNamePropertyName | Infrastructure. Returns "ProjectName". | |
ProjectRelativePathPropertyName | Infrastructure. Returns "ProjectRelativePath". | |
SolutionNamePropertyName | Infrastructure. Returns "SolutionName". | |
SourceFileNamePropertyName | Infrastructure. Returns "SourceFileName". | |
StoragePropertyName | Infrastructure. Returns "Storage". | |
TestCategoryPropertyName | Returns "TestCategory". | |
TestTypePropertyName | Returns "TestType". | |
TimeoutVisiblePropertyName | Returns "TimeoutVisible". | |
WorkItemIdsViewablePropertyName | Returns "WorkItemIdsViewable". |
Top
Remarks
Although some properties are set by using values that a user enters through the user interface, most properties and methods are set, or used, or both, by the internal functionality of the user interface.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.