UITest Class

Represents a coded UI test in Visual Studio.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.TestTools.UITest.Common.UITest

Namespace:  Microsoft.VisualStudio.TestTools.UITest.Common
Assembly:  Microsoft.VisualStudio.TestTools.UITest.Common (in Microsoft.VisualStudio.TestTools.UITest.Common.dll)

Syntax

'Declaration
Public Class UITest
public class UITest
public ref class UITest
type UITest =  class end
public class UITest

The UITest type exposes the following members.

Constructors

  Name Description
Public method UITest() Initializes a new instance of the UITest class.
Public method UITest(IEnumerable<UITestAction>) Initializes a new instance of the UITest class by using the provided test actions.
Public method UITest(IEnumerable<UITestAction>, UIMap) Initializes a new instance of the UITest class.

Top

Properties

  Name Description
Public property AssemblyVersion Gets or sets the version for the assembly.
Public property CleanupActions Gets or sets the actions for the cleanup process.
Public property Configuration Gets or sets the XML environment configuration file for this coded UI test.
Public property CurrentActionList Gets or sets the list of current coded UI test actions.
Public property ExecuteActions Gets or sets the test actions to be executed as part of the coded UI test.
Public property Id Gets or sets the unique identifier for this coded UI test.
Public property InitializeActions Gets or sets a list of actions to execute as part of the coded UI test initialization process.
Public property Maps Gets a collection of UIMap objects for this coded UI test.
Public property Name Gets or sets the name of this coded UI test.
Public property OnErrorActions Gets or sets a list of test actions to execute if the test execution encounters an error.
Public property ValueMap Gets or sets the value map for this UI test object.
Public property Version Gets or sets the version for this UI test.

Top

Methods

  Name Description
Public method Append(IEnumerable<UITestAction>) Appends the provided list of test actions to this UI test.
Public method Append(IEnumerable<UITestAction>, UIMap) Appends the test actions and objects from the provided UI map to this UI test.
Public method Append(UITest, Int64, Int64) Appends the test actions from the provided UI test into this UI test at the provided range.
Public method BindWithCurrentValues Binds the parameters that are used in this UI test that have currently loaded values.
Public methodStatic member CompareEnvironments Compares the two given UITestEnvironment objects and returns a collection of mismatches.
Public method CompareStoredEnvironmentWithCurrentEnvironment Compares the recorder configuration, if it exists, with the system environment that was captured at startup, and returns a collection of mismatches.
Public methodStatic member Create(Stream) Creates a UI test by using the provided stream.
Public methodStatic member Create(String) Creates a UI test by using the specified file.
Public method CreateAndAddParameter(UITestAction, String) Parameterizes an action and creates the parameter by using the provided test action and parameter name.
Public method CreateAndAddParameter(UIObject, String, String) Parameterizes an action and creates the parameter by using the provided UI test object, property name, and parameter name.
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Overrides Object.Equals(Object).)
Public method Equals(UITest) Determines whether the provided UI test object is equal to this UI test object.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetActionList Gets the UI test action list that corresponds to a given UI test action section.
Public method GetHashCode Serves as a hash function for a particular type. (Overrides Object.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method Save(Stream) Saves this UI test to a stream.
Public method Save(String) Saves this UI test to a file.
Public method SetAndBindParameterValues Binds the parameters that are used in this UI test to the values in a data row.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public eventStatic member Executing Occurs when the framework starts to execute this UI test.
Public eventStatic member Saving Occurs when the framework starts to save this UI test.

Top

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.

See Also

Reference

Microsoft.VisualStudio.TestTools.UITest.Common Namespace

Other Resources

How to: Create a Coded UI Test