C# Class Microsoft.Test.UIAutomation.Tests.Scenarios.StressTestsDrivers

Class that has the actual tests. Call RunStressTests to start the diver that drives the tests.
Mostra file Open project: geeksree/cSharpGeeks Class Usage Examples

Public Methods

Method Description
RunStressTests ( object threadInfoObj ) : void

Static entry to the stress code. This calls StressTests which then runs the stress code

Private Methods

Method Description
BuildElementTable ( UIA _originalElement ) : void
BuildMethodsTable ( TestLab testLab, TestWorks testWorks, Scenario scenario ) : void

Build up the _methods variable with all the methods associated with the patterns, AutomationElement, etc. buckets so we can call them. TODO: Make this a static methods so we don't build this up for each thread

GetPatternList ( ) : ArrayList

Get a list of patterns that UIA supports

GetRandomObjectByType ( string patternName ) : UIA.AutomationElement

Return a random element that supports the pattern

InvokeRandomMethod ( string patternName, bool dumpStressBucketAttribute ) : void

This method will randomly navigate to an AutomationElement relative of the _curElement variable. It will then look at the supported patterns of the AutomationElement and randomly call one of the supported patterns methods. If it catches an exception from the method that is invoked, it will throw the inner exception that the method threw.

Stable ( string methodName, TestLab testLab ) : bool

Return whether the attribute is set to Stable

StressTestsDrivers ( PacketInfo threadInfo ) : System

Main driver code that calls the actual tests. This method will continue call the tests until either the test application has gone away, or the thread is aborted.

Method Details

RunStressTests() static public method

Static entry to the stress code. This calls StressTests which then runs the stress code
static public RunStressTests ( object threadInfoObj ) : void
threadInfoObj object
return void