Table of Contents

Class StaticPattern

Namespace
CsraTestMethods.Functional
Assembly
CsraTestMethods.dll
[TestClass(Creation.TestInstance)]
[Serializable]
public class StaticPattern : TestCodeBase
Inheritance
TestCodeBase
StaticPattern
Inherited Members
TestCodeBase.AbortTest()
TestCodeBase.DebugBreak()
TestCodeBase.TheExec
TestCodeBase.TheHdw
TestCodeBase.TheProgram
TestCodeBase.FlowDomains
TestCodeBase.ShouldRunPreBody
TestCodeBase.ShouldRunBody
TestCodeBase.ShouldRunPostBody

Methods

Baseline(Pattern, bool, string)

Executes a functional test with the specified pattern.

[TestMethod]
[Steppable]
[CustomValidation]
public void Baseline(Pattern pattern, bool testFunctional, string setup = "")

Parameters

pattern Pattern

The pattern to be executed during the test.

testFunctional bool

Whether to log the functional result.

setup string

Optional. Setup to be applied before the pattern is run.

Details

Test Technique
  • to be added
Implementation

The Validation section creates the pattern object.

The PreBody section applies levels and timing from the test instance context. Optionally, applies the specified config.

The Body section executes the pattern and retrieves the results.

The PostBody optionally logs a functional test record.

Platform Specifics

Supports stepping capability for PreBody/Body/PostBody.

Pre Conditions
  • none
Post Conditions
  • none
Limitations
  • none
Code Reference
[TestMethod, Steppable, CustomValidation]
public void Baseline(Pattern pattern, bool testFunctional, string setup = "") {

    if (TheExec.Flow.IsValidating) {
        TheLib.Validate.Pattern(pattern, nameof(pattern), out _patternInfo);
    }

    if (ShouldRunPreBody) {
        TheLib.Setup.LevelsAndTiming.Apply(true);
        Services.Setup.Apply(setup);
    }

    if (ShouldRunBody) {
        TheLib.Execute.Digital.RunPattern(_patternInfo[0]);
        _patResult = TheLib.Acquire.Digital.PatternResults();
    }

    if (ShouldRunPostBody) {
        if (testFunctional) TheLib.Datalog.TestFunctional(_patResult, pattern);
    }
}