Click or drag to resize

DataDrivenTestCase Class

Data Driven Test Case is derived from Test Case. The whole test case will be run multiple times according to the given data source.
Inheritance Hierarchy

Namespace:  Hummingbird.TestFramework.Automation
Assembly:  Hummingbird.TestFramework (in Hummingbird.TestFramework.dll) Version: 1.2.0.0
Syntax
[DataContractAttribute(Namespace = "http://www.hummingbird-alm.com/testframework/201610")]
public sealed class DataDrivenTestCase : TestCase

The DataDrivenTestCase type exposes the following members.

Constructors
  NameDescription
Public methodDataDrivenTestCase
Initializes a new instance of the DataDrivenTestCase class
Top
Properties
  NameDescription
Public propertyContext
Gets or sets the test case level Context values. The context is dispatched by the automation engine, and is read-only outside of the Test Cases.
(Inherited from AbstractTestItem.)
Public propertyCustomVariables
Gets a list of custom variables defined by the user. These variables will be saved with the project. and will be replaced if necessary. CustomVariables are more priority than variables in Variables, if an variable of the same name exists both in CustomVariables and Variables, the value of that in CustomVarialbes will return.
(Inherited from AbstractTestItem.)
Public propertyDataSource
Gets or sets the where to load test data from.
Public propertyDataStorage
Gets or sets the data storage where to save received data;
Public propertyDescription
Gets or sets the Description of the current AbstractTestItem
(Inherited from AbstractTestItem.)
Public propertyDisplayMessage
Gets or sets the information can be shown to the user
(Inherited from AbstractTestItem.)
Public propertyElapsedTime
A DateTime object indicates the time when current steps finishes. EndTime is set by the test framework after the Checkpoint method has finishes. If the test step goes wrong, EndTime will be set when the error occurs.
(Inherited from AbstractTestItem.)
Public propertyId
Gets or sets the unique identifier of the TestCase.
(Inherited from AbstractTestItem.)
Public propertyIsDisabled
Gets or sets whether the current test item is disabled.
(Inherited from AbstractTestItem.)
Public propertyIsExpanded
Gets or sets a value indicating whether this item is extended in its Visual Tree.
(Inherited from AbstractTestItem.)
Public propertyName
Gets or sets the name of this Test Case
(Inherited from AbstractTestItem.)
Public propertyOnErrorBehavior
Gets or sets the behavior of Automation Engine when the current test case fails
(Inherited from TestCase.)
Public propertyProgress
Gets or sets the progress of the current Data Driven test case.
Public propertyStartTime
A DateTime object indicates the time when current steps starts to run. StartTime is set by the test framework when the Run method has been called.
(Inherited from AbstractTestItem.)
Public propertyStatus
Status of the current test item (TestSuite, TestCase or TestStep). Automation framework will mark Result = Running when entering the current item. If Result has not been changed in Run() and Checkpoint() method, it will be marked as Passed.

You must assign Errors, Warning if it happens within Run and Checkpoint method.

(Inherited from AbstractTestItem.)
Public propertySteps
Gets or sets a list of Test Steps. The test steps will be executed
(Inherited from TestCase.)
Public propertyTestInstances
Gets the Test Instance generated by the Data Driven Test Case
Public propertyTestStepCount
Gets the count of test steps
(Inherited from TestCase.)
Public propertyTestSuite
Gets or sets the referenced test suite.
(Inherited from TestCase.)
Public propertyVariables
Gets or sets the variables in the current test scope (Test Step, Test Case or Test Suite).
(Inherited from AbstractTestItem.)
Top
Methods
  NameDescription
Public methodCompare
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
(Inherited from AbstractTestItem.)
Public methodCompareTo
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
(Inherited from AbstractTestItem.)
Public methodDeleteItem
Deletes an sub item from the current scope. for Test Case, the item is test Step, For Test Suite, the item is test case, ...
(Inherited from TestCase.)
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from AbstractTestItem.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetVariable
Gets the variable from the given context.
(Inherited from AbstractTestItem.)
Public methodGetVariables
Gets All variables available for the current test scope.
(Inherited from AbstractTestItem.)
Public methodInitStatus
Initializes the status of the Test Case
(Inherited from AbstractTestItem.)
Public methodMoveDown
Moves down a test item in its parent items collections
(Inherited from AbstractTestItem.)
Public methodMoveToBottom
Moves to bottom a test item in its parent items collections
(Inherited from AbstractTestItem.)
Public methodMoveToTop
Moves on top a test item in its parent items collection.
(Inherited from AbstractTestItem.)
Public methodMoveUp
Moves up a test item in its parent items collection.
(Inherited from AbstractTestItem.)
Public methodRun
Runs the current test case.
(Overrides TestCaseRun(Int64, Profile).)
Public methodToString
Returns a String that represents this instance.
(Overrides TestCaseToString.)
Public methodUpdateId
Generates a new Identifier of the current AbstractTestItem and all its sub items.
(Inherited from TestCase.)
Top
Events
  NameDescription
Public eventPropertyChanged
Occurs when the test case properties has been changed.
(Inherited from AbstractTestItem.)
Top
Extension Methods
  NameDescription
Public Extension MethodToStringOrXml
Converts any Object to string representation in String or XML format.
(Defined by ExtensionMethods.)
Public Extension MethodToXmlString
Converts any Object to string representation in XML format.
(Defined by ExtensionMethods.)
Top
Remarks
The DataSource provides a data table from a compatible source: an CSV, Excel file, or an Table on the SQL Server. When Data driven test is being executed, it will create one or more TestCaseInstance that represents a Test Case and replace variables used in test steps. The Data Driven Test case will generate n test cases and their results in the report.
See Also