TestElement Class

Provides a base class for all tests.

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)

[SerializableAttribute]
public abstract class TestElement : ITestElement, 
	ICloneable, IVerifiable, IVisiblePropertyProvider, ITestElementResultTestPropertyProvider, IXmlTestStore, 
	IHostedTest

The TestElement type exposes the following members.

  NameDescription
Protected methodTestElement()Initializes a new instance of the TestElement class.
Protected methodTestElement(TestElement)Initializes a new instance of the TestElement class by using the provided copy of a test element.
Protected methodTestElement(SerializationInfo, StreamingContext)Initializes a new instance of the TestElement class from serialized data.
Protected methodTestElement(String, String)Initializes a new instance of the TestElement class by using the provided name and description.
Protected methodTestElement(String, String, String)Initializes a new instance of the TestElement class by using the provided name, description, and storage.
Protected methodTestElement(TestId, String, String)Initializes a new instance of the TestElement class.
Protected methodTestElement(TestId, String, String, String)Initializes a new instance of the TestElement class.
Top

  NameDescription
Public propertyAbortRunOnAgentFailureGets or sets a value that indicates whether the test run will be aborted if a test agent fails.
Public propertyAdapterWhen overridden in a derived class, gets the associated diagnostic data adapter.
Public propertyAgentAttributesGets a dictionary of agent attributes.
Public propertyCanBeAggregatedWhen overridden in a derived class, gets a value that indicates whether this test element can be aggregated.
Public propertyCategoryIdGets or sets the test category ID for this test element.
Public propertyControllerPluginWhen overridden in a derived class, gets a custom controller extension object.
Public propertyCopyGets a copy of this test element.
Public propertyCreatedByUIGets or sets a value that indicates whether this element was created by the user interface.
Public propertyCssIterationGets or sets the iteration path for an associated work item.
Public propertyCssProjectStructureGets or sets the area path of an associated work item.
Public propertyDeploymentItemsGets a collection of items to be deployed together with this test.
Public propertyDeploymentItemsEditableGets an array of the file names for those deployment items that are editable.
Public propertyDescriptionGets or sets a description of this test element.
Public propertyEnabledGets or sets a value that indicates whether this test element is enabled.
Public propertyErrorMessageForNonRunnableGets the error message to use if the test element is not runnable.
Public propertyExecutionIdGets or sets the execution ID
Public propertyGroupsGets 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.
Public propertyHostDataGets or sets data to be used by the custom host that is identified by the HostType property.
Public propertyHostTypeGets or sets the type name for the custom host to use for the test instead of the default host.
Public propertyHumanReadableIdGets the ID of this test element as it appears in the user interface.
Public propertyIdGets the ID for this test element.
Public propertyIsAutomatedGets a value that indicates whether this test element is automated.
Public propertyIsGroupableGets or sets a value that indicates whether this test element can be grouped.
Public propertyIsLoadTestCandidateGets a value that indicates whether this test element will be included in a list of possible load tests in the UI.
Public propertyIsModifiedGets or sets a value that indicates whether this test element has been modified.
Public propertyIsRunnableGets or sets a value that indicates whether this test element is runnable.
Public propertyIsRunOnRestartGets or sets a value that indicates whether this test element is to be run if the test run is restarted.
Public propertyLinkGets a link to this test element.
Public propertyNameGets or sets the name of this test element.
Public propertyOwnerGets or sets the name of the owner of this test element.
Public propertyParentExecIdGets or sets the TestExecId of the parent test element.
Public propertyPriorityGets or sets the relative priority of this test element.
Public propertyProjectDataGets or sets the data for the test project that contains this test element.
Public propertyProjectNameGets the name of the test project that contains this test element.
Public propertyProjectRelativePathGets the relative path of the test project that contains this test element.
Public propertyPropertiesGets a collection of the properties for this test element.
Public propertyReadOnlyWhen overridden in a derived class, gets or sets a value that indicates whether this test element is read-only.
Public propertySolutionNameGets the name of the solution that contains this test element.
Public propertySourceFileNameGets the path and file name for the test that contains this element.
Public propertyStorageGets or sets the path of the storage location of the deployment items for this element.
Public propertyTestCategoriesGets a collection of test category items that is assigned to this test element by the user in the user interface.
Public propertyTestIdStringGets the test ID for this test element as a string.
Public propertyTestTypeWhen overridden in a derived class, gets the type of this test.
Public propertyTestTypeNameGets the type of the test element as a string.
Public propertyTimeoutGets or sets the number of seconds before the execution of this test element times out.
Public propertyUserDataGets or sets an object that contains nonpersistable arbitrary data for a custom test element.
Public propertyVisiblePropertiesGets a collection of the properties of this test element that is visible in the user interface.
Public propertyWorkItemIdsGets or sets a list of work item IDs that is associated with this test element.
Public propertyWorkItemIdsViewableGets or sets a list of work item IDs for viewable work items.
Top

  NameDescription
Public methodAssignIsRunnableAssigns values for the IsRunnable and ErrorMessageForNonRunnable properties.
Public methodCloneWhen overridden in a derived class, returns a copy of this test element.
Public methodEqualsReturns a value that indicates whether the provided object is equal to this test element object. (Overrides Object.Equals(Object).)
Public methodFillDataRowFills the provided data row object by using test data results from visible properties of this test element.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Protected methodStatic memberGetDeploymentItemsFromEditableItemsReturns 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.
Protected methodStatic memberGetEditableItemsFromDeploymentItemsReturns an array of the names of editable items that is generated from a collection of deployment items.
Public methodGetHashCodeServes as a hash function for a particular type. (Overrides Object.GetHashCode().)
Public methodGetObjectDataPopulates a SerializationInfo by using the data that is required to serialize this object.
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodIsValidReturns a value that indicates whether this test element is valid.
Public methodLoadLoads the current object from the provided XML element by using the provided parameters.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodSaveSaves the current object to the provided XML element by using the provided parameters.
Public methodToStringReturns a string representation of this test element. (Overrides Object.ToString().)
Top

  NameDescription
Public fieldStatic memberCanBeAggregatedPropertyNameReturns "CanBeAggregated".
Public fieldStatic memberCreatedByUIPropertyNameReturns "CreatedByUI".
Public fieldStatic memberCssIterationPropertyNameReturns "CssIteration".
Public fieldStatic memberCssProjectStructurePropertyNameReturns "CssProjectStructure".
Public fieldStatic memberDeploymentItemSeparatorReturns "|".
Public fieldStatic memberDescriptionPropertyNameReturns "Description".
Public fieldStatic memberEnabledPropertyNameReturns "Enabled".
Public fieldStatic memberEnabledPropNameReturns "Enabled".
Public fieldStatic memberErrorMessageForNonRunnablePropertyNameReturns "ErrorMessageForNonRunnable".
Public fieldStatic memberHostTypePropertyNameReturns "HostTypePropertyName".
Public fieldStatic memberHumanReadableIdPropertyNameReturns "HumanReadableId".
Public fieldStatic memberInfiniteTimeoutReturns the int.MaxValue.
Public fieldStatic memberIsAutomatedPropertyNameReturns "IsAutomated".
Public fieldStatic memberIsRunnablePropertyNameReturns "IsRunnable".
Protected fieldm_abortRunOnAgentFailureInfrastructure. Returns the value of the AbortRunOnAgentFailure property.
Protected fieldm_agentAttributesInfrastructure. Returns the value of the AgentAttributes property.
Protected fieldm_cssIterationInfrastructure. Returns the value of the CssIteration property.
Protected fieldm_cssProjectStructureInfrastructure. Returns the value of the CssProjectStructure property.
Protected fieldm_deploymentItemsInfrastructure. Returns the value of the DeploymentItems property.
Protected fieldm_descriptionInfrastructure. Returns the value of the Description property.
Protected fieldm_enabledInfrastructure. Returns the value of the Enabled property.
Protected fieldm_executionIdInfrastructure. Returns the value of the ExecutionId property.
Protected fieldm_hostDataReturns the internal host data.
Protected fieldm_hostTypeInfrastructure. Returns the internal value of the HostType.
Protected fieldm_idInfrastructure. Returns the value of the Id property.
Protected fieldm_isGroupableInfrastructure. Returns the value of the IsGroupable property.
Protected fieldm_isRunOnRestartInfrastructure. Returns the value of the IsRunOnRestart property.
Protected fieldm_nameInfrastructure. Returns the value of the Name property.
Protected fieldm_nonRunnableReasonInfrastructure. Returns the value of the ErrorMessageForNonRunnable property.
Protected fieldm_ownerInfrastructure. Returns the value of the Owner property.
Protected fieldm_parentExecutionIdInfrastructure. Returns the value of the ParentExecId property.
Protected fieldm_priorityInfrastructure. Returns the value of the Priority property.
Protected fieldm_projectDataInfrastructure. Returns the value of the ProjectData property.
Protected fieldm_propertiesInfrastructure. Returns the value of the Properties property.
Protected fieldm_storageInfrastructure. Returns the value of the Storage property.
Protected fieldm_testCategoriesInfrastructure. Returns the value of the TestCategories property.
Protected fieldm_timeoutInfrastructure. Returns the value of the Timeout property.
Protected fieldm_userDataInfrastructure. Returns the value of the UserData property.
Protected fieldm_workItemIdsInfrastructure. Returns the value of the WorkItemIds property.
Public fieldStatic memberNamePropertyNameInfrastructure. Returns "Name".
Public fieldStatic memberObjectColumnNameInfrastructure. Returns "ObjectColumnName".
Public fieldStatic memberOwnerPropertyNameInfrastructure. Returns "Owner".
Public fieldStatic memberPriorityPropertyNameInfrastructure. Returns "Priority".
Public fieldStatic memberProjectDataPropertyNameInfrastructure. Returns "ProjectData".
Public fieldStatic memberProjectNamePropertyNameInfrastructure. Returns "ProjectName".
Public fieldStatic memberProjectRelativePathPropertyNameInfrastructure. Returns "ProjectRelativePath".
Public fieldStatic memberSolutionNamePropertyNameInfrastructure. Returns "SolutionName".
Public fieldStatic memberSourceFileNamePropertyNameInfrastructure. Returns "SourceFileName".
Public fieldStatic memberStoragePropertyNameInfrastructure. Returns "Storage".
Public fieldStatic memberTestCategoryPropertyNameReturns "TestCategory".
Public fieldStatic memberTestTypePropertyNameReturns "TestType".
Public fieldStatic memberTimeoutVisiblePropertyNameReturns "TimeoutVisible".
Public fieldStatic memberWorkItemIdsViewablePropertyNameReturns "WorkItemIdsViewable".
Top

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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show: